-
Notifications
You must be signed in to change notification settings - Fork 521
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
Add freebsd support #2991
Add freebsd support #2991
Conversation
|
CI failure suggests we just missed a spot |
d1d04d1
to
b99dddc
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
@googlebot I consent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
e2b2d43
to
4263e02
Compare
Thank you! |
@googlebot I consent. |
For some reason they don't include cpu constraint
4263e02
to
9daaab9
Compare
Given the prior fix we made to load from 5.x, the range can be updated to support the latest versions
…nto add-freebsd-support
I've sent a PRs to |
Wow you're doing good work in those upstreams. Being able to build node from source makes sense. That's what google does. |
I guess one trick will be that we need node available as a repository rule so you can't use regular actions to build it. The bootstrapping might be hard. |
@yesudeep are you still working on this? If so, you should target the 5.x branch at this point. It has a new toolchain implementation and you won't want to have to port your fix after it lands. |
I've been able to use these patches on top of 4.4.6. So this work is valuable. |
This can be closed with the 5.0 release, since you can now register whatever nodejs toolchains you like not needing any code changes in rules_nodejs. See the /examples/vendored_node_and_yarn |
Can you say more? How does this allow one to use a custom non-linux version? |
@knz you'd fetch nodejs source code, build it with something like rules_foreign_cc, then the resulting binary can be registered in the toolchain. |
Thanks Alex There are two parts here:
This sounds like something regular, so I guess I could do my own research, but if you have examples that would be swell.
This is the part that stumps me. What does "registered in" mean? What is the thing we need to modify to register a binary? |
Full docs here: But the tl;dr is that you need:
If necessary, you can substitute building the node binary as part of the build with using a locally installed version by skipping step 1 and replacing step 2 with:
|
There's an example in the CockroachDB repository here (actually, this whole BUILD file is deps using foreign build systems via various |
Awesome, thanks @mari-crl ! Do you have a few minutes to add your notes to the documentation? I guess probably here https://github.com/bazelbuild/rules_nodejs/blob/stable/docs/Core.md#node_toolchain |
Today I've been playing around with trying to get a locally-installed FreeBSD toolchain working following the steps in #3396 and the example at https://github.com/bazelbuild/rules_nodejs/tree/stable/examples/vendored_node_and_yarn. Without any changes to upstream, the build will still fail in
With the following patch on top of
A more elegant fallthrough in the case that someone is running Then it is necessary to define a new repository named
I also had trouble telling
However, in my case, I also couldn't just Altogether I have a patch that appears to be more or less half-working which I'll post over at cockroachdb/cockroach#74208. |
Update on the above, we have a change in |
@rickystewart sounds like good progress, do you want to land some changes in rules_nodejs so you don't have to carry that patch? looks like this PR needs a rebase or start a new one. |
@alexeagle Sure, I opened #3490. |
Is there still something to add to rules_nodejs to provide this repo? Just a matter of adding some documentation to the toolchains page saying how a user could do it? Or can we close this one now? |
I think the problem now is twofold:
In this case the idea is that on |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
FreeBSD is currently an unsupported platform.
Issue Number: #2990
What is the new behavior?
Adds support to use rules_nodejs on FreeBSD.
Does this PR introduce a breaking change?
Other information