Move sass compilation to its own custom target #12588
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
run_command
runs silently and the build log does not indicate that the command was run, or what the command was, so it's not great for build debugging. On the other hand,custom_target
logs as a normal build target.run_command
also states that it runs in an unspecified directory, so the current script is relying on undocumented implementation/platform specific behavior. Rather than updating the script to ensure it runs in the proper directory,custom_target
does this for us (and handles installs since it enforces the source/build separation).Also support both pysassc and sassc (which was the reason I was in here in the first place X_X). The only difference between the two is some decimal precision.
Theoretically this could also add dart-sass ('sass') to the list of programs, but that has more differences (like outputting
rgb(x, y, z)
values instead of hex, and over 100 deprecation warnings). While [py]sassc/libsass are deprecated, I'm not advocating for a migration to dart-sass (yet) since Gentoo doesn't package dart, and I'm not signing up to maintain that.