Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS aarch64 libsass for Apple M1 #49

Merged
merged 6 commits into from
Feb 28, 2022
Merged

Conversation

porchy13
Copy link
Contributor

@porchy13 porchy13 commented Dec 9, 2021

This PR should close #48.

To get sbt-sassify working on Apple M1 computers and using sbt 1.6.0-M1 needs to have libsass.dylib in arch specific folders: darwin-aarch64 for M1 chips and darwin-x86-64 for Intel chips. The old darwin folder needs to be kept for sbt version prior to 1.6.

I did not find any ways to have libsass cross-compiled for aarch64. The one I provide comes from my Homebrew installation.

Finally, I have update some dependencies and the test protocol has been fixed in that sense.

@thadamski
Copy link

Thanks for creating a PR! Is there a beta build of this branch available in a repo? I'd like to help test, as I'm also experiencing the problems referenced in #48 as well

@porchy13
Copy link
Contributor Author

porchy13 commented Dec 21, 2021

I've not publish this version in a public repository. I do the following steps to use it in my projects:

  1. forked the project and publish the plugin locally (sbt clean; compile; publishLocal).
  2. copy the local sbt-sassify.jar (found in ~/.ivy2/local/org.irundaia.sbt/sbt-sassify/scala_2.12/sbt_1.0/1.5.2-SNAPSHOT/jars) in project/lib.
  3. in project/plugins.sbt, I use the local plugin by declaring it like below:
    val sassifyLocation: File = file("project/lib/sbt-sassify.jar").getAbsoluteFile
    addSbtPlugin("org.irundaia.sbt" % "sbt-sassify" % "1.5.2-SNAPSHOT" from "file://" + sassifyLocation)

@jwaring
Copy link

jwaring commented Jan 6, 2022

Thanks @porchy13 for creating the PR. I have followed the solution as you documented above and it works well.
I look forward to the PR being incorporated into the next release.

@arturopala
Copy link

@irundaia any chance to get this fix released?

project/build.properties Outdated Show resolved Hide resolved
@irundaia
Copy link
Owner

Sorry, I've been away for a while. Question, how did you compile the darwin-arm version of libsass?

@porchy13
Copy link
Contributor Author

I've used the binaries provided by Homebrew (link to the libsass formulae).

I did not find any cross-compilation Docker image that was able to compile for the aarch64 architecture (all the tests I made have failed).

@irundaia
Copy link
Owner

I've tested in on my x86 Mac. It still works there. So I'll try to release this this evening, after doing some test on a windows machine.

@irundaia irundaia merged commit 0aecffe into irundaia:master Feb 28, 2022
@arturopala
Copy link

arturopala commented Mar 2, 2022

@irundaia hello, do you plan to release a new version of the library on maven central?

@irundaia
Copy link
Owner

irundaia commented Mar 2, 2022

@arturopala, I do. I’m in the process of figuring out how to release the plugin to jCenter now that bintray has shut down.

@arturopala
Copy link

arturopala commented Mar 2, 2022 via email

@irundaia
Copy link
Owner

irundaia commented Mar 2, 2022

I've published the version 1.5.2 to Sonatype OSS.

Due to Sonatype's stricter groupId policies, I had to change the groupId to io.github.irundaia. So to upgrade, change your project/plugins.sbt to addSbtPlugin("io.github.irundaia" % "sbt-sassify" % "1.5.2")

@arturopala
Copy link

Thank you @irundaia !

@jwaring
Copy link

jwaring commented Mar 2, 2022

My thanks also @irundaia and @porchy13 for the original PR

@mkurz
Copy link

mkurz commented Mar 3, 2022

@irundaia You should also let scala-steward know about the new groupid: scala-steward-org/scala-steward#2488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sbt-sassify broken on Apple Silicon M1 + Big Sur
6 participants