Navigation Menu

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

arcanist: copy directly from $PWD to pick up any applied patches #95879

Merged
merged 1 commit into from Nov 9, 2020

Conversation

cpcloud
Copy link
Contributor

@cpcloud cpcloud commented Aug 20, 2020

Motivation for this change

The arcanist recipe should copy from $PWD instead of $src
which appears to not contain the patched sources.

cc @nagisa

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot requested a review from thoughtpolice August 21, 2020 14:10
@cpcloud cpcloud changed the title bug: copy directly to pick up any applied patches arcanist: copy directly to pick up any applied patches Aug 22, 2020
@nagisa
Copy link
Contributor

nagisa commented Aug 23, 2020

cc @Ekleog

@Ekleog
Copy link
Member

Ekleog commented Aug 24, 2020

Are you sure this is correct? I just compiled before and after merging this, and get this diff, where result-2 is pre-diff and result is post-diff

$ diff -r result-2 result
diff -r result-2/bin/arc result/bin/arc
3c3
< exec /nix/store/5i9100265z0rdfvny48xz72kxnl141pc-php-with-extensions-7.4.8/bin/php /nix/store/bzvx97n5rjkvnj21gyiff1b4zx8knay1-arcanist-20200711/libexec/arcanist/bin/arc "$@"
---
> exec /nix/store/5i9100265z0rdfvny48xz72kxnl141pc-php-with-extensions-7.4.8/bin/php /nix/store/jj7qnd9dgwkin3kzhbqb29vxzqvl5f25-arcanist-20200711/libexec/arcanist/bin/arc "$@"
diff -r result-2/bin/phage result/bin/phage
3c3
< exec /nix/store/5i9100265z0rdfvny48xz72kxnl141pc-php-with-extensions-7.4.8/bin/php /nix/store/bzvx97n5rjkvnj21gyiff1b4zx8knay1-arcanist-20200711/libexec/arcanist/bin/phage "$@"
---
> exec /nix/store/5i9100265z0rdfvny48xz72kxnl141pc-php-with-extensions-7.4.8/bin/php /nix/store/jj7qnd9dgwkin3kzhbqb29vxzqvl5f25-arcanist-20200711/libexec/arcanist/bin/phage "$@"
Only in result/libexec/arcanist/src/parser/xhpast/bin: xhpast
Only in result/libexec/arcanist/support/xhpast: libxhpast.a
Only in result/libexec/arcanist/support/xhpast: node_names.hpp
Only in result/libexec/arcanist/support/xhpast: parser.yacc.o
Only in result/libexec/arcanist/support/xhpast: scanner.lex.o
Only in result/libexec/arcanist/support/xhpast: xhpast

This looks to me as though it were a regression, putting .o files in the nix store? as xhpast is, to the best of my understanding, a support tool for phab, that people don't have to manually call? But then, maybe I'm missing something :)

@nagisa
Copy link
Contributor

nagisa commented Aug 24, 2020

yeah xhpast is built and installed a line above. We def don't wanna intermediate build artifacts in the output.

@Ekleog
Copy link
Member

Ekleog commented Aug 24, 2020

Oh, I just understood the objective of this diff: to make .override work with a patches. If this is correct, maybe run make clean / make mrproper or similar for arcanist, and/or rm uninteresting files, before running the cp?

@cpcloud
Copy link
Contributor Author

cpcloud commented Aug 24, 2020

Darn, ok. I'll put up a fix later this evening.

@cpcloud cpcloud changed the title arcanist: copy directly to pick up any applied patches arcanist: copy directly from $PWD to pick up any applied patches Nov 8, 2020
@cpcloud
Copy link
Contributor Author

cpcloud commented Nov 8, 2020

@Ekleog Would you mind reviewing this again? I've removed the artifacts from the install output. Thanks!

@Ekleog
Copy link
Member

Ekleog commented Nov 9, 2020

Looks great to me! Actually, diff -r before/after this PR also shows it adds an executable (xhpast) though I'm not sure what exactly it is used for, and it now removes .hpp/.cpp yacc/lex files that were being leftover garbage, so it's a net plus even for people who don't use patches.

Thank you! :D

@Ekleog Ekleog merged commit 2472122 into NixOS:master Nov 9, 2020
@Ekleog
Copy link
Member

Ekleog commented Nov 9, 2020

As for backports, this is along the fine line of whether it's a bug important enough to warrant backporting and the associated risks… I'd say it probably is not, and people who want it should probably import from unstable, so unless I hear an objecting voice I'm not going to backport to stable :)

@cpcloud cpcloud deleted the cp-arc branch November 9, 2020 22:16
@cpcloud
Copy link
Contributor Author

cpcloud commented Nov 9, 2020

IMO no urgent need for a backport.

@cpcloud
Copy link
Contributor Author

cpcloud commented Nov 9, 2020

Then again I live on unstable so perhaps I am not the best person to make that call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants