sasso-rails 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 362a4798b8ebe03f26c32688f42048bc184b56a4e23a02db7d5cffbeaefcc4d8
4
- data.tar.gz: 2bda2a2d286b992749ace28b314e8c86c9796bdd160d13c735a233967efc9a8d
3
+ metadata.gz: 906b842a73c7016c0682b5f414faab3416d11bcaff07b3b4a5b26da3faab1a61
4
+ data.tar.gz: dc2b535f1e451ab474767bd9249241166198ddd5fef17ec540e3a684040802cd
5
5
  SHA512:
6
- metadata.gz: f23d4f4c8372103bf0fdaaeb86c85694eed3d861409aa99f915c580bfbde57842a811211a16f8806175db649474c9aa45421b4f4aea4266217d054dce3a32180
7
- data.tar.gz: f097ec3da59d3e120408a9db2926e89d1d53d6f5b926699b7b126a7c6aa923f079f0f9d5c9ea5a342988570222bb3e34ea4043fa85660abb6254536deaa273a8
6
+ metadata.gz: e96e0f66238e73d3889a180f749356c14907c7c643b08a0b4fb5a62d2c5e88e98db5a6a79bc6b821c9dc9e2246bc462b2a96d6f72b18797946422a9b259f0e05
7
+ data.tar.gz: fe8c449eaf6ee9d337fdff94ed65d5d5330d011751855482cacd53d95af9652f6873151db02d1e778252847cd349acc0d0d562943c984cb3c675d0acb40decf7
data/CHANGELOG.md CHANGED
@@ -8,6 +8,37 @@ the engine-gem version range it requires.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.1.4] - 2026-06-15
12
+
13
+ Requires the `sasso` gem **>= 0.2.3** (was `>= 0.2.0`).
14
+
15
+ ### Changed
16
+
17
+ - Bumped the `sasso` engine-gem floor to **>= 0.2.3**, which pulls in two
18
+ dart-sass parity fixes contributed upstream by @shyim:
19
+ - **`!default` no longer evaluates its right-hand side when the variable is
20
+ already set.** This fixes a spurious "incompatible units" error seen in
21
+ Bootstrap-on-Shopware setups.
22
+ - **Legacy `rgb()`/`hsl()` preserve the caller's `rgba`/`hsla` spelling in
23
+ special-value passthroughs** (e.g. `rgba(var(--bs-body-color-rgb), …)`),
24
+ which Bootstrap relies on.
25
+
26
+ ## [0.1.3] - 2026-06-14
27
+
28
+ ### Fixed
29
+
30
+ - **Sprockets `assets:precompile` crash (`LoadError: cannot load such file --
31
+ sassc`).** On a Sprockets app (e.g. a default Rails 7.0 app), the install
32
+ generator left the manifest's default `//= link_directory ../stylesheets .css`
33
+ directive in place, so Sprockets 4 tried to COMPILE the `application.scss`
34
+ entrypoint with its built-in `SasscProcessor` (`require "sassc"`, not
35
+ installed) — harmless in dev but crashing `assets:precompile` on deploy. The
36
+ generator now neutralizes that directive (sasso owns the compiled output,
37
+ served from `../builds`, which is linked separately). Idempotent, and a no-op
38
+ on Propshaft (no manifest). Rails 7.0 + Sprockets now precompiles cleanly;
39
+ Propshaft (Rails 7.1 / 8.x) is unaffected. Verified end-to-end across both
40
+ pipelines, plus a generator unit test.
41
+
11
42
  ## [0.1.2] - 2026-06-14
12
43
 
13
44
  Requires the `sasso` gem **>= 0.2.0** (for its source-map API).
data/README.md CHANGED
@@ -17,6 +17,28 @@ Why this gem over the alternatives:
17
17
  directly through the native extension — no process spawn, no IPC.
18
18
  - **Pure Rust core.** No libsass (deprecated), no Dart VM.
19
19
 
20
+ ## Compatibility
21
+
22
+ - **Ruby** ≥ 3.1.
23
+ - **Rails** ≥ 7.0 (`railties >= 7.0`), on **either** asset pipeline. Verified
24
+ end-to-end (`generate sasso:install` → `sasso:build` → production
25
+ `assets:precompile` → served CSS) on:
26
+
27
+ | Rails | Asset pipeline | Status |
28
+ |--------|------------------------------------------------------|---------------------|
29
+ | 8.x | Propshaft (the Rails 8 default) | ✅ primary path |
30
+ | 7.1+ | Propshaft (`rails new --asset-pipeline=propshaft`) | ✅ |
31
+ | 7.0 | Sprockets (the Rails 7.0 default) | ✅ (since **0.1.3**) |
32
+
33
+ On **Propshaft** sasso compiles to `app/assets/builds/` and Propshaft serves
34
+ it (Propshaft performs no Sass step of its own). On **Sprockets** the installer
35
+ links that builds directory into the manifest **and** disables Sprockets' own
36
+ `.scss` handling, so `assets:precompile` deploys cleanly without `sassc`/
37
+ libsass (this last part is the 0.1.3 fix — earlier versions crashed
38
+ `assets:precompile` on a default Sprockets app; see the changelog). Either way
39
+ the compiler is the pure-Rust `sasso` native gem — no Node, no Dart, no
40
+ subprocess.
41
+
20
42
  ## Installation
21
43
 
22
44
  ```ruby
@@ -94,8 +116,6 @@ that directory as a source of ready-to-serve assets:
94
116
 
95
117
  ## Notes & limitations
96
118
 
97
- - **Source maps are not supported yet.** The in-process compiler returns CSS
98
- only; there is no `.css.map` output in any environment.
99
119
  - **`builds` is file-to-file.** Each entry maps one input file to one output
100
120
  file. There is no directory-glob form (no `"." => "."`); list each entrypoint
101
121
  explicitly.
@@ -110,10 +130,33 @@ that directory as a source of ready-to-serve assets:
110
130
  - **Watch is a 1s mtime poll** (dependency-free, no native fs-events); it covers
111
131
  the source dir and `config.sasso.load_paths`.
112
132
 
133
+ ## Troubleshooting
134
+
135
+ **`Bundler::GemNotFound: Could not find sasso-<version>-<platform>`** on
136
+ `bin/rails sasso:build` (or any boot) right after `bundle install`. The `sasso`
137
+ compiler ships as a **precompiled native gem**, so the lockfile must list your
138
+ platform. If Bundler resolved the version but didn't materialize the native
139
+ build for your arch, add the platform and re-install:
140
+
141
+ ```console
142
+ $ bundle lock --add-platform arm64-darwin # or x86_64-linux, aarch64-linux, etc.
143
+ $ bundle install
144
+ ```
145
+
146
+ This is a generic Bundler behaviour for precompiled native gems (the same step
147
+ `nokogiri` etc. need on CI/Docker), not specific to sasso — but you may hit it
148
+ on a first local install. To bake every supported platform into the lockfile up
149
+ front:
150
+
151
+ ```console
152
+ $ bundle lock --add-platform x86_64-linux aarch64-linux \
153
+ x86_64-linux-musl aarch64-linux-musl arm64-darwin x86_64-darwin x64-mingw-ucrt
154
+ ```
155
+
113
156
  ## Versioning
114
157
 
115
158
  This gem versions independently of the `sasso` compiler gem and pins it with a
116
- range (`sasso >= 0.1.1, < 1`). An app may pin a specific compiler version in its
159
+ range (`sasso >= 0.2.3, < 1`). An app may pin a specific compiler version in its
117
160
  own `Gemfile`.
118
161
 
119
162
  ## License
@@ -55,9 +55,24 @@ module Sasso
55
55
  manifest = "app/assets/config/manifest.js"
56
56
  full = File.join(destination_root, manifest)
57
57
  return unless File.exist?(full)
58
- return if File.read(full).include?("link_tree ../builds")
59
58
 
60
- append_to_file manifest, %(//= link_tree ../builds\n)
59
+ unless File.read(full).include?("link_tree ../builds")
60
+ append_to_file manifest, %(//= link_tree ../builds\n)
61
+ end
62
+
63
+ # The default Sprockets manifest links the stylesheets SOURCE directory
64
+ # (`//= link_directory ../stylesheets .css`). Sprockets 4 then tries to
65
+ # COMPILE our `application.scss` entrypoint with its built-in
66
+ # SasscProcessor, which `require "sassc"` — not installed on a default
67
+ # app — so `assets:precompile` crashes with
68
+ # `LoadError: cannot load such file -- sassc`. sasso owns the compiled
69
+ # output (served from ../builds, linked above), so the raw source dir
70
+ # must NOT be linked. Neutralize the directive — idempotent, since the
71
+ # regex only matches the live `//=` form (a re-run is a no-op).
72
+ gsub_file manifest,
73
+ %r{^([ \t]*)//=([ \t]*link_directory[ \t]+\.\./stylesheets\b.*)$},
74
+ "\\1//\\2 -- disabled by sasso-rails (sasso compiles ../stylesheets to ../builds; " \
75
+ "linking the source dir makes Sprockets compile .scss via sassc)"
61
76
  end
62
77
 
63
78
  def add_watch_to_procfile
@@ -5,6 +5,6 @@ module Sasso
5
5
  # Versioned INDEPENDENTLY of both the `sasso` gem and the `sasso` crate.
6
6
  # The gemspec pins the engine gem with a range (sasso >= 0.1.1, < 1), so a
7
7
  # compiler bump does not force a lockstep release of this integration gem.
8
- VERSION = "0.1.2"
8
+ VERSION = "0.1.4"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sasso-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - momiji-rs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-14 00:00:00.000000000 Z
11
+ date: 2026-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.0
33
+ version: 0.2.3
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: '1'
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 0.2.0
43
+ version: 0.2.3
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '1'