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 mojave support #82

Open
michaelgmiller opened this issue Sep 28, 2018 · 5 comments
Open

macOS mojave support #82

michaelgmiller opened this issue Sep 28, 2018 · 5 comments
Assignees

Comments

@michaelgmiller
Copy link

Similar to #17, pants needs binaries for macOS mojave

Exception message: Update --binaries-path-by-id to find binaries for (u'darwin', u'18')

@benjyw
Copy link
Contributor

benjyw commented Oct 3, 2018

@mateor you were able to do this last time, feel like taking it on again? Also, is this possible to do in some scratch mac on https://www.macstadium.com/ ? Happy to do it if so and you remind me how...

@benjyw
Copy link
Contributor

benjyw commented Oct 3, 2018

@michaelgmiller are you able to work around this with

[GLOBAL]
binaries_path_by_id = +{('darwin', '18'): ('mac', '10.13')}

or --binaries-path-by-id="+{('darwin', '18'): ('mac', '10.13')}"

for now?

@michaelgmiller
Copy link
Author

@michaelgmiller are you able to work around this with

[GLOBAL]
binaries_path_by_id = {('darwin', '18'): ('mac', '10.13')}

or --binaries-path-by-id="{('darwin', '18'): ('mac', '10.13')}'

for now?

Yup, I've been using that as a workaround in the mean time!

@benjyw
Copy link
Contributor

benjyw commented Oct 4, 2018

See pantsbuild/pants#6591 for a more permanent fix that should cover future mac upgrades (at least until Macs change their hardware arch, or there's some other breaking change...)

@mateor
Copy link
Member

mateor commented Dec 5, 2018

Hi all. Sorry I missed this ping. I only saw it now when I realized that watchman wasn't updated.

Rebuilding the binaries properly requires wide triaging of Make files for bitrot across a variety of ecosystems, and was a real pain when I did it for 10.12. I think that Benjy's patch is a big win overall.

John took the shortest path for 10.13 and generously documented his approach in the commit:

$ find $PWD/build-support/bin -wholename "*/mac/10.12/*" -type f | {
  while read binary
  do
    newbin=${binary/\/10.12\//\/10.13\/}

    binary=$(basename ${newbin})
    newdir=$(dirname ${newbin})
    version=$(basename ${newdir})

    rm -rf ${newdir}
    mkdir -p ${newdir}
    cd ${newdir}
    ln -s ../../10.12/${version}/${binary}
  done
}

My org has been using the remapping trick via environmental variable, so AFIACT the compatibility guarantees have held.

          # Hack(s) to allow OSX 10.14 early adopters to use the 10.13 binaries before we upload copies to that namespace.
          export PANTS_BINARIES_PATH_BY_ID=${PANTS_BINARIES_PATH_BY_ID:-'{ ("darwin", "18"): ("mac", "10.13") }'}

I can't break away to do a full rebuild but given that our upstream solution of resuse is live in newer Pants distributions, how about I run that snippet and update this codebase with 10.14 symlinks for anyone using a Pants version that predates your patch?

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

No branches or pull requests

3 participants