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

Refactor WORKSPACE file #1886

Merged
merged 7 commits into from
Apr 24, 2023
Merged

Refactor WORKSPACE file #1886

merged 7 commits into from
Apr 24, 2023

Conversation

ylecornec
Copy link
Member

@ylecornec ylecornec commented Apr 12, 2023

Depends on #1884

This PR refactors the WORKSPACE file by declaring most external repositories definitions to non_modules_deps_*.bzl files,
so they can be used later with bzlmod through module extensions (See here for an example in rules_nixpkgs).

  • A setup_stack option was added to stack_snapshot to optionally disable the installation of stack. Without bzlmod we rely on native.existing_rule to detect whether the stack repo is already set up, but this method is not compatible with bzlmod (See here). This option should only be necessary until a stack_snapshot module extension is implemented for bzlmod.

  • Some more repository rules are updated with an extra register parameter to optionally disable the registration of toolchains, because trying to do so fails in bzlmod.

@ylecornec ylecornec changed the base branch from master to ylecornec/rules_js April 12, 2023 12:32
@ylecornec ylecornec force-pushed the ylecornec/refactor_workspace branch from f055069 to c02358c Compare April 12, 2023 15:00
@ylecornec ylecornec marked this pull request as ready for review April 13, 2023 07:26
@ylecornec ylecornec requested a review from avdv as a code owner April 13, 2023 07:26
@ylecornec ylecornec mentioned this pull request Apr 13, 2023
14 tasks
Base automatically changed from ylecornec/rules_js to master April 17, 2023 14:55
@dpulls
Copy link

dpulls bot commented Apr 17, 2023

🎉 All dependencies have been resolved !

Set this option to false to not try to install stack. This is usefull with bzlmod where we cannot rely on native.existing_rule to figure out if stack was already set up.
Refactor WORKSPACE dependencies in preparation for bzlmod
@ylecornec ylecornec force-pushed the ylecornec/refactor_workspace branch from c02358c to 0c6435f Compare April 19, 2023 14:20
Copy link
Member

@avdv avdv left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

@ylecornec ylecornec added the merge-queue merge on green CI label Apr 24, 2023
@mergify mergify bot merged commit aeb2793 into master Apr 24, 2023
@mergify mergify bot deleted the ylecornec/refactor_workspace branch April 24, 2023 10:52
@mergify mergify bot removed the merge-queue merge on green CI label Apr 24, 2023
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