gethop-dev / hop-cli

The HOP Command Line Interface
Mozilla Public License 2.0
16 stars 2 forks source link

(go) fails with "Platform linux:aarch64 not supported" #20

Closed werenall closed 6 months ago

werenall commented 7 months ago

First of all - thanks for pushing Hop to such great lengths. It's amazing how convenient it is.

However I have problems running the newly generated project an an M3 chip. When I run (dev) and then (go) I get Platform linux:aarch64 not supported.

After inspecting the stacktrace I realise that it's failing in duct's SASS compiler. Googling SASS and this error I encounter many posts mentioning node-sass being problematic with arm64. Duct's SASS compiler uses jSASS but I think it's likely they share this problem.

The fix is actually simple, should you ever run into that problem. You just add DOCKER_DEFAULT_PLATFORM=linux/amd64 right before your docker-compose up [...] in the `start-dev.sh

iarenaza commented 7 months ago

Hi @werenall

thank you for the heads up! To be honest, we haven't tested HOP cli on Apple Silicon (we don't have a suitable machine at hand).

Looking a bit deeper into this issue, I've found that jsass, the library internally used by duct.compiler/saas, does actually have support for Apple Silicon, in its latest released version. As far as I can see in the jsass releases' changelogs, there are no breaking changes between the version currently used by duct.compiler/sass (5.5.6) and the latest version.

So I think it would be a better option to open a PR against duct.compiler/sass to upgrade to jsass 5.11.0, instead of forcing people using Apple Silicon hardware to use the amd64 docker images (reducing performance, and consuming more electricity, for no real gain).

What do you think?

iarenaza commented 7 months ago

I opened a pull request in duct-framework/compiler.sass#3

iarenaza commented 6 months ago

@werenall duct-framework/compiler.sass#3 was merged, and just today James Reeves published a new version of duct.compiler/sass (0.3.0) to clojars.org.

If you upgrade that dependency in your project, the issue should go away.

On the other hand, we will update hop-cli to use that new dependency version by default.

werenall commented 5 months ago

Hi @iarenaza! Sorry for the prolonged silence. Hoping my hobby project will get some traction now. Thanks for the update! Works like a charm now without any nasty workarounds :)