| 5 May 2024 |
@genghiz:talk.go7box.xyz | Right, so a base64 encode of the package name? | 07:57:26 |
@genghiz:talk.go7box.xyz | I mean, it could be anything, I don't think the exact prefix matters, right? | 07:57:45 |
@genghiz:talk.go7box.xyz | I sort of meant that the builder seems to have a fixed string | 07:57:53 |
Pol | I did this instead: https://github.com/NixOS/nixpkgs/blob/990a2161d9e5c72db6227e0d395762c1ec27b751/pkgs/build-support/php/hooks/composer-install-hook.sh#L31 | 07:57:54 |
@genghiz:talk.go7box.xyz | Yeah, that's what I was confused by | 07:58:11 |
Pol | Until the patch is not in Composer, I must use that flag. | 07:58:25 |
Pol | Once it will be merged, that flag will be obsolete. | 07:58:38 |
@genghiz:talk.go7box.xyz | Right. Till then why use a fixed flag? | 07:58:43 |
Pol | Because it's not merged in Composer yet. | 07:59:04 |
@genghiz:talk.go7box.xyz | I get that. But ApcuAutoloaderPrefix can be set by the package itself, no? | 07:59:28 |
@genghiz:talk.go7box.xyz | Why not have it hew as close to what upstream will eventually be? | 07:59:37 |
Pol | Can you tell me what you would change in there? I don't get your point... sorry :S | 08:00:21 |
@genghiz:talk.go7box.xyz | I am assuming that the string ApcuAutoloaderPrefix is the literal prefix which will be set for each package | 08:00:54 |
@genghiz:talk.go7box.xyz | I think that before your upstream changes are merged (and there is a very slight chance upstream will just say no), it might be a good idea to implement the md5 hash thing downstream itself | 08:01:33 |
@genghiz:talk.go7box.xyz | That would ensure that every package will have a different prefix | 08:01:45 |
Pol | We don't care about packages having different prefix... since they are all isolated from each other, there is NO risk of collision. | 08:02:21 |
@genghiz:talk.go7box.xyz | That's also true. | 08:02:35 |
Pol | That's a cool thing from Nix :) | 08:02:44 |
@genghiz:talk.go7box.xyz | Hah | 08:02:49 |
@genghiz:talk.go7box.xyz | True that | 08:02:51 |
Pol | (one of the true thing!) | 08:02:59 |
Pol | * (one of the cool thing!) | 08:03:03 |
@genghiz:talk.go7box.xyz | However, there is still a chance of misconfiguration, right? | 08:03:40 |
@genghiz:talk.go7box.xyz | Say I have 2 PHP services running and I mistakenly point caddy to the same php-fpm socket for both services. | 08:03:57 |
Pol | No | 08:04:07 |
Pol | There won't be any single issue | 08:04:13 |
@genghiz:talk.go7box.xyz | But then the APCu cache will be shared | 08:04:23 |
@genghiz:talk.go7box.xyz | Because the same pool is being used for both services | 08:04:33 |
Pol | Then this is something I'm not aware of. | 08:04:47 |
@genghiz:talk.go7box.xyz | (I'm not a PHP dev so I'm just speculating here) | 08:05:06 |