-
-
Notifications
You must be signed in to change notification settings - Fork 520
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
base: main
Are you sure you want to change the base?
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? |
Well,
I can restructure the example to exclude vendoring, which cuts out all
those files. The example still does the same just without the third
partyfolder.
If that's prefered, i push out a patch probably tomorrow.
…On Mon, Feb 3, 2025 at 18:30 Yun Peng ***@***.***> wrote:
The number of files for "07-deps-vendor" went up by a lot, is this
absolutely necessary in the example?
—
Reply to this email directly, view it on GitHub
<#548 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFYR7XHZPLPU7SR3ZUZKGXD2N5AODAVCNFSM6AAAAABWKDSMMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZQGU2TAMZRGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I just looked at the sample code and it's actually the vendoring example.
This is an ugly topic because remote vendoring has changed a lot. Let me
ask on the rules_rust slack to figure that one out. I'm only using local
vendoring for a number of reasons but it's time to figure local vendoring
out again.
…On Mon, Feb 3, 2025 at 19:01 Marvin Hansen ***@***.***> wrote:
Well,
I can restructure the example to exclude vendoring, which cuts out all
those files. The example still does the same just without the third
partyfolder.
If that's prefered, i push out a patch probably tomorrow.
On Mon, Feb 3, 2025 at 18:30 Yun Peng ***@***.***> wrote:
> The number of files for "07-deps-vendor" went up by a lot, is this
> absolutely necessary in the example?
>
> —
> Reply to this email directly, view it on GitHub
> <#548 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AFYR7XHZPLPU7SR3ZUZKGXD2N5AODAVCNFSM6AAAAABWKDSMMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZQGU2TAMZRGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
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:
***@***.***>
|
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