| 26 Apr 2023 |
@drupol:matrix.org | Let's push the idea further and try to implement it correctly then | 05:45:52 |
@drupol:matrix.org | So at some point composition-c4 will be obsolete 😅 | 05:46:21 |
Jan Tojnar | since we cannot use IFD or recursive Nix in Nixpkgs – it will need to be rewritten in some other language | 05:46:22 |
@drupol:matrix.org | Yeah I don't understand all these things yet but I trust you. | 05:47:05 |
@drupol:matrix.org | What do you advise me to do to start ? | 05:47:59 |
Jan Tojnar | high level: you need to download all the packages mentioned in the lock file, and then create a json file as described in https://getcomposer.org/doc/05-repositories.md#composer | 05:49:13 |
Jan Tojnar | that is all https://github.com/fossar/composition-c4/blob/493ddc4a8279cde3bee0db1d04fd7d4838d51ab9/src/fetch-deps.nix does | 05:49:23 |
Jan Tojnar | you would need to do that in FOD | 05:50:11 |
@drupol:matrix.org | Oh. That will be fun. | 05:50:32 |
@drupol:matrix.org | I'm scared already. | 05:50:42 |
Jan Tojnar | then you would have a setup hook replace packagist with the repo you made | 05:50:50 |
Jan Tojnar | that one should work as is | 05:50:55 |
@drupol:matrix.org | I will try... | 05:51:50 |
@drupol:matrix.org | Thanks man... | 05:52:02 |
@drupol:matrix.org | I could basically copy paste that file in the pr and see how it behaves. | 05:54:33 |
@drupol:matrix.org | I can get it downloading the git repos... that works. | 06:29:20 |
@drupol:matrix.org |  Download image.png | 06:33:22 |
@drupol:matrix.org | #investigating | 06:33:23 |
@drupol:matrix.org | I've got issue while cloning repos like phpstan/phpstan... it seems to be stuck. | 07:55:00 |
@drupol:matrix.org | I just can't pass the moment it tries to download it. | 07:55:12 |
@drupol:matrix.org |  Download image.png | 07:56:45 |
@drupol:matrix.org | it's like that since now... 20 minutes or so. | 07:58:15 |
@drupol:matrix.org | tgerbet, Jan Tojnar Using composer install --no-autoloader in the FOD, then doing composer dump-autoload works very well. It's even faster to build a PHP derivation. I'm now wondering which route to take.
- The current original route in the PR
- The route with
dump-autoload
- The route with
composition-c4
| 08:20:48 |
tgerbet | The composition-c4 way to fetch the deps is likely the best way in the sense it is not under the control of Composer so less likely to break | 08:25:18 |
@drupol:matrix.org | I know, I'm sure it's the safest way. | 08:25:56 |
@drupol:matrix.org | I just want to know what we should do here. | 08:26:32 |
@drupol:matrix.org | The problem with composition-c4 is that it is much slower to build a project since it is cloning each project's repo with all the refs. | 08:26:59 |
@drupol:matrix.org | (example, I'm unable to clone phpstan/phpstan here) | 08:27:15 |
@drupol:matrix.org | So, I'm a bit curious on which route to take. | 08:27:29 |
Jan Tojnar | how are you cloning it? | 08:35:55 |