-
Notifications
You must be signed in to change notification settings - Fork 105
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
Insert binary packages to wrong repository on ARM M1 Mac #125
Comments
Good catch, and very likely. If you have a M1 machine, can you write and test a PR at your end? |
Please check #126 |
Is there anyway around this for package maintainers until this gets pulled in? I can insert the .tgz into the correct place and modify the PACKAGES file; but what needs to be done for PACKAGES.gz and PACKAGES.rds to fix it? Edit: I ran the following:
Should that be sufficient? |
Looks like the issue petered out when we never got a unit test submitted. It would be really nice if someone could add one. Until then if you built drat locally with the suggested PR and tested that it would give us a bit more insight too. |
I tried that and when I ran |
Yes, that is essentially what the unit tests / should do here and what is missing. See https://github.com/eddelbuettel/drat/tree/master/inst/extdata -- an entire directory tree of mock packages that in tests get moved around to ensure they end up in the right place. Maybe we just neeed an arm64/ subdirectory of one the binaries (in 4.1, I presume) and run a test on it. Do you want to give it a shot? I should be straightforward: do what @FelixErnst does in the tests he added to find such a file, then call one or two |
Ok trying to help this and the corresponding PR #126 along, I did the following
Sadly I see no difference. I use the
Shouldn't the M1 chipset be reflected here? Or because it is a non-binary package they use a common path for all macOS platforms? Could one of you maxOS users chime in? |
In other words do we need a 'big-sur-arm64' in there as in https://cloud.r-project.org/bin/macosx/big-sur-arm64/contrib/4.1/ ? |
Yes, for M1 binary, the path needs to be |
Thanks for confirming, So we need to adjust at least one of the path-creating helper functions. |
I just committed two packages:
in DESCRIPTION. We would have to make sure that this gets picked up correctly -- and maybe it already does but I, not having an M1 mac, cannot really check. If one of you could pick up the loose ball here and run and few more meters down the field we'd be in better shape. I don't think there is much missing, but I would love to add a test for these two (i.e. inject them into |
Are you looking for formal tests? If so, can you point me to existing such tests in the current codebase? Or are you just looking for someone on M1 to confirm it works as expected? |
Formal tests would not hurt. It all happens inside What we want now, I think, is a new (smaller) function (or just Does that makes sense to you too? |
And I should add that the current locations of the macbuilder / Arm M1 generated files foo 1.3 and bar 1.0 are "guesses" I made. If they need to be in a different directory (to better match their final locations under Arm M1) then let's adjust that. I don't have the proper hardware to test much more here. |
I'm having trouble running and/or understanding the testing script. However, I think I know changes that need to be made. It's just a few tweaks to R/insertPackages.R:
After making these changes,
puts the file in the proper directory:
Does this help? I can put it in a PR if you'd like but the changes are so minor I figured you could just add them. Unfortunately I've run out of time trying to figure out the testing script. |
Yes that does help and seems to move very much in the intended direction. I could see that we needed new subdirs As for a PR I would prefer if we could do either in the same PR (or in combination with) as the existing/open PR #126. Are you using that? |
My understanding of PR's is that I cannot modify someone else's PR without being given maintainer privleges on this repo. I'd be happy to push a new PR later this afternoon though. |
I concur, but we still want to fold both those PRs. So let me propose the following:
Don't mean to overcomplicate it but #126 did important first steps, and it was only because I got too busy that this fell to side. We should include it if we can (and its changes seem orthogonal to what we do / need). And so I just did the rebase, if you look at https://github.com/dipterix/drat-1/commits/master it is its two commits ahead. |
Thanks for putting up #131. You and I should still add a test that 'pushing a package' into an Arm 1 repo makes it accessible. You be easy is. Can you remind me how would test for Arm M1? I have code in a |
On my M1 machine:
On my colleague's Intel Mac:
|
Yep, thanks -- that should do and |
Ok, I just committed a new test file. It has two parts: one that runs everywhere for a round-turn on a source package, and then another one for Arm binaries (only conditional on 4.1 as that is the binary we have). I just ran that at the macbuilder and it passed, and it would be great if you could test it too. You can either just drop this file into the |
I grabbed your run.sh script, and ran I did try stepping through the test file manually and it did not work; I'm unsure if that's expected or not.
|
Yes you ran |
Thanks everyone, this is now merged. Yay! |
https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/
On M1 Mac, the packages are added to
bin/macosx/contrib
, but that is forx64
R. CRAN is usingbin/macosx/big-sur-arm64/contrib
instead.The text was updated successfully, but these errors were encountered: