-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
--import
does not work when there is a meta-build
#2966
Comments
We could take this issue as an opportunity to define how it should behave. Since Currently, it only applies to the runtime of the deepest explicitly defined root module. This is the main build when no meta-build is enabled or the deepest meta-build. What we clearly need is the application to the main build. But application to a meta-build is also useful. So, do we simply want it to apply to the runtime of all meta-levels or just to the selected one, which is the level selected with |
@lihaoyi Could you please help out? I'm sure this must be a easy change, but I wasn't able to spot the right place where to forward the runtime classpath from the meta-build to the main build. |
@lefou it looks like we are already propagating the list of
This is meant to then get used as part of the
That then gets included in I'm not actually that familiar with what CLI imports are used for, but it seems to me like it's being propagated. Can you check the |
I checked. In case of a project with a meta-build, the
Same for
|
Can you try one more thing just for debugging, does |
Nope, already checked |
Also, what does this generate?
It's meant to take the |
I see over here https://github.com/com-lihaoyi/mill/blob/main/runner/src/mill/runner/MillBuildRootModule.scala#L120 we're passing |
You can test this without making Mill code changes by |
That's it. I removed the |
And it persists, when I remove the |
great, yeah just cache invalidation issue then. Replacing |
Thanks for looking at it. I'll fix it. |
Would be cool if we could avoid recompilation due to a changed |
I opened #2978 to fix this. |
This is probably possible, but we may need to do some hackery. There are basically two approaches:
|
I chose option 1 in PR #2978, which isn't IMHO that hacky. It solves some convenience issues, (no recompilation, adding external modules without editng We could also try to tighten the resolution of the provided dependencies with coursier. E.g. provide some version intervals to detect incompatibilities (see also coursier/coursier#2891 (comment)), or exclude transitive deps we already provide. |
It looks like the imported dependency is only available in the meta-build (level 1), but not the main build (level 0).
The text was updated successfully, but these errors were encountered: