Skip to content

build-support/php: add installCheckPhase#261429

Merged
etu merged 2 commits intomasterfrom
php/build-support/add-installCheckPhase
Oct 17, 2023
Merged

build-support/php: add installCheckPhase#261429
etu merged 2 commits intomasterfrom
php/build-support/add-installCheckPhase

Conversation

@drupol
Copy link
Contributor

@drupol drupol commented Oct 16, 2023

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@drupol drupol requested a review from etu as a code owner October 16, 2023 15:26
@drupol drupol mentioned this pull request Oct 16, 2023
4 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Oct 16, 2023
@lorenzleutgeb lorenzleutgeb self-requested a review October 16, 2023 19:16
Copy link
Member

@lorenzleutgeb lorenzleutgeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation you are suggesting is straightforward and minimal 👍🏻

I tried to test this, and I believe I found one issue: installCheck is likely disabled in many configurations, and so you should consider additionally exposing doInstallCheck.

# TODO(@Ericson2314): Make unconditional / resolve #33599
# InstallCheck phase
, doInstallCheck ? config.doCheckByDefault or false

The default for doInstallCheck is false. It can be overriden by setting config.doCheckByDefault = true. I tried this, but some derivation quite far away from my test in its dependency tree failed to build. I think it's unreasonable to expect consumers to set config.doCheckByDefault.

@drupol
Copy link
Contributor Author

drupol commented Oct 16, 2023

Job done, can you check again ?

@drupol
Copy link
Contributor Author

drupol commented Oct 16, 2023

@GrahamcOfBorg build phpPackages.composer

@lorenzleutgeb lorenzleutgeb self-requested a review October 16, 2023 21:18
Copy link
Member

@lorenzleutgeb lorenzleutgeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR I was able to initiate execution of unit tests of a PHP project. In other words by setting doInstallCheck = true; installCheckPhase = "..."; I could test the code I am packaging. Since the changes are quite minimal, easy to understand, and improve buildComposerProject by allowing test execution, I approve this PR.

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 16, 2023
@etu etu merged commit 4c8c186 into master Oct 17, 2023
@etu etu deleted the php/build-support/add-installCheckPhase branch October 17, 2023 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants