-
Notifications
You must be signed in to change notification settings - Fork 682
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
(bazel) Set @platforms//os:emscripten for platform_wasm #1363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bazel_dep(name = "platforms", version = "0.0.9") | ||
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -26,6 +26,11 @@ The SHA1 hash in the above `strip_prefix` and `url` parameters correspond to the | |||||||||
newer versions, you'll need to update those. To make use of older versions, change the | ||||||||||
parameter of `emsdk_emscripten_deps()`. Supported versions are listed in `revisions.bzl` | ||||||||||
|
||||||||||
Bazel 7+ additionally requires `platforms` dependencies in the `MODULE.bazel` file. | ||||||||||
```starlark | ||||||||||
bazel_dep(name = "platforms", version = "0.0.9") | ||||||||||
``` | ||||||||||
|
||||||||||
Comment on lines
+29
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This isn't needed: Bzlmod resolves transitive dependencies via Minimum Version Selection, so adding the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand that you are talking about Bazel 7+, but versions 5.4 and/or 6x do not check the MODULE file (by default), so a macro update is needed for older versions. Should we be concerned about Bazel 5x/6x users? → I have no idea 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, this snippet is meant for users pulling in If you do, then this wouldn't be necessary and such users could just load |
||||||||||
|
||||||||||
## Building | ||||||||||
|
||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bazel_dep(name = "platforms", version = "0.0.9") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To properly Bzlmod-ify this so that other Bazel projects can depend on it, you also need to add something like this to the top:
Instead of manually maintaining
<current version>
, you can also use the Publish to BCR app to automate the version bump and releases.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope I understand what you mean xD (I'm still new in bazel).
If it's not a problem, I'll try to do it in the next/separate MR.
Thanks for the tip!