Open lensgolda opened 4 months ago
VSCodium
Version: 1.88.1
Release: 24104
Commit: 0d01a72525276e5e3771fe5851b9c83de0de1e2b
Date: 2024-04-13T02:09:27.708Z
Electron: 28.2.8
ElectronBuildId: undefined
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin x64 23.4.0
Hi!
What may work is to define a :job-dev
alias in your user deps.edn
and then specify that alias in menuSelections.cljAliases
of the connect sequence. If that doesn't work (not recalling whether Calva insists on that these aliases are defined in the project) there is also a setting calva.myCljAliases
, but having that in your user settings may mess up your work with other projects...
Probably the best solution would be to agree with the team mates that :load-hashp
should be its own alias.
Also, I may be missing something. Could be interesting to learn what your team mates do. Because it seems most people will be using nREPL and that :dev
alias will be shutting the door to start the nREPL server via main-opts for them as well.
i think it's because of main-opts
in :dev
alias and the way Calva starts nrepl
-M:dev:test ->|-m|<- nrepl.cmdline
and my :main-opts ["-e" "(require,'hashp.core)(require,'user.my)"]
should or
-M:dev:test -m nrepl.cmdline -e "(require,'hashp.core)"
):main-opts
-key be removed
and the last - works fine.For some reasons, it works for my teammates without pain, beacause they mainly use Cursive or neovim, maybe beacause REPL starts for them another way, i don't know.
Anyway, the only one way i know it works like a charm - if i remove :main-opts
-key at all, and, for example, add this code to eval under afterCLJReplJackInCode": "(require 'hashp.core) (require 'user.my)"
So if the best solution is to agree with the team mates, i will. There was a hope about another way.
Thanks!
P.S. i think you may close.
Today Calva throws in the towel if the alias has a main opts. (It should inform/warn you about this in the alias select menu.) Maybe we could make that more sophisticated and merge if we can see that the main opts do not have a -m
option and then merge the opts. Maybe that is what the other tools do, even.
Let's keep this issue open until we have figured out if we should fix anything.
Meanwhile, since you know what command line would fix it for you, I think you could leverage Jack-in custom command lines to dodge the problem.
Cheers!
my job project has this
:dev
alias withmain-opts "-e"
eval option, under the Git. When i starting Calva Jack-in process, it exited withStatus 0
.Connection log:
If i comment line with
;; :main-opts ["-e" "(require,'hashp.core)(require,'user.my)"]
everything works fine (REPL starts). If i comment line with;; :main-opts ["-e" "(require,'hashp.core)(require,'user.my)"]
and add connect sequence like so, everything also works fine:The problem is i have to comment line each time starting a project, beacause i don't control
deps.edn
, and it coming from Git for me and i can't push changes like this to Git. I have to revert changes indeps.edn
each time.Is there any way to leave
deps.edn
unchanged to Start Calva REPL this:dev
alias, with or without this optionBest! Thanks!