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

WIP: Multiple Node Versions in Single Workspace #2148

Closed
wants to merge 4 commits into from

Conversation

parisholley
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #434

What is the new behavior?

User can pass a custom name to node_repositories (allowing multiple node versions at the same time), then the other rules in the project allow setting a customer "node_repository" to point to the custom version.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Submitting this pull as a PR as i'm not all that familiar with bazel and want to get some thought before going all the way down the path of supporting dynamic @nodejs alias names, given there are a quite a few places where the alias is hardedcode and no ctx is available (so some deeper refactoring would be needed).

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@parisholley
Copy link
Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Collaborator

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

cool, looks like a good start, thanks for tackling this!

we should have a test somewhere - maybe update an existing e2e or example to use both node 12 and also node 14

@@ -724,10 +724,16 @@ def node_repositories(**kwargs):
minimum_bazel_version = "2.1.0",
)

# allow user to set a custom name (eg: node11, node12) to support multiple versions
name = kwargs.get('name', 'nodejs')
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can do this in one step - pop returns the element

@alexeagle
Copy link
Collaborator

hey @parisholley any update on this one?

@parisholley
Copy link
Author

i decided to just upgrade everything to latest node so i stopped work on it

@github-actions
Copy link

This Pull Request has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!

@github-actions github-actions bot added the Can Close? We will close this in 30 days if there is no further activity label Mar 24, 2021
@github-actions
Copy link

github-actions bot commented Apr 8, 2021

This PR was automatically closed because it went two weeks without a reply since it was labeled "Can Close?"

@github-actions github-actions bot closed this Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? We will close this in 30 days if there is no further activity cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants