-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
Fix for Rust examples 8 - 9 #548
Conversation
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
# Conflicts: # rust-examples/02-hello-cross/MODULE.bazel
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
The number of files for "07-deps-vendor" went up by a lot, is this absolutely necessary in the example? |
Bzlmod also offers a native vendor mode: https://bazel.build/external/vendor, not sure if it should be preferred. |
I actually tried native bzlmod vendoring once and after having downloaded
about 25GB of every Bazel rule for every platform under the sun, I decided
it's really only for total corner cases i.e. air gapped builds. In all
fairness, the official documentation says basically the same so it's really
only for those who need a total level of hermitic isolation. I would skip
this for the rust examples.
The tricky thing with rules_rust is, there are actually 4 different vendor
modes and I sense it's about high time to set the record straight and
document that correctly in the examples.
Let me think this through and update the example in a sensible way.
…On Mon, Feb 3, 2025 at 21:08 Yun Peng ***@***.***> wrote:
Bzlmod also offers a native vendor mode:
https://bazel.build/external/vendor, not sure if it should be preferred.
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFYR7XBOCJA3YS6EXSLZUQT2N5S4ZAVCNFSM6AAAAABWKDSMMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZQHE3DEMJZGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
😅, I guess that's before we implemented vendoring targets? With https://bazel.build/external/vendor#vendor-target-dependencies, the Bzlmod vendor mode will only vendor dependencies required to build your targets for the current configuration, which should be much less dependencies than vendoring the whole world. |
That's exactly right, I tried out the very first version that came out...
I give it another try when I find a bit of time because vendoring target
sounds about right to me...👍👍👍
Thanks for the info.
…On Mon, Feb 3, 2025 at 22:35 Yun Peng ***@***.***> wrote:
I actually tried native bzlmod vendoring once and after having downloaded
about 25GB of every Bazel rule for every platform under the sun
😅, I guess that's before we implemented vendoring targets? With
https://bazel.build/external/vendor#vendor-target-dependencies, the
Bzlmod vendor mode will only vendor dependencies required to build your
targets for the current configuration, which should be much less
dependencies than vendoring the whole world.
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFYR7XD5EMHZAA2KRFOUUYT2N55C7AVCNFSM6AAAAABWKDSMMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZRGE3TONZVGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
…to vendor them before build/ Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
Can I pick up your brain? I had the idea to just remove the vendored folder from example 7, add the vendor target to CI, and update the Readme There are a few options:
The actual crux is, when I looked into Rust vendoring again, I realized I may have to split the example into That means, whatever resolution for example 7 will be reached, it only lasts as long until I find the time to |
Have you tried https://github.com/bazelbuild/continuous-integration?tab=readme-ov-file#running-commands-shell-scripts-or-binary-targets? Using either I'm really not a big fan of checking in 5k+ generated files if we don't have to. |
Perfect.
Let me try the run target and if that works, i just delete the vendored
folder. Didn't know the option exists so thanks for the docs.
…On Mon, Feb 10, 2025 at 19:26 Yun Peng ***@***.***> wrote:
Have you tried
https://github.com/bazelbuild/continuous-integration?tab=readme-ov-file#running-commands-shell-scripts-or-binary-targets?
Using either shell_commands or run_targets?
I'm really not a big fan of checking in 5k+ generated files if we don't
have to.
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFYR7XG4ZKH4YPZYI7RANYT2PCEFHAVCNFSM6AAAAABWKDSMMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBXG4YDGNZYG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Signed-off-by: Marvin Hansen <[email protected]>
Signed-off-by: Marvin Hansen <[email protected]>
And that did the trick; |
Nice! But I still see 5k+ changed? Looks like there are more files to delete? |
…ADME.md accordingly. Signed-off-by: Marvin Hansen <[email protected]>
…eleted vendored folder. Signed-off-by: Marvin Hansen <[email protected]>
Yeap, fixed up Rust example 8 and 9. |
Thanks! |
Last batch of fixed up Rust examples.
Example 8 got a major makeover b/c the latest rules_rust separated into multiple sub-modules,
which required quite some refactoring.
Resolves #540