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

Removing uneeding branchName argument for github packages #238

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

b-rodrigues
Copy link
Contributor

After our discussions and some thought, I think that indeed, we should simply get rid of this argument, and better do it now before submitting to CRAN. I have also changed the code on the server, but not deployed yet; locally, it works!

@b-rodrigues
Copy link
Contributor Author

b-rodrigues commented Jul 5, 2024

Once we merge this, I'll also merge on the server.

@b-rodrigues
Copy link
Contributor Author

If you want to test the api locally: https://github.com/b-rodrigues/git2nixsha/tree/main

@b-rodrigues
Copy link
Contributor Author

b-rodrigues commented Jul 5, 2024

Tests pass locally, but complain here because when nix is not available, they try to reach the api, however the new version without branchName is not deployed it. I'd like your second opinion before pulling the trigger on the api and this PR.

@philipp-baumann
Copy link
Collaborator

After our discussions and some thought, I think that indeed, we should simply get rid of this argument, and better do it now before submitting to CRAN. I have also changed the code on the server, but not deployed yet; locally, it works!

I agree its a good idea to do this now!

@philipp-baumann
Copy link
Collaborator

philipp-baumann commented Jul 8, 2024

If you want to test the api locally: https://github.com/b-rodrigues/git2nixsha/tree/main

Can we replace this:

https://github.com/b-rodrigues/git2nixsha/blob/6ad61c8be5f343c6f8851f9617d218a7c013d8ee/git2nixsha.R#L15

by the new approach like we do locally in hash_url() and hash_git?:
https://github.com/b-rodrigues/rix/blob/699372eaadef9a24b7f23121641ce97754fc6659/R/nix_hash.R#L135
https://github.com/b-rodrigues/rix/blob/699372eaadef9a24b7f23121641ce97754fc6659/R/nix_hash.R#L22

Then we really have consistent behavior. To be sure, I think we should also add a new test (CI with nix installed), and compare equality of get_sri_hash_deps() test output after options(rix.hash_nix="api_server") and tets whether we get identical results compared to calling it after options(rix.hash_nix="locally") (only run if nix is installed).

Overall, not using git2r maybe we get also rid of some hashing issues found before (if its not related to an other issue). Anyway, I think it's good that we have the mechanisms match 1 to 1 locally and on the hashing API server.

@b-rodrigues
Copy link
Contributor Author

b-rodrigues commented Jul 9, 2024

done with b-rodrigues/git2nixsha@01151eb

@b-rodrigues b-rodrigues merged commit c044ad5 into master Jul 11, 2024
6 of 8 checks passed
@b-rodrigues b-rodrigues deleted the remove_branchName branch July 11, 2024 12:34
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.

2 participants