| 25 Apr 2023 |
Pol | I don't know what to think yet there. | 18:19:09 |
Pol | Would be nice to have some additional inputs from others. | 18:19:24 |
Pol | Added in the doc:
As the autoloader optimization can be activated directly within the
`composer.json` file, we do not enable any autoloader optimization flags.
| 18:23:02 |
Jan Tojnar | tgerbet, Pol both vendor directory and cache sound too much to me like it could change whenever composer wants | 19:34:34 |
Jan Tojnar | I would just create a new composer repository like composition-c4 does | 19:35:06 |
Jan Tojnar | and make FOD of that | 19:35:11 |
Jan Tojnar | of course, you would still need to clean out the .git directories | 19:35:45 |
Jan Tojnar | but sounds like the method with least amount of jank | 19:36:14 |
Pol | I updated the docs with how to override the composer.json file. | 20:05:56 |
| 26 Apr 2023 |
Pol | I'd be happy to merge features from your project in here, but I don't know where to begin. I haven't fully grasped yet what makes it more efficient. | 05:05:49 |
Jan Tojnar | it is not really more efficient but it is a different approach that will not change when composer changes | 05:42:46 |
Jan Tojnar | since it is basically creating a packagist mirror | 05:43:10 |
Pol | But it only works for git based deps, right ? | 05:43:42 |
Jan Tojnar | that is the limitation of composition-c4 because it uses builtins.fetchGit but it will not be a problem for you, when you will use a different fetcher (e.g. git clone inside FOD) | 05:44:46 |
Jan Tojnar | I meant composition-c4 only as approach, the implementation will need to be completely different | 05:45:33 |
Pol | Let's push the idea further and try to implement it correctly then | 05:45:52 |
Pol | 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 |
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 |