Skip to content

Add toggle-workspace.sh to turn WORKSPACE on/off #1638

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

Closed
wants to merge 1 commit into from

Conversation

mbland
Copy link
Contributor

@mbland mbland commented Oct 29, 2024

Description

Updates .bazelrc files to enable or disable WORKSPACE builds, or to restore their original state. Part of testing the Bzlmod work in #1482.

Motivation

Like scripts/sync-bazelversion.sh from #1629 does for .bazelversion files, this makes switching between WORKSPACE and Bzlmod builds fast, easy, and safe. This has made working ahead in my Bzlmod working branch while keeping in sync with pull requests landing on master much smoother.

That said, I understand if it isn't accepted. I'm happy to hold onto it in my working branch to suit my needs if folks don't find it generally useful.

Updates .bazelrc files to enable or disable WORKSPACE builds, or to
restore their original state. Part of testing the Bzlmod work in bazel-contrib#1482.
Copy link
Collaborator

@simuons simuons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @mbland, I'm fine with such script if it helps moving to bzlmod. I guess we just need to remember to remove it once repo is moved to bzlmod so we will never go back to workspace again :)

@mbland
Copy link
Contributor Author

mbland commented Nov 8, 2024

@simuons Heh, for sure. We can remove it with all the WORKSPACE files in the same PR. That said, I'm setting up the Bzlmod changes to coexist with WORKSPACE, so we won't force users to migrate to Bzlmod right away.

Hopefully that compatibility will sweeten the deal and hasten the process—or we can go full YOLO and tell folks they need to add a MODULE.bazel with bazel_dep(name = "rules_scala", version = "7.0.0") next to their WORKSPACE if they want to upgrade. Personally, I'd be OK with that; this project has got me feeling in my bones why WORKSPACE must be destroyed. 🙂

BTW, assuming we're waiting for @liucijus to approve and merge?

@mbland
Copy link
Contributor Author

mbland commented Nov 8, 2024

Actually, I'm glad you didn't merge this yet. I'm closing it now in favor of #1644.

@mbland mbland closed this Nov 8, 2024
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.

2 participants