Skip to content
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

Allow using multiple stack snapshots in a MODULE.bazel #1962

Closed
wants to merge 3 commits into from

Conversation

avdv
Copy link
Member

@avdv avdv commented Sep 15, 2023

Fixes #1960

Add a `name` to the stack_snapshot tag which can be referenced from other tags
of the extension using the `snapshot` attribute.

The tags are then grouped by the snapshot name, and a stack snapshot is created.
Only the first snapshot sets up the global stack tool repository.

Fixes #1960
@avdv avdv requested a review from aherrmann September 15, 2023 14:54
@avdv avdv force-pushed the bzlmod-multiple-stack-snapshots branch from 73cdb0f to 344a1f9 Compare September 18, 2023 05:13
This makes use of the multiple snapshot support.
@avdv avdv force-pushed the bzlmod-multiple-stack-snapshots branch from 344a1f9 to f6e21ea Compare September 18, 2023 05:27
@aherrmann
Copy link
Member

Why not simply use isolated extensions to that end as implemented here? The feature should be available as of Bazel 6.3.0.

The main concern with naming snapshots is that it can easily lead to collisions across modules. E.g. what if two separate Bazel modules declare two separate snapshots called 'vector'?

@avdv
Copy link
Member Author

avdv commented Sep 19, 2023

Why not simply use isolated extensions to that end as implemented here? The feature should be available as of Bazel 6.3.0.

Oh yes, we are on Bazel 6.2.0 currently. Will need to update.

And also, the experimental warning for the isolate argument put me a bit off:

Experimental. This parameter is experimental and may change at any time. Please do not depend on it. It may be enabled on an experimental basis by setting ---experimental_isolated_extension_usages

With hoping that's the way forward, closing this PR.

@aherrmann
Copy link
Member

With hoping that's the way forward, closing this PR.

It wasn't closed, yet. I'm assuming that that was the intention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support defining multiple stackage snapshots in module extension
2 participants