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

Move sass compilation to its own custom target #12588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SparkyBluefang
Copy link
Contributor

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.

[9/113] /usr/bin/pysassc ../cinnamon-6.4.3/data/theme/cinnamon-sass/cinnamon.scss data/theme/cinnamon-sass/cinnamon.css

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.

--- a/data/theme/cinnamon-sass/cinnamon.css (pysassc)
+++ b/data/theme/cinnamon-sass/cinnamon.css (sassc)
@@ -994,13 +994,13 @@ StScrollBar StButton#hhandle {
     spacing: 12px; }
   .workspace-switch-osd-indicator {
     background-color: rgba(255, 255, 255, 0.5);
-    padding: 2.66667px;
-    margin: 13.33333px;
+    padding: 2.6666666667px;
+    margin: 13.3333333333px;
     border-radius: 32px; }
     .workspace-switch-osd-indicator:active {
       background-color: #3584e4;
-      padding: 5.33333px;
-      margin: 10.66667px; }
+      padding: 5.3333333333px;
+      margin: 10.6666666667px; }
 
 .monitor-label {
   border-radius: 0;

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.

@leigh123linux
Copy link
Contributor

sassc is a dead project.

https://github.com/sass/sassc

@SparkyBluefang
Copy link
Contributor Author

Yes, I'm aware, and libsass-python is (functionally) equally dead since libsass is dead, thus the footnote about dart-sass. Given packaging consideration, I'd rather use sassc since we don't need the python bindings (which seems like the only reason to choose libsass-python).

But if that's going to be a sticking point, I can remove sassc, since the run_command/custom_target changes still have merit IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants