-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
[Feature Request] Include a pre-built executable in each release and use in the homebrew tap #476
Comments
Hey! I think the main problem is that Danger is made of two parts, a binary and a library which is linked to the Dangerfile compilation, would that still work out of the box with homebrew? |
It would work if we build a .xcframework of the Danger dynamic library, built with BUILD_LIBRARY_FOR_DISTRIBUTION enabled. BUILD_LIBRARY_FOR_DISTRIBUTION not for the purpose of ABI stability, but for the purpose of module stability between Swift compiler versions. Now there are three pretty big caveats for doing that:
where "Danger" is the library product in the Package.swift file. It does something, namely output some object files, but not the right thing.
which means that also Octokit also has to be built with BUILD_LIBRARY_FOR_DISTRIBUTION. That does work today, but it's not in this projects control whether it works for future OctoKit versions. Btw, building the homebrew tap products with BUILD_LIBRARY_FOR_DISTRIBUTION also when shipping it as source, as today, would solve: #449 (comment). In that, if you install the tap, then update Xcode/the swift compiler, the built Dangerfile can still be linked to the installed Danger library. As long as the library and Dangerfile are still API compatible of course. |
@bobergj your approach described in the root post, would allow us to include a binary in say our repository, and use that directly? as in, we manage versioning ourselves? Edit: |
How is it going? Any updates? |
That's gonna work, but you would have to recompile the binary every time you update Xcode, even minor versions. Since the Danger framework you build won't be binary compatible with a newer Swift compiler version. I've used the docker image in the past, to avoid the compilation step on every build.
Not from my side. |
Summary
Include a pre-built executable in each release. Use that pre-built artifact in the homebrew tap.
Why
How
Building a universal binary for Intel and Apple Silicon macs should be a matter of:
Inspecting the resulting executable:
Since the third-party dependencies are statically linked, the executable is standalone:
The text was updated successfully, but these errors were encountered: