-
Notifications
You must be signed in to change notification settings - Fork 21
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
Zinc Analysis does not provide source file dependencies from other maven modules #27
Comments
@natansil I'm glad the demo project helped in finding out what the issue is. And I'm glad to, not only because Bazel is awesome and anybody should be able to migrate away from the relic that is Maven with the least effort using your amazing migrator :) Does it also account for the duplicate targets I've seen in that are generated in the package level BUILD.bazel files, or couldn't you replicate this using the demo project? Wish you good luck in the effort trying to realize the best option! |
I'll take a look if I see duplicates and get back to you. |
Update: After going down multiple rabbit holes, I've focused on getting the One important note: scala-maven-plugin version 4.0.0 upgraded zinc dependency from So the next AIs is to see how the @ittaiz WDYT? @D0rmouse I plan on working on this during sporadic evenings and weekends, so I really can't promise quick resolution. I may be able to get some help from some colleagues but that would also take time. |
Sounds good.
Were you able to confirm that in SBT zinc does show this cross module?
On Sun, 24 Nov 2019 at 11:15 Natan Silnitsky ***@***.***> wrote:
Update: After going down multiple rabbit holes, I've focused on getting
the relations output files to contain the class-name cross-module
dependency (so that Exodus can use it in a 2-pass fashion to gather the
source file cross-module dependencies). currently, it only contains the
binary jar name. I've tried to look at the interaction between
scala-maven-plugin and zinc.
One important note: scala-maven-plugin version 4.0.0 upgraded zinc
dependency from 0.3.15 to 1.2.5 and with it the compile.relations files
disappeared! (maybe this
<davidB/scala-maven-plugin@ba7ab93#diff-04deabfe39517b4bc4d074ee47d1cc2dL76>
change caused it)
So the next AIs is to see how the relations file can be resurrected and
then how to add the class-name dep from the binary jar (The information is
present in Zinc - I'm almost positive).
@ittaiz <https://github.com/ittaiz> WDYT?
@D0rmouse <https://github.com/D0rmouse> I plan on working on this during
sporadic evenings and weekends, so I really can't promise quick resolution.
I may be able to get some help from some colleagues but that would also
take time.
If you want to check out the plugin code and see how to resurrect the
relations file that would be great...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQQF6LVKBPYUM34Z6726LQVJA3ZANCNFSM4JPGJ2JA>
.
--
*Ittai Zeidman*
Cell: 054-6735021
40 Hanamal street, Tel Aviv, Israel
<http://www.wix.com>
|
I saw that in Maven, the cross module is shown, but as a binary jar, and also saw zinc code that is related to binary dependency information, so I'm not sure I need to check with SBT as well. |
Remember what the dormouse said xD
I've created several builds for our monorepo using commit filters. It's not ideal, but workable for now. I wasn't prepared to give up the single version advantage. |
Can you please give a little more detail on your process and what are you trying to solve? |
In our CI/CD environment (Azure DevOps) we're running several maven builds for our products in the monorepo by using commit filters. For instance, if a changeset touches Of course, preferably, you'd want your build tool to figure out what to build, like Bazel can, and then incrementally build and test. But that's not really possible with Maven. Since we cannot really migrate to Bazel quickly at the moment, I've taken the above approach for now. |
I see. thanks for the detailed explanation! |
Hi @D0rmouse. |
Hi @natansil :) |
Glad to hear you're ok :) I'm doing great. WFH of course. I ran the new exodus version on the exodus-demo repo. There are spring related errors - but that is to be expected - some of these dependencies only appear in runtime. so analysis tools have a hard time with them. also a small issue due to mix junit4/junit5 in the project So Do you know anyone in the company where you tried this migration, that will be interested to continue your efforts? How big is your current codebase :) |
Sorry took a while... |
We consolidated the repos to around 50. But as long as you have a shared remote repo cache, I'm not sure how worse the build performance would be. |
@D0rmouse, Unfortunately, with the help of your repo, I can indeed verify that maven's scala-plugin zinc-analysis does not provide source file dependencies from other maven modules.
What it does instead, is to provide the binary jar that the dependency comes from:
e.g. from your repo:
I take full responsibility for missing this.
Two options I see:
This will mean more coarse-grain granularity for most of the dependencies.
I'm not sure it's feasible as this will mean that zinc compilation will work really hard and may run into limitations.
My intention for now is to try to work on 2. and see if it feasible.
If not then we can try option 1.
I apologise for this predicament.
Will keep you updated on my progress...
CC: @ittaiz
The text was updated successfully, but these errors were encountered: