sasso-rails 0.1.2 → 0.1.3

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: 182fa27772f53b3c1fbacd3befd6785adf4bac01018fb283e771e75cd4c1c53a
4
+ data.tar.gz: 3199c95dd402640b1408e998bf7879dd7aadcf352328e292a1e8700884be9df9
5
5
  SHA512:
6
- metadata.gz: f23d4f4c8372103bf0fdaaeb86c85694eed3d861409aa99f915c580bfbde57842a811211a16f8806175db649474c9aa45421b4f4aea4266217d054dce3a32180
7
- data.tar.gz: f097ec3da59d3e120408a9db2926e89d1d53d6f5b926699b7b126a7c6aa923f079f0f9d5c9ea5a342988570222bb3e34ea4043fa85660abb6254536deaa273a8
6
+ metadata.gz: 9b7fd563419f880c4540fa2da7a28dfcc33b06d7cc4e898ef8669794938614e0b903fcbc4e96cb365451a98890d3dcd907ca1100b7a5262f75d96a17ff767149
7
+ data.tar.gz: 2599b9c1c5f0e84d76b713eabbaf1bb6068863551f3d7ab38fc6b5d3ae6f1f0a6103cbc0089e00fb640a27cadd476831cfa89204ad4d5d3bf5cb169f15592130
data/CHANGELOG.md CHANGED
@@ -8,6 +8,22 @@ the engine-gem version range it requires.
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.1.3] - 2026-06-14
12
+
13
+ ### Fixed
14
+
15
+ - **Sprockets `assets:precompile` crash (`LoadError: cannot load such file --
16
+ sassc`).** On a Sprockets app (e.g. a default Rails 7.0 app), the install
17
+ generator left the manifest's default `//= link_directory ../stylesheets .css`
18
+ directive in place, so Sprockets 4 tried to COMPILE the `application.scss`
19
+ entrypoint with its built-in `SasscProcessor` (`require "sassc"`, not
20
+ installed) — harmless in dev but crashing `assets:precompile` on deploy. The
21
+ generator now neutralizes that directive (sasso owns the compiled output,
22
+ served from `../builds`, which is linked separately). Idempotent, and a no-op
23
+ on Propshaft (no manifest). Rails 7.0 + Sprockets now precompiles cleanly;
24
+ Propshaft (Rails 7.1 / 8.x) is unaffected. Verified end-to-end across both
25
+ pipelines, plus a generator unit test.
26
+
11
27
  ## [0.1.2] - 2026-06-14
12
28
 
13
29
  Requires the `sasso` gem **>= 0.2.0** (for its source-map API).
data/README.md CHANGED
@@ -94,8 +94,6 @@ that directory as a source of ready-to-serve assets:
94
94
 
95
95
  ## Notes & limitations
96
96
 
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
97
  - **`builds` is file-to-file.** Each entry maps one input file to one output
100
98
  file. There is no directory-glob form (no `"." => "."`); list each entrypoint
101
99
  explicitly.
@@ -110,6 +108,29 @@ that directory as a source of ready-to-serve assets:
110
108
  - **Watch is a 1s mtime poll** (dependency-free, no native fs-events); it covers
111
109
  the source dir and `config.sasso.load_paths`.
112
110
 
111
+ ## Troubleshooting
112
+
113
+ **`Bundler::GemNotFound: Could not find sasso-<version>-<platform>`** on
114
+ `bin/rails sasso:build` (or any boot) right after `bundle install`. The `sasso`
115
+ compiler ships as a **precompiled native gem**, so the lockfile must list your
116
+ platform. If Bundler resolved the version but didn't materialize the native
117
+ build for your arch, add the platform and re-install:
118
+
119
+ ```console
120
+ $ bundle lock --add-platform arm64-darwin # or x86_64-linux, aarch64-linux, etc.
121
+ $ bundle install
122
+ ```
123
+
124
+ This is a generic Bundler behaviour for precompiled native gems (the same step
125
+ `nokogiri` etc. need on CI/Docker), not specific to sasso — but you may hit it
126
+ on a first local install. To bake every supported platform into the lockfile up
127
+ front:
128
+
129
+ ```console
130
+ $ bundle lock --add-platform x86_64-linux aarch64-linux \
131
+ x86_64-linux-musl aarch64-linux-musl arm64-darwin x86_64-darwin x64-mingw-ucrt
132
+ ```
133
+
113
134
  ## Versioning
114
135
 
115
136
  This gem versions independently of the `sasso` compiler gem and pins it with a
@@ -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.3"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - momiji-rs