Open eachirei opened 5 years ago
It looks like multi_sass_binary
isn't actually using the srcs to generate the Sass command line; it's implicitly assuming that all Sass files will be compiled. @kyliau, would you be able to look into fixing that? We should probably generate a separate input:output
pair ourselves for each source file.
As an aside, it's a good idea to avoid multi_sass_binary
when doing anything complex. It's provided as a way of getting projects up and running quickly, but it doesn't provide any tracking of the actual dependency tree of Sass files so it'll end up doing a lot of extra work on each recompilation that would be avoided with fine-grained use of sass_library
and sass_binary
.
How should I write a bazel file for an angular module with multiple components without multi_sass_binary
and without modifying it each time we add or remove a new component? Cause that can become quite a hassle, especially for new developers coming to the project. I'm not asking this in a mean way, I'm just trying to understand better the whole bazel environment.
In general, you should expect to update your BUILD files whenever you change the dependency structure of your app. That's an inherent constraint of incremental rebuilds in a builds system like Bazel where the configuration is defined strictly independently of the contents of the input files.
You can mitigate this overhead with an automated BUILD file generator; https://github.com/bazelbuild/rules_sass/pull/75 is a work in progress in that direction.
👍 Same problem.
Reproduction: Folder sass_test, containing empty files A.scss and B.scss.
Output
Am I doing something wrong? The use-case would be the following: Angular project, has 2 modules inside same folder for convenience; module A is standalone, but module B is used by another module, yet both share the same scope so to say.