tuist / tuist/lightning_css

Support for aarch64-apple-darwin

Open
#28 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Elixir
Stars
15
Forks
4
Avg merge
5h 10m
Merged PRs (30d)
1

Description

  • Elixir 1.17.2
  • Phoenix 1.7.14
  • lightning_css 0.5.0
  • Apple M1 Pro, Ventura 13.7

First time trying out the library. When attempting to run the application, I'm getting the following error:

** (Mix) Could not start application lightning_css: exited in: LightningCSS.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (RuntimeError) lightning_css is not available for architecture: aarch64-apple-darwin22.6.0
            (lightning_css 0.5.0) lib/lightning_css/architectures.ex:90: LightningCSS.Architectures.unsupported_arch/0
            (lightning_css 0.5.0) lib/lightning_css/paths.ex:12: LightningCSS.Paths.bin/0
            (lightning_css 0.5.0) lib/lightning_css/versions.ex:17: LightningCSS.Versions.bin/0
            (lightning_css 0.5.0) lib/lightning_css.ex:18: LightningCSS.start/2
            (kernel 9.2.4) application_master.erl:293: :application_master.start_it_old/4

I wasn't sure if this should be raised here or in the LightningCSS repo. I thought of mentioning it here first because I can see in LightningCSS's GitHub workflow where they target a build for aarch64-apple-darwin.

One thing I notice is that what comes back from :erlang.system_info(:system_architecture) is "aarch64-apple-darwin22.6.0". However, from NodeJS's .arch(), .platform() and .release() comes back with "arm64 darwin 22.6.0", which lines up closer to what this repo references with regards to available targets that LightningCSS supports. So, this might be causing a discrepancy in discerning whether the library is available or not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect lib/lightning_css/architectures.ex, especially the available target list, and trace how lib/lightning_css/paths.ex and lib/lightning_css/versions.ex select the binary. Start by comparing the Erlang architecture string with the supported aarch64-apple-darwin target, then run the application to verify that LightningCSS starts successfully on Apple Silicon.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.