-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
"Failed to locate Java for JDK adopt:1.12.0.2
" error using courier v2.1.6 on ARM mac
#20174
Comments
Filed issue VirtusLab/coursier-m1#79 with Virtus labs, made a PR #20179 to remove 2.1.6 support in pants. I don't think this will be otherwise fixable in time. Apologies again for the shallow testing the first time around. The VirtustLabs M1 coursier is able to do other functions like resolve and fetch dependencies (which I took as sufficient indication that it was working), but the jvm downloading function appears to be currently broken. |
Ok, so slight false alarm here. The actual issue is that the adopt jdk is not available for M1 for the versions we ask for, not that the M1 coursier 2.1.6 is broken. Changing the test to be:
makes them pass on my m1 against
It may be that all we need to do is change the JDKs requested in example-jvm sot that it is compatible with all platforms. |
You can see the behavior here, using the new default in main on an M1 and comparing to the old default in pants main:
The reason we did not get build failures in pants itself I think is because we are set up to use pants/src/python/pants/jvm/subsystems.py Line 51 in e70fe05
Here are the lists of available versions for M1:
but on x86 you have:
@benjyw @huonw I think we can change the jvm versions in the example-jvm repo and we are fine with the existing pants 2.18.0. |
Big thanks to the Virtuslab maintainer |
Is this fixed by the combination of these? |
@huonw I think so, let me try to convince myself by trying to argue for it. Stepping back, the question is what is pants' spec here, rather than its behavior. There is a change in behavior which will manifest as a failure to build for some users who have set things up in a certain way, but is that a bug? Proposed spec
The last bit contains an or and proposes that it is ok to break workflows that worked via emulation if it has become possible to have similar workflows work natively. The specifics of coursier, jvm, kotlin.Before adding the M1/arm coursier versions and bumping the default to v2.1.6 we were quietly using emulation for all of these:
After #19940 (and #20121) which went into pants 2.18.0 we got:
#20184 Fixed the Kotlin analyzer issue, and example-kotlin was also fixed, so now we should be ok. |
Sounds good, thanks |
Describe the bug
Using Pants 2.18.0 in its default configuration in a JVM repo on macOS arm64 seems to hit errors like:
Git bisect narrows it down to #19940. It appears to be Coursier v2.1.6 specifically: reverting back to the previous default version works fine.
Minimal reproducer:
With 2.18.0, this prints (with my comments)
NB. The "OKAY" test still has an error because this repo isn't configured to actually run these tests, but the problem is demonstrated earlier enough. Running that same code with 2.17.0 gives the second error for both runs.
Pants version
2.18.0
OS
macOS
Additional info
https://pantsbuild.slack.com/archives/C0D7TNJHL/p1699843811602729?thread_ts=1699829181.582269&cid=C0D7TNJHL
The text was updated successfully, but these errors were encountered: