-
-
Notifications
You must be signed in to change notification settings - Fork 903
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
extconf: respect AR and RANLIB in recipes on darwin #3338
extconf: respect AR and RANLIB in recipes on darwin #3338
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @joshheinrichs-shopify, thanks for opening this.
Do you know if there are any github actions that we could use to test Nix-on-Darwin? (For example, we're using vmactions/freebsd-vm@v1
to test FreeBSD.)
I put in a lot of work over the past few years to thoroughly exercise compilation on supported platforms, and that coverage has allowed me to confidently make changes to extconf.rb
. I'd prefer not to merge this without adding some test coverage to prevent regressing, if possible.
I'm also curious: can you share why you're not using precompiled gems? |
e8f5a4a
to
99eb909
Compare
thanks for taking a look at this! sorry for the slow response -- was on vacation last week.
there look to be at least a few options:
both appear to support darwin. the latter as far as i understand is a downstream enterprisey distribution of nix so i went with the former.
this appears to be a consequence of us being on a preview version of ruby (3.4.0-preview2). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I kicked off CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is failing, see my suggestions inline.
When using Nix on Darwin, we ideally should be latching onto the Nix-provided AR and RANLIB.
99eb909
to
d83b5d8
Compare
d83b5d8
to
a3ed501
Compare
Kicked off CI again. |
@joshheinrichs-shopify CI is failing. Looks like a tricky one. My guess is that there's inconsistent header usage: |
hmm looks like that failing test is latching onto xcode for some reason. taking a look... |
@@ -209,10 +209,14 @@ def aix? | |||
RbConfig::CONFIG["target_os"].include?("aix") | |||
end | |||
|
|||
def nix? | |||
def unix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL, naming things is hard
Just kicked CI and it looks like the darwin-nix-enabled build is green! If everything goes green I'll merge. |
Thank you! This will be in v1.17.0 when it ships (hopefully very very soon). |
What problem is this PR intended to solve?
When using Nix on Darwin, we ideally should be latching onto the Nix-provided AR and RANLIB. Without this, when blocking Xcode via
sandbox-exec
, I see errors like this while attempting to install the gem, since we end up using the defaultar
andrunlib
Have you included adequate test coverage?
No but this seems relatively harmless?
Does this change affect the behavior of either the C or the Java implementations?
No