refactor(extractors/services): simplify logic#136
Conversation
Checks are simplified or removed entirely if unnecessary. Usage of nicer functions. Should be non-breaking.
|
I think there are some nice ones in there, but a lot of |
No I don't think so unless I made a mistake on the way. In fact was this whole redundant info = mkIf (
config.services.forgejo.settings ? server.ROOT_URL
) config.services.forgejo.settings.server.ROOT_URL;
details.listen = mkIf (address != null && port != null) { text = "${address}:${toString port}"; };It checks whether there is an address and a port. If we look at the current stable release (25.11) then we can see here that they are always defined and guaranteed to be non null. Edit: Seems like I can't read. "older nixpkgs releases" is plural referring to even older (e.g. 24.11, etc.). @oddlama what nixpkgs releases should we as maintainers keep in mind? Imo we should at some point remove the checks to keep everything tidy. I don't see a benefit to support "ancient" nixpkgs releases. Do you have a policy for that in mind? |
Currently we just have no official statement on what we support. I guess it would be fair to say we support the current unstable and the latest stable release only, in which case you are right and the checks can be removed. I'll have to read through this thoroughly tomorrow before merging. If we introduce more |
|
Let's do this and commit to only latest stable + unstable support |
Checks are simplified or removed entirely if unnecessary. Usage of nicer functions. Should be non-breaking.