| 26 Apr 2023 |
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 |
Pol | Yeah I don't understand all these things yet but I trust you. | 05:47:05 |
Pol | 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 |
Pol | Oh. That will be fun. | 05:50:32 |
Pol | 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 |
Pol | I will try... | 05:51:50 |
Pol | Thanks man... | 05:52:02 |
Pol | I could basically copy paste that file in the pr and see how it behaves. | 05:54:33 |
Pol | I can get it downloading the git repos... that works. | 06:29:20 |
Pol |  Download image.png | 06:33:22 |
Pol | #investigating | 06:33:23 |
Pol | I've got issue while cloning repos like phpstan/phpstan... it seems to be stuck. | 07:55:00 |
Pol | I just can't pass the moment it tries to download it. | 07:55:12 |
Pol |  Download image.png | 07:56:45 |
Pol | it's like that since now... 20 minutes or so. | 07:58:15 |
Pol | 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 |
Pol | I know, I'm sure it's the safest way. | 08:25:56 |
Pol | I just want to know what we should do here. | 08:26:32 |
Pol | 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 |
Pol | (example, I'm unable to clone phpstan/phpstan here) | 08:27:15 |
Pol | So, I'm a bit curious on which route to take. | 08:27:29 |
Jan Tojnar | how are you cloning it? | 08:35:55 |
Pol | I'm just using c4.composerFetchDeps, nothing else | 08:37:48 |
Pol | In reply to @tgerbet:matrix.org 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 It's using IFX (impure fixed derivation), and it's not allowed in nixpkgs. | 08:43:31 |