-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Not bundling @platforms, or at least not downgrading it? #3071
Comments
I think I'm seeing an issue related to this in my build after trying to move to 0.30.0
If I use platforms 0.0.5 then I get this error
|
Have either of you found a workaround that doesn't require patching rules_go itself? Like @bizrad, I too tried puling in the "platforms" repository myself, but it doesn't help. It's worth noting that for my targets, the one that fails involves a dependency on the modernc.org/libc Go module. The BUILD.bazel file generated for it includes a target with a "deps" attribute value that uses Find that generated BUILD.bazel file here, with the "txt" extension tacked on to appease GitHub. |
Having run into this problem building on macOS atop an Intel CPU, I also tried building using Ubuntu Linux in a GitHub Actions runner. It yielded a similar error, but with different details, matching the earlier report here in #3071 (comment):
|
Downgrading rules_go to version 0.29.0 allows our targets to build properly again. |
We actually had an issue with reproducibility in 0.29.0 related to cgo, so I pinned our version to a commit between 29 and 30 for now. I mentioned this over on #3070 (comment) and that is one fix to get a newer rules_go. However, it appears this issue is over in gazelle and how it dynamically makes the BUILD files in remote repos like you say. Looks like a merge has happened to fix this, so we need a new version cut of gazelle or you can try using the latest commit of the main branch or patch the file. MR to fix this: bazel-contrib/bazel-gazelle#1168 I was able to build with the latest commit of gazelle, no idea how stable it is though.
|
Heads all that I'd tossed up a PR proposing a fix a little while ago in #3076. |
My builds are now working with bazel 5.0.0, rules_go 0.31.0 and gazelle 0.25.0. |
I found that the upgrade to gazelle version 0.25.0 did the trick. Thank you for the recommendation, Brad. |
I'm running on Bazel 6.3, Gazelle 0.25 and rules_go 41.1 but have had no luck. I seem to be experiencing the exact same issue as mentioned by @seh. I was trying to pull in a library that had modernc as a dependency and was complaining that While I roughly understand the issue, I don't understand why the modernc dep is getting generated with a different set of platforms than rules_go uses? If rules_go doesn't generate the modernc deps, then what does? |
I take it back, upgrading to a version past 0.24 of Gazelle worked for me as well. I just hadn't updated my sha256 so it was still downloading 0.24 without me knowing... |
Hi Bazel Go folks :)
I ran into a hitch that I thought I should raise for discussion. To make a long story short: My team had stumbled around for a bit before someone helped us realize that, by default, rules_go was downgrading bazelbuild/platforms dependency below the version bundled with Bazel.
[For more details: _maybe doesn't capture the existence of the built in platforms. An older version of rules_go was getting pulled in by the latest gRPC, and that version of rules_go was overriding the latest built-in platforms with a much older, problematic version of platforms. While this can be worked around by manually importing platforms, I suspect I'm not the last person to get tripped up by this. That is, with the current behavior, today's rules_go is likely to be tomorrow's out-of-date version, causing confusion when it breaks unrelated parts of someone else's build.]
I'm writing to ask if rules_go would consider not downgrading the built in platforms.
Some options that occur:
_maybe
not detecting builtins?Thanks so much for your consideration!
Chris
(ex-Googler)
The text was updated successfully, but these errors were encountered: