jekyll / jekyll-sass-converter

A Sass converter for Jekyll.

Home Page:http://rubygems.org/gems/jekyll-sass-converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such file or directory - .../ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/sass_embedded/dart-sass-embedded

TheOddler opened this issue · comments

I was just trying to update a Github pages website I have to using the latest Jekyll, so I changed my old Gemfile from

source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

to

source "https://rubygems.org"
gem "jekyll", "~> 4.3.2"

However, when I then do bundler install and bundle exec jekyll serve I get the following output (with error):

Configuration file: /home/pablo/Dev/theoddler.github.io/_config.yml
            Source: /home/pablo/Dev/theoddler.github.io
       Destination: /home/pablo/Dev/theoddler.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'css/cv.scss':
                    No such file or directory - /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/sass_embedded/dart-sass-embedded
                    ------------------------------------------------
      Jekyll 4.3.2   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
Traceback (most recent call last):
	55: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/bin/bundle:18:in `<main>'
	54: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/bin/bundle:18:in `load'
	53: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/exe/bundle:36:in `<top (required)>'
	52: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
	51: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/exe/bundle:48:in `block in <top (required)>'
	50: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/cli.rb:25:in `start'
	49: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	48: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/cli.rb:31:in `dispatch'
	47: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	46: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	45: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	44: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/cli.rb:486:in `exec'
	43: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:23:in `run'
	42: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `kernel_load'
	41: from /nix/store/wdl9fsx2lwqqhrkipw7jv2w1wwgrqxkm-bundler-2.3.26/lib/ruby/gems/2.7.0/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `load'
	40: from /home/pablo/.local/share/gem/ruby/2.7.0/bin/jekyll:25:in `<top (required)>'
	39: from /home/pablo/.local/share/gem/ruby/2.7.0/bin/jekyll:25:in `load'
	38: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
	37: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
	36: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
	35: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
	34: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
	33: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
	32: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
	31: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
	30: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
	29: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
	28: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
	27: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
	26: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
	25: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in `process'
	24: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:211:in `render'
	23: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `render_pages'
	22: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:563:in `each'
	21: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:564:in `block in render_pages'
	20: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:572:in `render_regenerated'
	19: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:63:in `run'
	18: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:84:in `render_document'
	17: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:104:in `convert'
	16: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:104:in `reduce'
	15: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:104:in `each'
	14: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-4.3.2/lib/jekyll/renderer.rb:105:in `block in convert'
	13: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/jekyll-sass-converter-3.0.0/lib/jekyll/converters/scss.rb:160:in `convert'
	12: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded.rb:47:in `compile_string'
	11: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded.rb:64:in `instance'
	10: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded.rb:64:in `new'
	 9: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded.rb:83:in `initialize'
	 8: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded.rb:83:in `new'
	 7: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded/channel.rb:10:in `initialize'
	 6: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded/channel.rb:10:in `new'
	 5: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded/dispatcher.rb:12:in `initialize'
	 4: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded/dispatcher.rb:12:in `new'
	 3: from /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/lib/sass/embedded/compiler.rb:12:in `initialize'
	 2: from /nix/store/cf2fghb8vxxwmniv8cl6cvsyzabjrvl3-ruby-2.7.6/lib/ruby/2.7.0/open3.rb:101:in `popen3'
	 1: from /nix/store/cf2fghb8vxxwmniv8cl6cvsyzabjrvl3-ruby-2.7.6/lib/ruby/2.7.0/open3.rb:213:in `popen_run'
/nix/store/cf2fghb8vxxwmniv8cl6cvsyzabjrvl3-ruby-2.7.6/lib/ruby/2.7.0/open3.rb:213:in `spawn': No such file or directory - /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/sass_embedded/dart-sass-embedded (Errno::ENOENT)

When I check the the file it is supposedly missing does exist:

❯ ls /home/pablo/.local/share/gem/ruby/2.7.0/gems/sass-embedded-1.57.1/ext/sass/sass_embedded/
dart-sass-embedded  src

Anybody know what is going on?

See discussion regarding NixOS here: sass-contrib/sass-embedded-host-ruby#91

In the upcoming release of sass-embedded, this should have been fixed by the following changes:

  1. google/dart_cli_pkg@2f018a6 - To release dartaotruntime and aot-snapshot as two separate files so that patchelf won't damage the snapshot.
  2. sass-contrib/sass-embedded-host-ruby@0b4a875 - patchelf will be run during the installation if NixOS is detected.

Thank you so much! So I guess this will be fixed then, I'll close this ticket (maybe reopen if it turns out it isn't fixed).

sass-embedded now works out of box in nix-shell -p ruby:

(nixos/nix)root@6a397e63fe0a:/home/opc# nix-shell -p ruby
these 20 paths will be fetched (39.06 MiB download, 205.04 MiB unpacked):
  /nix/store/026xvlylahwkrcrsykh8fb5l08zfhqdr-binutils-wrapper-2.39
  /nix/store/0h6nfjybmhyx4d5vy9cyh0w9gmw67agd-expand-response-params
  /nix/store/19iw70icl1292rn7w20ghxbj3zrfkm8d-glibc-2.35-163-dev
  /nix/store/1g5g7vzlcprmg1d6864fs5r4nf1h5b5j-binutils-2.39
  /nix/store/4x5fcbxcxx8lgq3j635kwdfi8lpw6cnx-gnumake-4.3
  /nix/store/66rxqbbmk95pwcqmi9qqdcvlr6g1yalg-file-5.43
  /nix/store/7a84lbpavhwwrwf60nv0wvl2ffn5hg60-gcc-9.5.0
  /nix/store/894c2wg3zp2i0l1jfl09pdzxkq8pydjm-patchelf-0.15.0
  /nix/store/8h5wmlxyi78zc49g4k81gwsalrghk254-diffutils-3.8
  /nix/store/8v6p0if20h1xkvh8cdxb1fdz5g8iv10p-hook
  /nix/store/jh397z3hkn7gwyc1vaygfw8z9rx72ppk-stdenv-linux
  /nix/store/m1bi5njjbcchycnpvvil4vczmcbm6wcr-gawk-5.1.1
  /nix/store/na2lfq311l25ywvvcmacfiw8iccci8fb-ruby-2.7.6
  /nix/store/r86hfms9h6q8hzzrms0j89hncv3jxwff-gcc-wrapper-9.5.0
  /nix/store/vf3ry867iy52h3lm9nj43xnvfkfhbnyh-ed-1.18
  /nix/store/xf4ahkzxis0vvxnf98l3mal300jvrf3b-libyaml-0.2.5
  /nix/store/yi0ma6c3d8vzkv22kir44fnwqp1mkx1r-gnu-config-2021-01-25
  /nix/store/zbbx6ysrvnac4v3dq4gw211d6cfi03v4-patch-2.7.6
copying path '/nix/store/66rxqbbmk95pwcqmi9qqdcvlr6g1yalg-file-5.43' from 'https://cache.nixos.org'...
copying path '/nix/store/1g5g7vzlcprmg1d6864fs5r4nf1h5b5j-binutils-2.39' from 'https://cache.nixos.org'...
copying path '/nix/store/8h5wmlxyi78zc49g4k81gwsalrghk254-diffutils-3.8' from 'https://cache.nixos.org'...
copying path '/nix/store/vf3ry867iy52h3lm9nj43xnvfkfhbnyh-ed-1.18' from 'https://cache.nixos.org'...
copying path '/nix/store/0h6nfjybmhyx4d5vy9cyh0w9gmw67agd-expand-response-params' from 'https://cache.nixos.org'...
copying path '/nix/store/m1bi5njjbcchycnpvvil4vczmcbm6wcr-gawk-5.1.1' from 'https://cache.nixos.org'...
copying path '/nix/store/yi0ma6c3d8vzkv22kir44fnwqp1mkx1r-gnu-config-2021-01-25' from 'https://cache.nixos.org'...
copying path '/nix/store/4x5fcbxcxx8lgq3j635kwdfi8lpw6cnx-gnumake-4.3' from 'https://cache.nixos.org'...
copying path '/nix/store/8v6p0if20h1xkvh8cdxb1fdz5g8iv10p-hook' from 'https://cache.nixos.org'...
copying path '/nix/store/xf4ahkzxis0vvxnf98l3mal300jvrf3b-libyaml-0.2.5' from 'https://cache.nixos.org'...
copying path '/nix/store/9rimms4jxabcizxlvplniwik1a3q683r-linux-headers-6.0' from 'https://cache.nixos.org'...
copying path '/nix/store/jjgqbq81kn8lh3h4pm7mdnn816a6182q-openssl-1.1.1s' from 'https://cache.nixos.org'...
copying path '/nix/store/19iw70icl1292rn7w20ghxbj3zrfkm8d-glibc-2.35-163-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/zbbx6ysrvnac4v3dq4gw211d6cfi03v4-patch-2.7.6' from 'https://cache.nixos.org'...
copying path '/nix/store/026xvlylahwkrcrsykh8fb5l08zfhqdr-binutils-wrapper-2.39' from 'https://cache.nixos.org'...
copying path '/nix/store/7a84lbpavhwwrwf60nv0wvl2ffn5hg60-gcc-9.5.0' from 'https://cache.nixos.org'...
copying path '/nix/store/894c2wg3zp2i0l1jfl09pdzxkq8pydjm-patchelf-0.15.0' from 'https://cache.nixos.org'...
copying path '/nix/store/r86hfms9h6q8hzzrms0j89hncv3jxwff-gcc-wrapper-9.5.0' from 'https://cache.nixos.org'...
copying path '/nix/store/na2lfq311l25ywvvcmacfiw8iccci8fb-ruby-2.7.6' from 'https://cache.nixos.org'...
copying path '/nix/store/jh397z3hkn7gwyc1vaygfw8z9rx72ppk-stdenv-linux' from 'https://cache.nixos.org'...

[nix-shell:/home/opc]# gem install sass-embedded
Fetching sass-embedded-1.58.0.gem
Fetching google-protobuf-3.21.12.gem
Building native extensions. This could take a while...
Successfully installed google-protobuf-3.21.12
Building native extensions. This could take a while...
Successfully installed sass-embedded-1.58.0

Parsing documentation for google-protobuf-3.21.12
unable to convert "\xDB" from ASCII-8BIT to UTF-8 for lib/google/protobuf/descriptor_pb.rb, skipping
Installing ri documentation for google-protobuf-3.21.12
Parsing documentation for sass-embedded-1.58.0
Installing ri documentation for sass-embedded-1.58.0
Done installing documentation for google-protobuf, sass-embedded after 0 seconds
2 gems installed

[nix-shell:/home/opc]# irb
irb(main):001:0> require 'sass-embedded'
=> true
irb(main):002:0> Sass.info
=> "sass-embedded\t1.58.0"
irb(main):003:0> 

I can confirm that i now works!

Hmm I just got this error as well while running the latest version on TMux on Android:

No such file or directory - /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/ext/sass/sass_embedded/src/dart

(Ruby 3.2, jekyll 4.3.2, jekyll-sass-converter 3.0.0)

Should I open a new Issue over at sass-embedded-host-ruby... or...?

You mean Termux? Android uses Bionic libc. It is a completely different story here.

There is no prebuilt support for bionic libc in sass-embedded today. There is not even a prebuilt dart runtime for android available for download. Finally, it's nontrivial to reliably automate the build and test process so that it is unlikely to be supported out of box in near future.

Below is the rough instruction if you want to try yourself. Note that the process requires access to glibc based x86 linux. If have one, you might just want to run Jekyll there to avoid all kinds of headache.

  1. Build dart runtime for android: https://github.com/dart-lang/sdk/wiki/Building-the-Dart-VM-for-Android Unfortunately there is no prebuilt binaries available for download anywhere and as the wiki page says, "the setup is not yet thoroughly tested, but is available for experimentation."
  2. Build a dart-sass-embedded release using a normal Dart SDK for Linux with same version of Dart runtime you have built for Android.
  3. Extract the release tarball and replace the Linux Dart runtime inside with your Android Dart runtime. Make sure you are using the same kind of runtime (jit vs aot). Repack the tarball. Install ruby gem with an override to force use your own tarball of dart-sass-embedded.
    • Or alternatively, you can install gems normally and then replace the files after installation.

If you don't want to do it yourself, the next best step you can do is asking Termux community to provide either Dart SDK or Dart runtime as a prebuilt package. If a well-trusted source is willing to maintain prebuilt Dart SDK or runtime for Android, I'd be happy to add the out of box support by relying on the prebuilt packages.

Thanks for the thorough write-up.

Yes I meant Termux, sorry.

If that much is required... why was I able to build my project before? Is Dart a new dependency?

As it happens, there is a Dart Termux package already, so installing it was as easy as pkg install dart 😁

Anyway, that didn't fix the issue. I still get the same error.

You were probably using jekyll-sass-converter 2.0 which has no dart dependency.

Try replace that broken dart executable file with the dartaotruntime file from the dart package and see if it works.

Okay. So I ran:

$ cp /data/data/com.termux/files/usr/bin/dartaotruntime /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/ext/sass/sass_embedded/src/dart

And then my code, and now I got an exciting new error!

/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/lib/sass/embedded/compiler.rb:19: warning: VM initialization failed: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-code_comments no-dwarf_stack_traces_mode no-lazy_dispatchers dedup_instructions no-asserts arm64 linux no-compressed-pointers null-safety' but the VM has 'product no-code_comments no-dwarf_stack_traces_mode no-lazy_dispatchers dedup_instructions no-asserts arm64 android compressed-pointers null-safety'
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/lib/sass/embedded/async.rb:49:in `block in await': end of file reached (Sass::CompileError)

😞

@buddhist-uni, Jekyll moved to using Dart-sass via jekyll-sass-converter-3.0. If you can add / edit a Gemfile, locking to the v2.0 series of the sass-converter should work as before:

# Gemfile

gem "jekyll-sass-converter", "~> 2.0"

Added:
gem "jekyll-sass-converter", ">= 2.0", "< 3.0"
And it's working again. Thanks! 😸 Hopefully Jekyll continues to support 2.x for a long time 😅 🙏 Thanks again for the help. 😃

@buddhist-uni Technically, the v2.x is now under security-maintenance. New features won't get backported.
On a slightly related note, do you have a blog post detailing the exact steps you used to setup a Ruby environment on Android and consequently began working with Jekyll site(s)?

I haven't. Actually it was surprisingly easy from what I remember! Iirc, after installing ruby from the pkg manager and the bundler gem, I just had to add gem "webrick", "~> 1.7" to my Gemfile... and now have to lock jekyll-sass-converter to 2.x as well... Perhaps that is worth documenting... Where would you recommend? 😊

I really don't have any recommendations, @buddhist-uni.

I suggest you try setting up a fresh environment in a separate Android device, say one of your parents' / siblings' / etc.
If things go smoothly without breaking a sweat, you may document that experience as a tutorial for publishing under https://jekyllrb.com/tutorials/.

Okay. So I ran:

$ cp /data/data/com.termux/files/usr/bin/dartaotruntime /data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/ext/sass/sass_embedded/src/dart

And then my code, and now I got an exciting new error!

/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/lib/sass/embedded/compiler.rb:19: warning: VM initialization failed: Snapshot not compatible with the current VM configuration: the snapshot requires 'product no-code_comments no-dwarf_stack_traces_mode no-lazy_dispatchers dedup_instructions no-asserts arm64 linux no-compressed-pointers null-safety' but the VM has 'product no-code_comments no-dwarf_stack_traces_mode no-lazy_dispatchers dedup_instructions no-asserts arm64 android compressed-pointers null-safety'
/data/data/com.termux/files/usr/lib/ruby/gems/3.2.0/gems/sass-embedded-1.58.0/lib/sass/embedded/async.rb:49:in `block in await': end of file reached (Sass::CompileError)

Okay, looks like dart vm for android has a feature flag android, but does not have features flag linux, and alone with other differences, these would make it impossible to just swap the aot runtime. - This also means it will be difficult to provide prebuilt through CI as it now has to be build directly on android, because Dart SDK do not support cross compile aot snapshot.

Since you have a working Dart SDK on android, you can try build dart-sass-embedded directly on your device. See: https://github.com/sass/dart-sass-embedded

Once you build it on android you can install it with a config override:

bundle config build.sass-embedded SASS_EMBEDDED=/path/to/dart-sass-embedded.tar.gz
bundle install

OR

gem install sass-embedded -- SASS_EMBEDDED=/path/to/dart-sass-embedded.tar.gz

try build dart-sass-embedded directly on your device

Here are the problems I ran into doing that:

  • the build script clones some git repos, but isn't robust to the new need to git config --global --add safe.directory ... running those manually unblocked those git errors
  • the dart protoc_plugin package wasn't found. Installed it like normal (dart pub global activate protoc_plugin) and added the .pub-cache/bin to PATH but pub generate still complains Failure: plugin dart: could not find protoc plugin for name dart - please make sure protoc-gen-dart is installed and present on your $PATH

But which protoc-gen-dart does find it, so... Any ideas?

@ashmaroli - quickly jotted it down here https://buddhistuniversity.net/jekyll-dev-notes/2023/02/13/running-jekyll-on-android.html

While at it, I also took the opportunity to jot down a few powerful Liquid patterns I've discovered over the years: https://buddhistuniversity.net/jekyll-dev-notes/2023/02/12/liquid-recipes.html#recurse-in-an-include

Feedback welcome 😁

@buddhist-uni The protobuf step generates architecture independent dart source code, which means you can run it on a normal Linux box and then copy the whole repository to android to complete the build.

@buddhist-uni Ruby gem sass-embedded 1.58.3 now has pre-built android support.

Huzzah! 🎉 Can confirm it's now working. Thanks for the help! :)