Skip to content

Teach os_name() about freebsd-amd64#3490

Merged
alexeagle merged 1 commit intobazel-contrib:stablefrom
cockroachdb:freebsdamd64
Jun 21, 2022
Merged

Teach os_name() about freebsd-amd64#3490
alexeagle merged 1 commit intobazel-contrib:stablefrom
cockroachdb:freebsdamd64

Conversation

@rickystewart
Copy link
Copy Markdown
Contributor

It is possible to use rules_nodejs on operating systems besides
Windows, Linux, and macOS, but they need to be handled in os_name()
or else you get a Unsupported operating system freebsd error message.
This change allows you to add a FreeBSD toolchain to your project by
declaring a nodejs_freebsd_amd64 repo with a bin/node executable.
cockroachdb/cockroach#82762 is an example of this.

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: Add (very partial) support for FreeBSD.

What is the current behavior?

Builds on FreeBSD will fail with an "Unsupported operating system" message.

Issue Number: N/A

What is the new behavior?

Alone, this change does not make it possible to build on FreeBSD, but it does allow you to add your own toolchain that supports FreeBSD without any additional patches to rules_nodejs.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

It is possible to use `rules_nodejs` on operating systems besides
Windows, Linux, and macOS, but they need to be handled in `os_name()`
or else you get a `Unsupported operating system freebsd` error message.
This change allows you to add a FreeBSD toolchain to your project by
declaring a `nodejs_freebsd_amd64` repo with a `bin/node` executable.
cockroachdb/cockroach#82762 is an example of this.
Copy link
Copy Markdown
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.

thanks!

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