!jngDrdMgndWibPCYsR:nixos.org

Nix PHP

79 Members
A room for PHP developers running on Nix23 Servers

Load older messages


SenderMessageTime
26 Apr 2023
@drupol:matrix.orgPol

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.

  1. The current original route in the PR
  2. The route with dump-autoload
  3. The route with composition-c4
08:20:48
@tgerbet:matrix.orgtgerbetThe 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 break08:25:18
@drupol:matrix.orgPolI know, I'm sure it's the safest way.08:25:56
@drupol:matrix.orgPolI just want to know what we should do here.08:26:32
@drupol:matrix.orgPol 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.orgPol(example, I'm unable to clone phpstan/phpstan here)08:27:15
@drupol:matrix.orgPolSo, I'm a bit curious on which route to take.08:27:29
@jtojnar:matrix.orgJan Tojnarhow are you cloning it?08:35:55
@drupol:matrix.orgPol I'm just using c4.composerFetchDeps, nothing else 08:37:48
@drupol:matrix.orgPol
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
@drupol:matrix.orgPol
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 IFD (impure fixed derivation), and it's not allowed in nixpkgs.
08:43:40
@drupol:matrix.orgPol * It's using IFD (Import From Derivation), and it's not allowed in nixpkgs. 08:44:28
@tgerbet:matrix.orgtgerbet Yes but the idea behind composition-c4 is fine: fetching the deps without Composer to build a repository (this is the FOD) then using this repository when doing the install/dumpautoload parts 08:46:24
@tgerbet:matrix.orgtgerbetNot saying this is easy :p08:49:18
@jtojnar:matrix.orgJan Tojnar yeah, looks like it is another limitation of builtins.fetchGit, it should not be an issue if you replace it with a direct fetching 08:55:18
@drupol:matrix.orgPolhum.... going to check that.08:55:41
@drupol:matrix.orgPol I replaced builtins.fetchGit with fetchgit but that doesn't seem to fix any issue. 09:32:35
@drupol:matrix.orgPolno it's not.09:35:54
@jtojnar:matrix.orgJan Tojnar fetchgit will require a FOD hash, won’t it? I think you cannot get away from reimplementing the algorithm in something other than Nix 09:56:42
@drupol:matrix.orgPolOh man :(10:02:11
@drupol:matrix.orgPolSo basically, you're telling me that I should write a script that would download all the dependencies with git, and then only we compute the hash on that ?10:02:42
@jtojnar:matrix.orgJan Tojnaryup10:03:19
@drupol:matrix.orgPolDamn :(10:04:46
@drupol:matrix.orgPolI don't think this is going to work since a "git repo" is not reproducable without a hash. 10:09:14
@jtojnar:matrix.orgJan Tojnaryou would get the hash for the FOD10:15:21
@jtojnar:matrix.orgJan Tojnarlooks like we have this now: https://github.com/NixOS/nixpkgs/blob/9eec23bf5c978829abbb4e90a1d3d418e05a9069/pkgs/build-support/fetchgit/deterministic-git10:16:01
@tgerbet:matrix.orgtgerbetFor git it can be simplified by removing the .git folder10:19:44
@tgerbet:matrix.orgtgerbetIt is not really needed for composer10:20:00
@drupol:matrix.orgPol
In reply to @jtojnar:matrix.org
you would get the hash for the FOD
That is ok, but let's say we clone master branch today, and then some commits are pushed, and we clone it again, the hash will be different. I don't see how we could make it reproducable. If there were only one, we could use a revision, but since there are multiple repos to clone...
10:39:56
@drupol:matrix.orgPolOk I need some break11:22:46

Show newer messages


Back to Room ListRoom Version: 6