-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
--incompatible_disable_managed_directories
: deprecate managed_directories()
#15463
Comments
We use The contents of our managed directory change often, and requiring devs to run some command in order to bring their workspace up-to-date would become tiresome. It'd be extra painful for developers using worktrees. It's convenient for it to happen automatically whenever Bazel loads. We don't absolutely need this feature, just chiming in that we currently do rely on it. |
Could you give some motivating examples there? What tooling do you run outside of Bazel, where you'd want versions of those tools to update following a |
When the typescript language server is running, it must be able to find dependencies in order to provide type information and go-to support. Additionally, we use some IDE extensions that rely on the presence of node_modules, such as ESLint and Prettier. Although our definitive "formatter" that runs in CI is powered by Bazel, the IDE extensions improve our developers' dev experience as they get mostly-correct formatting and linting on the files they're working with. It's nice to get this "for free" when Bazel loads rather than needing manual intervention (especially for developers using git worktrees) |
@SrodriguezO : given the "don't absolutely need this feature" part, I won't consider this a blocking issue. Maybe you can get away with putting |
@SrodriguezO I see how that's a handy workflow. But it only happens to work when the user's workflow is
Obviously if you just changed worktrees and then ran the tool, nothing would have updated the node_modules directory. But I understand you have this working okay for you. There's yet another line of reasoning for this change: Having a single As such, I think Bazel core shouldn't have to carry a feature which is particular to just one NodeJS implementation choice, and not inherent to that problem. |
--incompatible_disallow_managed_directories
: deprecate managed_directories()
--incompatible_disable_managed_directories
: deprecate managed_directories()
This change implements the design doc "Deprecating managed_directories". If your build is broken by this change, you can temporarily re-enable the functionality using the `--noincompatible_disable_managed_directories` command line option. Tracking bug: #15463 RELNOTES[INC]: workspace(managed_directories=) is not available anymore. PiperOrigin-RevId: 449469507
Bazel removed `managed_directories` feature on Bazel@HEAD, see: [1]. Design document is here: [2]. Also extend the .bazelignore and add explicitly the path to the node_modules directories. Note, that Bazel currently doesn't support the same semantic as .gitignore. For more details see this issue: [3] and this issue specific to rules_nodejs: [4]. [1] bazelbuild/bazel#15463 [2] https://docs.google.com/document/d/1u9V5RUc7i6Urh8gGfnSurxpWA7JMRtwCi1Pr5BHeE44/edit [3] bazelbuild/bazel#7093 [4] bazelbuild/bazel#8106 Release-Notes: skip Change-Id: I5dc582e05e4116064fc06d438d4b8a8b57b6bb8d
Fixes bazelbuild#15463. The design doc for the deprecation and the removal is available here: https://docs.google.com/document/d/1u9V5RUc7i6Urh8gGfnSurxpWA7JMRtwCi1Pr5BHeE44/edit RELNOTES: --noincompatible_disable_managed_directories, and with that, workspace(managed_directories=) is not supported anymore. PiperOrigin-RevId: 456228902 Change-Id: I5fcbf96b9a508f47cbcabf9715163cd7120020bf
This option is deprecated. The recommended replacement is to add an option to npm_install directives, but we don't have any in this repo. More here: bazelbuild/bazel#15463
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
- Removes deprecated managed_directories, see bazelbuild/bazel#15463 - Fixes issue with @build_bazel_rules_nodejs, see bazel-contrib/rules_nodejs#2733 (comment) - Sets test action to use Ubuntu-20.04 because it's needed for pkg_tar (bazelbuild/bazel#11554) since python2 was removed from Ubuntu after 20.04.
The reasons for deprecation and the migration steps are documented in the design doc:
https://docs.google.com/document/d/1u9V5RUc7i6Urh8gGfnSurxpWA7JMRtwCi1Pr5BHeE44/edit
This represents a loss of functionality for Bazel. We believe this is possible because the motivating use case for
managed_directories()
wasrules_nodejs
, which now recommends against using it.The incompatible flag will remain available for a month.
The text was updated successfully, but these errors were encountered: