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

[FR]: re-introduce "managed_directories" workflow #854

Open
1 task
alexeagle opened this issue Feb 7, 2023 · 0 comments
Open
1 task

[FR]: re-introduce "managed_directories" workflow #854

alexeagle opened this issue Feb 7, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request funding needed Contribute to https://opencollective.com/aspect-build

Comments

@alexeagle
Copy link
Member

alexeagle commented Feb 7, 2023

What is the current behavior?

Back in rules_nodejs, we had Bazel add a managed_directories feature so that the node_modules tree only has to be installed once, and can be symlinked from Bazel's copy back to the source tree.

Now that it's been removed (https://docs.google.com/document/d/1u9V5RUc7i6Urh8gGfnSurxpWA7JMRtwCi1Pr5BHeE44/edit) users just have to pnpm install in their source tree again, and that can drift out-of-date from the node_modules tree that rules_js manages behind the scenes.

Bazel itself is in the way here, however the Aspect CLI gives us the necessary spot to add such a feature, as it can keep all the wksp/path/to/pkg/node_modules symlinks updated and pointing into the bazel-out tree where we create them.

Describe the feature

Allows users to configure the build so that local tooling like editors "just works" after the first bazel build.

Implementation Notes

Symlinking node_modules into bazel-bin:

  • ✅ navigates into bazel-bin for third-party packages (if that package has been built by bazel)
  • ✅ navigates into local source for pnpm project references which do not use out/rootDir
  • ❌ navigates into bazel-bin for pnpm projects with out/rootDir

Fund our work

@alexeagle alexeagle added the enhancement New feature or request label Feb 7, 2023
@github-actions github-actions bot added the untriaged Requires traige label Feb 7, 2023
@gregmagolan gregmagolan removed the untriaged Requires traige label Feb 7, 2023
@gregmagolan gregmagolan moved this to 📋 Backlog in Open Source Feb 7, 2023
@alexeagle alexeagle added the funding needed Contribute to https://opencollective.com/aspect-build label Mar 14, 2023
@alexeagle alexeagle assigned jbedard and unassigned gregmagolan Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request funding needed Contribute to https://opencollective.com/aspect-build
Projects
No open projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants