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

Add Homebrew path for Apple Silicon based macOS installations #458

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

majd
Copy link
Contributor

@majd majd commented Aug 14, 2021

The Homebrew install path on Apple Silicon is different from the Intel-based Homebrew setup. This PR adds the new path to Runtime.swift to fix the error below.

ERROR: Could not find a libDanger to link against at any of: [".build/debug", ".build/x86_64-unknown-linux/debug", ".build/release", "/usr/local/lib/danger"]

Copy link
Member

@orta orta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Copy link
Member

@f-meloni f-meloni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@f-meloni
Copy link
Member

Can you please also update the Changelog?

@f-meloni f-meloni merged commit 2d6c99f into danger:master Sep 1, 2021
@majd
Copy link
Contributor Author

majd commented Sep 2, 2021

@f-meloni Sorry. I haven't had a chance to get to updating the changelog. Should I still do it or will you take care of that?

To add full Apple Silicon compatibility, in addition to the change made in this PR, the tool itself will need to be compiled universally for both Apple Silicon and Intel.

@majd majd deleted the fix/apple-silicon-homebrew branch September 2, 2021 07:41
@f-meloni
Copy link
Member

f-meloni commented Sep 2, 2021

@majd No problem at all, I've updated it https://github.com/danger/swift/pull/461/files
For the compilation, brew already uses make install, which installs it using your current machine's Xcode, so I suppose it should make a version that works on your current machine

https://github.com/danger/homebrew-tap/blob/master/danger-swift.rb#L15
https://github.com/danger/swift/blob/master/Scripts/install.sh

Is there anything missing there?

@majd
Copy link
Contributor Author

majd commented Sep 6, 2021

I believe one of the libraries is still not being compiled for the current architecture. Here is the log.

Starting Danger PR on <repo>
You don't have a DANGER_GITHUB_API_TOKEN set up, this is optional, but TBH, you want to do this
Check out: http://danger.systems/js/guides/the_dangerfile.html#working-on-your-dangerfile
/var/folders/5v/5hst580x74zf9v5vm953v89r0000gn/T/_tmp_dangerfile.swift:1:8: error: module 'Danger' was created for incompatible target arm64-apple-macosx10.10: /opt/homebrew/lib/danger/Danger.swiftmodule

I'm happy to take a look if needed. But do you have any ideas? I should probably open a separate issue regarding this.

@majd
Copy link
Contributor Author

majd commented Sep 14, 2021

@f-meloni I can confirm that the issue I mentioned above has been fixed in #462.

@f-meloni
Copy link
Member

@majd thank you! I will make a release then!

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.

None yet

3 participants