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

build-support/php: init new builder php.buildComposerWithPlugin, refactor php.packages.composer, etc #312231

Merged

Conversation

drupol
Copy link
Contributor

@drupol drupol commented May 16, 2024

Refactor composer to remove the use of buildComposerProject in it, so it doesn't use composer-local-repo-plugin, leaving us a total freedom to improve how derivation like composer-local-repo-plugin are handled.

This was a necessary evil to make php.buildComposerWithPlugin works correctly, or else we end up in infinite recursion due to the fact that composer-local-repo-plugin require composer which requires composer-local-repo-plugin... We should have done that from the beginning.

The Composer plugin composer-local-repo-plugin is now built using php.buildComposerWithPlugin.

This PR doesn't update the vendorHash, it's just some refactoring and cleaning.

@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch from ad9419e to 3e60dfa Compare May 16, 2024 14:51
@ofborg ofborg bot requested review from talyz, aanderse, Ma27 and patka-123 May 16, 2024 15:27
@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch 4 times, most recently from b18e364 to 2227efd Compare May 16, 2024 16:13
@drupol drupol marked this pull request as ready for review May 16, 2024 16:15
@lucasew
Copy link
Contributor

lucasew commented May 16, 2024

Result of nixpkgs-review pr 312231 run on x86_64-linux 1

74 packages built:
  • adminer
  • bookstack
  • composer-require-checker
  • davis
  • firefly-iii
  • grocy
  • librenms
  • movim
  • n98-magerun
  • n98-magerun2
  • paratest
  • pdepend
  • pest
  • phel
  • php81Packages.box (php82Packages.box ,php83Packages.box)
  • php81Packages.castor
  • php81Packages.composer
  • php81Packages.composer-local-repo-plugin
  • php81Packages.cyclonedx-php-composer
  • php81Packages.deployer
  • php81Packages.grumphp
  • php81Packages.phan
  • php81Packages.phing
  • php81Packages.phive
  • php81Packages.php-codesniffer
  • php81Packages.php-cs-fixer
  • php81Packages.php-parallel-lint
  • php81Packages.phpinsights
  • php81Packages.phpmd
  • php81Packages.phpstan
  • php81Packages.psalm
  • php81Packages.psysh
  • php82Packages.castor
  • php82Packages.composer
  • php82Packages.composer-local-repo-plugin
  • php82Packages.cyclonedx-php-composer
  • php82Packages.deployer
  • php82Packages.grumphp
  • php82Packages.phan
  • php82Packages.phing
  • php82Packages.phive
  • php82Packages.php-codesniffer
  • php82Packages.php-cs-fixer
  • php82Packages.php-parallel-lint
  • php82Packages.phpinsights
  • php82Packages.phpmd
  • php82Packages.phpstan
  • php82Packages.psalm
  • php82Packages.psysh
  • php83Packages.castor
  • php83Packages.composer
  • php83Packages.composer-local-repo-plugin
  • php83Packages.cyclonedx-php-composer
  • php83Packages.deployer
  • php83Packages.grumphp
  • php83Packages.phan
  • php83Packages.phing
  • php83Packages.phive
  • php83Packages.php-codesniffer
  • php83Packages.php-cs-fixer
  • php83Packages.php-parallel-lint
  • php83Packages.phpinsights
  • php83Packages.phpmd
  • php83Packages.phpstan
  • php83Packages.psalm
  • php83Packages.psysh
  • phpactor
  • phpdocumentor
  • phpunit
  • pixelfed
  • platformsh
  • robo
  • snipe-it
  • vimPlugins.phpactor

@drupol drupol marked this pull request as draft May 17, 2024 07:09
@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch 2 times, most recently from 4b3afd8 to 4e66d97 Compare May 17, 2024 08:23
This doesn't change anything to the existing workflow
@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch 2 times, most recently from daccc05 to cd327e8 Compare May 17, 2024 08:26
@drupol
Copy link
Contributor Author

drupol commented May 17, 2024

@ofborg build php.packages.composer phpunit php.packages.composer-local-repo-plugin php.packages.cyclonedx-php-composer

@drupol drupol marked this pull request as ready for review May 17, 2024 08:46
@drupol drupol changed the title build-support/php: refactor php.packages.composer and add php.composer-with-plugin build-support/php: init new build php.buildComposerWithPlugin, refactor php.packages.composer, etc May 17, 2024
@drupol drupol changed the title build-support/php: init new build php.buildComposerWithPlugin, refactor php.packages.composer, etc build-support/php: init new builder php.buildComposerWithPlugin, refactor php.packages.composer, etc May 17, 2024
@jtojnar
Copy link
Member

jtojnar commented May 18, 2024

This was a necessary evil to make php.buildComposerWithPlugin

How would one go about using multiple plug-ins?

This PR doesn't update the vendorHash, it's just some refactoring and cleaning.

Do you mean the updating is not necessary, or that you did not bother with it?

@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch from 35f5ea2 to 98cd2f4 Compare May 19, 2024 14:51
@ofborg ofborg bot requested a review from patka-123 May 19, 2024 15:18
@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch from 9300acd to 752f841 Compare May 19, 2024 16:29
@ofborg ofborg bot requested a review from patka-123 May 19, 2024 17:02
@drupol

This comment was marked as resolved.

@drupol drupol force-pushed the build-support/php/init-composer-with-plugin branch from 752f841 to c99246f Compare May 19, 2024 20:10
@ofborg ofborg bot requested a review from patka-123 May 19, 2024 20:46
@drupol
Copy link
Contributor Author

drupol commented May 19, 2024

I'll wait until the 23rd of May so that other people can have some time to review this. If no objection, I'll merge it on that date.

@drupol
Copy link
Contributor Author

drupol commented May 23, 2024

@NixOS/nixpkgs-merge-bot merge

@nixpkgs-merge-bot
Copy link
Contributor

@drupol merge not permitted (#305350):
pkgs/build-support/php/builders/default.nix is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/build-composer-project.nix is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/build-composer-repository.nix is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/build-composer-with-plugin.nix is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/hooks/composer-install-hook.sh is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/hooks/composer-repository-hook.sh is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/hooks/composer-with-plugin-vendor-hook.sh is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/hooks/default.nix is not in pkgs/by-name/
pkgs/build-support/php/builders/v1/hooks/php-script-utils.bash is not in pkgs/by-name/
pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix is not in pkgs/by-name/
pkgs/build-support/php/pkgs/composer-phar.nix is not in pkgs/by-name/
pkgs/development/interpreters/php/generic.nix is not in pkgs/by-name/
pkgs/development/php-packages/composer-local-repo-plugin/composer.lock is not in pkgs/by-name/
pkgs/development/php-packages/composer-local-repo-plugin/default.nix is not in pkgs/by-name/
pkgs/development/php-packages/composer/default.nix is not in pkgs/by-name/
pkgs/development/php-packages/cyclonedx-php-composer/composer.lock is not in pkgs/by-name/
pkgs/development/php-packages/cyclonedx-php-composer/default.nix is not in pkgs/by-name/
pkgs/top-level/php-packages.nix is not in pkgs/by-name/

@drupol drupol merged commit a18047b into NixOS:master May 23, 2024
22 checks passed
@drupol drupol deleted the build-support/php/init-composer-with-plugin branch May 23, 2024 10:03
Copy link
Contributor

Backport failed for release-23.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-23.11
git worktree add -d .worktree/backport-312231-to-release-23.11 origin/release-23.11
cd .worktree/backport-312231-to-release-23.11
git switch --create backport-312231-to-release-23.11
git cherry-pick -x b258b44a5d0f2c68838eb631fd142f6ac7513d1e bd92bef332afec55f2871c21a875e5d3c0fbe6d4 d503bc4f4a20f137a253d4575e2d32ab7c013f8d 6bad2e219e75bac3e5b3f3959c07cb20894b5d51 450e9396fd52fe309f4e7ba42a3eecea316f3091 c99246f169aa2ae68a483a86d733a7645ad44089

1 similar comment
Copy link
Contributor

Backport failed for release-23.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-23.11
git worktree add -d .worktree/backport-312231-to-release-23.11 origin/release-23.11
cd .worktree/backport-312231-to-release-23.11
git switch --create backport-312231-to-release-23.11
git cherry-pick -x b258b44a5d0f2c68838eb631fd142f6ac7513d1e bd92bef332afec55f2871c21a875e5d3c0fbe6d4 d503bc4f4a20f137a253d4575e2d32ab7c013f8d 6bad2e219e75bac3e5b3f3959c07cb20894b5d51 450e9396fd52fe309f4e7ba42a3eecea316f3091 c99246f169aa2ae68a483a86d733a7645ad44089

Copy link
Contributor

Git push to origin failed for release-24.05 with exitcode 1

Copy link
Contributor

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.

5 participants