| 5 May 2024 |
@genghiz:talk.go7box.xyz | I trust you | 08:10:23 |
@genghiz:talk.go7box.xyz | 😄 | 08:10:40 |
Pol | jq -r -c 'try ."content-hash"' < composer.lock | 08:11:06 |
@genghiz:talk.go7box.xyz | Even better. | 08:12:47 |
Pol | Pushed the changes. | 08:13:11 |
Pol | Thanks for the suggestion | 08:13:27 |
@genghiz:talk.go7box.xyz | No worries | 08:13:34 |
@genghiz:talk.go7box.xyz | You might need to add jq as a buildInput or something. If you don't want to do that, you can probably also use md5sum composer.lock | awk '{ print $1 }' | 08:20:13 |
Pol | It's already in there | 08:22:11 |
Pol | Look at the PR :) | 08:24:59 |
Pol | Oops I did a stupid thing. | 08:25:37 |
Pol | Let me fix that. | 08:25:42 |
Pol | Done. | 08:29:29 |
Pol | Now you can test it properly | 08:32:59 |
Pol | By just using buildComposerProjectNext. | 08:33:08 |
| andmuz joined the room. | 11:39:09 |
Pol | I made further improvements | 12:09:47 |
Pol | Definitely much better than before, and also faster. | 12:09:59 |
Pol | Jan Tojnar: I implemented the changes you suggested from https://github.com/NixOS/nixpkgs/pull/308608 in https://github.com/NixOS/nixpkgs/pull/308059 In the last commit, I'm trying to make the upgrade of psysh, but I end up in a infinite recursion. I've been spending the last hour trying to figure out workarounds, but I'm running out of ideas, do you think you could have a look? | 12:23:11 |
Pol | The overriding part is:
composerRepository = finalAttrs.composerRepository.overrideAttrs (oldAttrs: {
preBuild = ''
setComposeRootVersion
composer config platform.php 7.4
composer require --no-update symfony/polyfill-iconv symfony/polyfill-mbstring
composer require --no-update --dev roave/security-advisories:dev-latest
'';
});
| 14:38:07 |
Pol | When I remove it, I don't have the infinite recursion. something must be wrong somewhere, I can't figure it out. | 14:38:33 |
Jan Tojnar | Pol: right, you finalAttrs.composerRepository in physh ends up pointing to the composerRepository attribute in buildComposerProjectOverride, and the previousAttrs.composerRepository in that points to the composerRepository in physh | 14:52:20 |
Jan Tojnar | * Pol: right, the finalAttrs.composerRepository in physh ends up pointing to the composerRepository attribute in buildComposerProjectOverride, and the previousAttrs.composerRepository in that points to the composerRepository in physh | 14:52:30 |
Pol | Let me re-read that slowly. | 14:52:43 |
Pol | OK got it. | 14:53:04 |
Pol | What should we do to fix that? | 14:53:13 |
Pol | This is the part where I'm totally insecure in the PHP Composer Builder | 14:55:27 |
Jan Tojnar | I guess the cleanest solution would be just using composerRepository = mkComposerRepositoryNext { … }; when more advanced usage is needed | 15:01:06 |
Pol | Argh | 15:02:03 |
Pol | In reply to @drupol:matrix.org
The overriding part is:
composerRepository = finalAttrs.composerRepository.overrideAttrs (oldAttrs: {
preBuild = ''
setComposeRootVersion
composer config platform.php 7.4
composer require --no-update symfony/polyfill-iconv symfony/polyfill-mbstring
composer require --no-update --dev roave/security-advisories:dev-latest
'';
});
There's no way to override it cleanly like that? | 15:02:31 |