I’m having a bit of a deps issues that used to work fine. Unfortunately the reproduction requires a little bit of work. I’m using a global ~/.clojure/deps.edn with some aliases so that I can do local dev work against multiple of my OSS libs in the context of a target project. Recently (not sure when…been many versions of cursive since I had to do this) IntelliJ gets the source paths wrong and one of my main source folders is not treated like it is on the classpath.
I double-checked that the CLI clj -Spath -A:dev:f3-dev:rad-dev does in fact include the src/main on the CLASSPATH.
I’m running the latest version of everything including the EAP of cursive.
I tried:
• git clean -xfd on all repos to clean out everything. No .idea/iml files
• Updated everything
• Made sure deps was latest
BTW this is https://github.com/cursive-ide/cursive/issues/3022
To reproduce: Check out the following two projects: https://github.com/fulcrologic/fulcro https://github.com/fulcrologic/statecharts And in global ~/.clojure/deps.edn add:
:f3-dev {:override-deps {com.fulcrologic/fulcro {:local/root "PATH_TO/fulcrologic/fulcro"}}}
and then in Cursive turn on the following aliases:This was definitely working a few months ago
If I turn OFF the dev alias, then it’s ok…it’s only when the dev alias is on that it breaks
I suspect that since the dev alias in statecharts is where I include Fulcro (it isn’t in the normal deps) that perhaps that’s where it gets confused.
(but I want the dev alias on, of course, because I’m developing 😄 )
In fact: when I turn ON dev, it drops ALL source paths from the Fulcro project that are top-level, and ONLY uses the ones from the dev alias, even though the dev alias uses the “extra…” options.
Manually duplicating src/main in the dev alias’ extra paths also does not fix it…it’s like there’s some set logic I’m triggering that confuses it
If I rename the alias in the statecharts deps file from dev to sc-dev , then that works as a workaround (I don’t get the dev folder from Fulcro, but I get src/main there). So the workaround is to not have duplicate alias names across projects….well, it still breaks if I turn on :dev alias (src/main disappears), but at least I can work on the derivative project properly.
@tony.kay Sorry for the delay getting to this, I'm trying to reproduce this now. I have the two repos checked out, is the problem when you have the fulcro repo open in Cursive, or the statecharts one? Which source root is missing?
Oh, I see - if I have the state charts repo open, then I get fulcro as another module, but src/main is unmarked there.
it used to work…perhaps I did something weird in deps that confuses it, but deps from the CLI gets it right
Ok, I have this fixed, I'll just have to do some regression testing to make sure that I haven't broken anything. This code hasn't changed in Cursive in forever, so I suspect either something has changed in how you're using deps, or it's possible deps itself has changed something in its disambiguation which might have caused this. Anyway, assuming I don't find anything horrible, this will be fixed for the next build.