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

node_modules linker refactor #19

Closed
wants to merge 6 commits into from
Closed

Conversation

Silic0nS0ldier
Copy link
Contributor

@Silic0nS0ldier Silic0nS0ldier commented Nov 15, 2023

This PR adds a new node_modules linker script and;

  • Adds Rules JS and Rules TS.
  • Adds dependencies via pnpm.
  • Indirectly adds Rules NodeJS v5.

The linker script itself is a refactor which constraints node_modules symlink creation to under [name].runfiles/, and performs the symlink creation in a fault tolerant manner (as multiple processes may be trying to create it at the same time).

This also includes part of a workaround for environments such as EngFlow which reset [name].runfiles/ when using remote persistent workers, where the information needed to create symlinks is exposed to user code (where it can be run in each worker loop iteration).

TODO

  • Move distributed part of linker script so consumers don't attempt to process internal/linker/BUILD.bazel which loads dev dependencies.
  • Rework PR description. Include explanation for why Rules JS dependency brought in.

@Silic0nS0ldier
Copy link
Contributor Author

Builtin build_bazel_rules_typescript depends on io_bazel_rules_go.
New dependency rules_ts depends on a different version of io_bazel_rules_go.

This approach isn't going to work. Closing this PR, will create a fresh one reusing the existing build logic.

For future reference, build logic in this PR came from 2b408d9.

@Silic0nS0ldier Silic0nS0ldier deleted the jordan-mele_nm-linker branch December 6, 2023 23:36
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.

1 participant