This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-15
Channels
- # announcements (2)
- # aws (1)
- # beginners (200)
- # calva (136)
- # cider (32)
- # clj-kondo (1)
- # cljs-dev (14)
- # cljsrn (19)
- # clojure (147)
- # clojure-argentina (1)
- # clojure-dev (144)
- # clojure-nl (2)
- # clojure-spec (14)
- # clojure-turkiye (1)
- # clojure-uk (1)
- # clojurescript (7)
- # data-science (1)
- # datomic (5)
- # duct (6)
- # figwheel (2)
- # fulcro (4)
- # graalvm (10)
- # graphql (1)
- # immutant (1)
- # joker (4)
- # off-topic (30)
- # om (1)
- # re-frame (11)
- # reagent (2)
- # reitit (4)
- # shadow-cljs (63)
- # testing (1)
- # tools-deps (7)
I think Calva treats *.joker files as Clojure files. I wasn't aware of that other forehand extension. I can add it to Calva.
Now I don’t find any reference to any file extension at all … did I dream that up, maybe. How strange.
https://github.com/boot-clj/boot As reference for you :)
I had sort of dreamt it. This is provided by vscode’s built in Clojure extension: https://github.com/microsoft/vscode/blob/master/extensions/clojure/package.json
But I have experimented with bringing that inside Calva. And I did bring the grammar part in. Maybe Calva should take over the rest as well. It is not like Microsoft maintain the Clojure support very actively.
Regarding boot, what would be more important is to support boot jack-in. Do you use boot, @slack1038?
No not really Only when i Update some cljsjs package Reagrding the Support by vscode: well i have to Set the File extension to clojure everytime becaus now Code highlighting
Here’s a build adding Clojure associations to .joke
, and .boot
. @hairfire, @slack1038
Is there a way to get notifications about one file changing in some Github repo? I’d like to know if they change that file in the vscode repo…
@slack1038 you can also instead merge in upstream/master, I just pushed the change
https://app.github-file-watcher.com/ Here for the notifications Will Do later and also test it :)
calva-friends: I’ve changed to webpack for the production builds. From my testing it seems to install much faster now and things seem to work. Can you help me test this package some, in case there is some problem lurking in there that I have missed?
This also meant some reconfiguration for the dev watchers, so anyone who is hacking on Calva, please merge in upstream/master
. ping @slack1038 @brandon.ringe
I haven't tried this yet, since I'm not doing much CLJS at the moment...but I think my question applies to calva and nrepl in general. does calva start one repl for the whole project? it's not per file right? and can I start up a clojure session and clojurescript session simultaneously if I'm doing full stack development?
@gerred for cljs projects calva starts four nrepl sessions, actually. One clj repl backing all clj files, one clj repl for the clj repl window, one cljs repl backing all cljs files and one cljs repl backing the cljs repl window. For cljc files there is a toggle button in the status bar for choosing which file backing repl should be used.
is there a function there I can make a keymap binding for that toggle? happy to document that if there is.
When you jack in to a cljs project (Calva does not support self hosted, only jvm projects) both a clj and a cljs repl window will open.
interesting. ok, why one for all clj files and one for the repl window? so they're effectively different execution environments
when I've sent a form over to the repl window, I've been assuming I'm in the same execution environment
newer to clojure so I could be misunderstanding. if I eval a form in the clj repl for backing all files (append as a comment), then switch over to the repl, is say...
"why one for all clj files and one for the repl window" @gerred I don't think that's what he meant
I'm just trying to understand when I evaluate a form, where I've evaluated it and what are the rules when I evaluate in one clj session and don't in the other.
The there are two nrepl sessions. One for the files and one for the repl window. Since it is clojure they will share the same idea about the system. So if something is defed in a file (evaluated) it will be defed in the repl window session as well.
and is it true for something I've now written post-startup, and evaluated after evaluating the files.
Okay reading the backlog, I can see that I went said something the opposite of which is true lol
I think I'm confused about "same idea about the system" between different nrepl sessions.
I guess these aren't separate JVMs running for two separate instances of my application
let's say I want that behavior, I'm working on two totally separate applications that I want that disconnect between, but they're related (let's say I'm working on two microservices in this contrived example, and I want to write code on both at once)
and let's say I'm using a monorepo in my contrived example. I'm not, and I'm not doing microservices right now, just to be clear.
is there a way I can get two separate full on applications running, each with their own set of repls, from the same "project", because I've for some reason set this up as a monorepo? or is my constraint now that I open up two different vscode instances, each in the root directory for that particular service, and screw the monorepo
(with the exception question of dealing with shared code between two services in said monorepo)
(if the answer is: why are you doing that, you can totally just run your individual services separately from one repl by running the serve function on each, that's a perfectly good answer too)
^ my scars are definitely driven by the Go + monorepo culture I've been in a bit lately doing kubernetes development, where this is pretty common
But, the way stuff like figwheel works, if you set it up right, you can have many browser tabs (or clients anywhere in the world) connect to the repl and you can switch between connected execution environments with the repl special focus
macro
and really cool. so I could have a couple tabs open, playing with different options, and selecting the sessions I want to focus on for whatever I'm trying
You can also set it so that repl commands broadcast to all connected evaluation envs, IIRC
sorry, this probably has expanded beyond a #calva-dev scoped conversation. super helpful though.
you and I are working on our site, we each have figwheel sessions going to the running app, but each trying out things only scoped to our own local tabs since we're using live share's server share
oh, how does calva work with vscode live share? am I using the host's nrepl sessions when I evaluate a form, or is it running on a local session/app?
so somebody just mentioned this in another channel: https://github.com/GoogleChromeLabs/jsvu It'd be really interesting to have multiple cljs repls up - like shadow repls - where repl commands are broadcast to each vm type, with feedback on deviations in engines, while you're repling
it works with live share, but people do not see each other’s evaluations and stuff. That is on the todo to implement.
i'm going to carve out some time to contribute for sure once I get fully comfortable with the edges of it today
"i'm only running on chrome right now for anything visual, but this is totally valid and evaluates correctly in spidermonkey, right?" - @john
so if for some reason @pez I have a monorepo the answer is to just open up two different vscode instances and treat them totally separately
this wouldn't work for any shared code between the two things in that monorepo. maybe setting a calva root for each one would be valuable idk. or don't use monorepos and point deps.edn at your filesystem 😉
I almost do not know what a monorepo is, so can’t really advice much. But I don’t think different calva project roots would work either, because that’s either a user or a workspace setting…
I think monorepo support demands that we get hold of someone with experience with those with clojure.
We can also check with the cider people if monorepos are supported there, and how they do it.
But it is not highest on my todo list right now. There are so many pressing things to take care of.
Yeah, no worries. Calva is pretty bare bones, so you should soon have figured then out. 😎
Since the repl is the exploratory mechanism, it'd be nice to get cross-engine coverage during your exploration
Yeah, if you for some reason have a monorepo, I think you’re option is two different vscode windows/workspaces.
When I add new dep in deps.edn, Do I need to restart repl or there is a way to auto reloading new dep ?
Maybe someone in #tools-deps knows more about that, @minhnhat10bk
@pez I just re-cloned the repo, ran npm install, ran the Watch CLJS task, and then when I run Watch TS I get an error
> Executing task: npm run watch-ts <
> [email protected] watch-ts C:\Development\calva
> rm -rf ./out/* && rm ./tsconfig.tsbuildinfo && tsc -watch -p ./tsconfig.json
rm: cannot remove './tsconfig.tsbuildinfo': No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch-ts: `rm -rf ./out/* && rm ./tsconfig.tsbuildinfo && tsc -watch -p ./tsconfig.json
`I don't think removing that tsconfig.tsbuildinfo
file is necessary, because I notice when I build without removing, it just overwrites it. I think the && rm ./tsconfig.tsbuildinfo
needs to be removed to avoid errors on first-time builds.
Ok, was getting a weird issue after doing that and trying to run jack-in in debug mode (it could not find the extension). I reset it back to the current state of master, and now when I run the extension in debug mode and try to run the jack-in task, I get this error notification.
If I revert back to 337f2d9ce81591fdc83f1bdd20f73c7ac95a0133
(June 11, the one I've been running in debug from), jack-in works fine, so I think something is indeed broken.
About removing the tsbuild file. It has to do with the build of the production package. It builds only one file. If the tsbuild cache is kept after that, the computer thinks there is no work needed to be done.
@pez Oh ok. Well, it's going to cause an error for anyone who freshly clones the project and tries to run the Watch TS build task, until they either run it without that part of the task command, or until they create a dummy tsconfig.tsbuildinfo file.