And finally took 10 minutes to dig into the proble...
# development
w
And finally took 10 minutes to dig into the problem I thought I was only on my branch, with Coursier bombing out anytime I try to run
fmt
in pants repo... Turns out it's happening on
main
to and seems to be a problem with Coursier not having ARM64 releases (or maybe just not having them in their Github releases page). https://github.com/pantsbuild/pants/issues/19480
💔 1
Copy code
class CoursierSubsystem(TemplatedExternalTool):    

    default_url_platform_mapping = {
        "macos_arm64": "x86_64-apple-darwin", <-----
        "macos_x86_64": "x86_64-apple-darwin",
        "linux_arm64": "aarch64-pc-linux", <-- Removed in Coursier 2.1
        "linux_x86_64": "x86_64-pc-linux", 
    }
https://github.com/coursier/coursier/issues/2770 Womp womp... Appears that the ARM64 coursiers are here: https://github.com/VirtusLab/coursier-m1
@proud-dentist-22844 Was it you mentioning that you manually disable backends you're not actively using from Pants?
p
I've talked about that possibility with @happy-kitchen-89482 iirc. Disabling the backend can lead to unknown targets in BUILD files though.
w
yeah, I've noticed that - I thought someone on the call mentioned having done it, but I was wondering how they got around it. Some lazy registration concept would be cool on
--changed-since
- though not entirely sure how it could work
c
there is an option to ignore BUILD issues during a bootstrap phase (in order to support loading environment targets during bootstrap before all backends have been registered) which may be leveragable in this direction…
w
Wihch option is that?The only one I see is
build_ignore
which doesn't seem right
c
Sorry, I meant feasible feature we may expose. As an option/alternative to consider, not a pants config option. Overloaded word :p
😆 1
l
@wide-midnight-78598 did you find a workaround for this problem with
pants fmt
and no-Coursier-gz-for-m1? I am running into the same issue and there isn't a .gz for m1 yet.
w
I feel like there was some workaround, but I haven’t been around much for the past couple months for a variety of reasons - so my memory is foggy. I think fundamentally it came down to just manually disabling the plugin, or using some sort of ignore functionality
l
Does this imply that jvm support is not there for pants on M1/M2?
b
@late-advantage-75311, there's a few specific workarounds in the later comments of the the linked issue, mostly about configuring easy ways to skip scalafmt, as SJ recalls
w
Yeah, I think I ended up running commands with
—skip-scalafmt
or something similar attached at the CLI. I will say that the problem wasn’t consistent, which made it harder to track down.
l
Thanks for pointing me that way. my 2 cents on the issue is to see if we can go with the jar-based approach. (option 2 in the issue). that is how brew is doing it.
👍 1