-
Notifications
You must be signed in to change notification settings - Fork 283
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
Support path mapping #1664
Comments
Path mapping is a "highly experimental" Bazel feature, and I don't believe rules_scala should depend on experimental features. If this path mapping can be optionally enabled, then that would be fine. |
That's valid. At the very least, we'd like to update this ruleset to support path mapping (i.e. satisfying the requirements listed here). Two important things to note are that:
We'd just like the option to enable path mapping, since without it, large, multi-Scala version repositories will suffer immensely from redundant builds. It's for that reason that I'd push for path mapping the most, of any experimental feature we're proposing. From the discussion on path mapping I linked above:
At Lucid Software, I think we could see similarly drastic improvements in build time. |
Where are you getting the "Bazel's best practices for writing rulesets" from? |
From what I understand from the documentation here, here and here, using Path mapping takes this to another extreme by requiring that (1) |
This issue is part of a broader proposal to merge some of the features in lucidsoftware/rules_scala into this ruleset.
The tracking issue for this effort
The relevant proposal section.
Path mapping should prevent issues with targets from being built multiple times in multi-toolchain repositories. These issues are discussed in more detail in the proposal, but the gist is that if a target is depended on under different configurations, it may be built multiple times, even if the difference in configuration doesn't affect how the target is built. This is because what toolchain is used to build a Scala target depends on Bazel builds targets under different output directories, depending on the configuration. Path mapping attempts to solve this by "[rewriting] paths in action command lines with the aim of making them more likely to be disk or remote cache hits", and it's solved this issue for us over at
lucidsoftware/rules_scala
.The text was updated successfully, but these errors were encountered: