Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project configuration shadow-cljs + deps.edn doesn't work #1253

Closed
PEZ opened this issue Aug 7, 2021 · 9 comments
Closed

Project configuration shadow-cljs + deps.edn doesn't work #1253

PEZ opened this issue Aug 7, 2021 · 9 comments
Labels
bug Something isn't working connect jack-in

Comments

@PEZ
Copy link
Collaborator

PEZ commented Aug 7, 2021

We should probably remove it, because it does not really make sense anyway. At least I can't figure out how it would make sense. If shadow is configured to use deps.edn than the shadow-cljs project type should be used.

@PEZ PEZ added bug Something isn't working jack-in connect labels Aug 7, 2021
@p-himik
Copy link

p-himik commented Aug 8, 2021

One thing worth mentioning - if shadow-cljs uses deps.edn, you can no longer use its -d CLI flag to add a dependency, like Calva does right now.

@PEZ
Copy link
Collaborator Author

PEZ commented Aug 8, 2021

Hmm, are you referring to the warning:

=============================================================================
WARNING: The configured :dependencies in shadow-cljs.edn were ignored!
         When using :deps they must be configured in deps.edn
==============================================================================

?

It might be that shadow-cljs is ignoring the dependency, but that it still triggers its behaviour to load cider-nrepl things to the REPL. Things do work as expected from a Calva perspective. I think we need @thheller's guidance here.

@p-himik
Copy link

p-himik commented Aug 8, 2021

Yeah, that's what I meant.
That definitely looked suspicious to me especially given that I have no idea how Calva's REPL works and why exactly that dependency is needed.

@PEZ
Copy link
Collaborator Author

PEZ commented Aug 8, 2021

I agree it is very confusing. Let's hope there is a way we can get rid of the warning.

Calva is a cider-nrepl client. That's what is meant with Distilled from CIDER.

@thheller
Copy link
Contributor

thheller commented Aug 8, 2021

I don't know what you are talking about.

The above warning you get when you configure :source-paths and/or :dependencies in shadow-cljs.edn while also using :deps true-ish-thing.

I don't know what else you are refering to here. Running shadow-cljs with deps.edn definitely works totally fine.

@thheller
Copy link
Contributor

thheller commented Aug 8, 2021

@p-himik -d works fine when deps.edn and lein as well as shadow-cljs.edn last time I checked. If not please open an issue.

@PEZ
Copy link
Collaborator Author

PEZ commented Aug 8, 2021

@thheller We get the warning when injecting the cider-nrepl dependency using the -d option. So in a project I have there is this shadow-cljs.edn:

{:deps true
 :dev-http {8080 "target/"}
 :builds {:app {:output-dir "target/"
                :asset-path "."
                :target :browser
                :modules {:main {:init-fn app.main/main!}}
                :devtools {:after-load app.main/reload!}}}}

And this deps.edn

{:paths ["src"]
 :deps {thheller/shadow-cljs {:mvn/version "2.15.2"}}}

Then starting the REPL using Calva:

npx shadow-cljs -d cider/cider-nrepl:0.26.0 watch :app
shadow-cljs - config: /Users/pez/Projects/tests/minimal-shadow-cljs-browser/shadow-cljs.edn
shadow-cljs - starting via "clojure"
=============================================================================
WARNING: The configured :dependencies in shadow-cljs.edn were ignored!
         When using :deps they must be configured in deps.edn
==============================================================================
shadow-cljs - HTTP server available at http://localhost:8080
shadow-cljs - server version: 2.15.2 running at http://localhost:9630
shadow-cljs - nREPL server started on port 62475
shadow-cljs - watching build :app
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (120 files, 0 compiled, 0 warnings, 2,11s)

Everything works great, but users might be led to believe something is wrong because of that warning.

@PEZ
Copy link
Collaborator Author

PEZ commented Aug 8, 2021

Shall I report this as an issue on shadow-cljs?

@thheller
Copy link
Contributor

thheller commented Aug 8, 2021

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working connect jack-in
Projects
None yet
Development

No branches or pull requests

3 participants