Fork me on GitHub
#portal
<
2021-11-24
>
seancorfield00:11:52

Just got around to adding deep diff to my project and trying it out in Portal... OMG! That is so awesome!

djblue00:11:41

The version I showed in the DEMO today is bundled in the Portal UI and runs in cljs, so you shouldn't need to include the dep.

djblue00:11:30

I'm really glad you like it though! It's definitely more useful now with multi-select.

seancorfield00:11:51

Oh, good to know... haha... I'll remove that then... I just hadn't noticed the diff as an option before...

djblue00:11:29

Part of it's predicate is to wait for two values to be selected, might be why it didn't show up before

seancorfield00:11:41

Woohoo! Yesssss!!!

Johan01:11:14

Can logging/tracing aka "cheatmode" be enabled on cljs/shadow/web ?

djblue01:11:32

Unfortunately, I think the logging macros don't work as well in a cljs context

✔️ 1
nmkip03:11:11

Is there a shadow example?

David Pham07:11:41

Alternatively, you can have a client/server implementation with the portal.client API. This was one of the reason why I needed this feature 🙂

💯 1
Johan09:11:41

I don't get how this would enable tracing on cljs

Lukas Domagala11:11:23

@UFSMGQ690 I’m working on getting console/log to run in cljs, should be similar to what’s happening in https://github.com/Cyrik/omni-trace, although i’m not sure its gonna be as easy to get the file/line data from inside the function

Lukas Domagala11:11:05

@UFSMGQ690 ah i lied, the console log stuff is working from cljs, i must have destroyed my local install… whats not working is the “goto source” and the console macros don’t caputre the source file. i’ll try fixing the second part today

nmkip12:11:56

@djblue I'll try it today. I usually start shadow in a terminal with shadow-cljs watch something and then connect cider to the nREPL server.

Lukas Domagala12:11:34

@UFSMGQ690 so after spending waaay to much time on it, theres a PR that fixes file detection for cljs:https://github.com/djblue/portal/pull/84

🎉 1
djblue16:11:49

@U02EMBDU2JU awesome work! I made a https://github.com/djblue/portal/commit/a19f5b5818c8a57236f34c9adcc27c5ef54fe21c so that it works with goto-definition. I saw the same repl-input.cljs issue in emacs, so it's probably a repl issue.

Lukas Domagala20:11:03

@djblue interesting, your tweak doesn’t actually change anything on my setup. cljs compilation is crazy

Ziad Salah10:11:53

Good morning all. I was wondering what is the correct way of setting up the log behaviour that Chris was demoing yesterday. I checked the project code he was using yesterday and can see a log macro defined here: https://github.com/djblue/portal-talk/blob/main/src/url_shortener/console.cljc Am I meant to copy that code over to my projects, or is there some other way to do this that I'm overlooking?

Lukas Domagala11:11:55

you can just require the namespace (require ’[portal.console :as console]) and call the console/log directly. not sure why he copied the namespace into the shortener project, since the exact code is already in portal.

☝️ 1
Ziad Salah11:11:14

Great, thanks. I'll try that.

seancorfield17:11:46

I have code in my dev setup that hooks into tools.logging and sends all logging to Portal (as well as logging it the normal way). See my dot-clojure repo's dev.clj file.

djblue17:11:31

The difference is that in the url-shortener.console version, I can enable and disable it. I will probably upstream this feature.

Ziad Salah23:11:25

Thanks Sean, I'll check it out.

wilkerlucio14:11:57

@djblue I'm noticing some issues when using Portal in multiple projects in IntelliJ (via plugin), I notice if I have a project using, and then start portal in another project window, in some cases I see the data just moving to the wrong project, and when it happens this also crashes portal in other window it was open (and also notice the layout shifting back to the wrong blue theme)

djblue17:11:17

I feel like this goes back to another issue you brought up with the intellij extension handling multiple projects incorrectly. Might need to read up more on how to handle that. :thumbsup:

🙏 1
mmer19:11:43

I just watched the talk you did for London Clojurians. I may have missed this but the log command is that a portal command or from somewhere else?

djblue19:11:05

log was a macro that tap>s maps with log like data. I would suggest looking at https://github.com/djblue/portal/blob/master/src/portal/console.cljc if you are curious.