Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation of buildGoPackage #318069

Open
34 of 35 tasks
katexochen opened this issue Jun 7, 2024 · 12 comments
Open
34 of 35 tasks

Deprecation of buildGoPackage #318069

katexochen opened this issue Jun 7, 2024 · 12 comments
Labels
5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems 6.topic: best practices 6.topic: golang

Comments

@katexochen
Copy link
Contributor

katexochen commented Jun 7, 2024

Issue description

Go modules, released 6y ago, are now widely adopted in the ecosystem. Most remaining (~30) packages in nixpkgs using buildGoPackage weren't touched in years. I think most of these can be easily migrated to modules by adding the mod file downstream (or should be removed anyway as they are/their upstream is unmaintained).

Pase 1: Migrate remaining packages using buildGoPackage

Pase 2: Mark buildGoPackage as deprecated

Phase 3: Remove buildGoPackage

This will be done after the 24.10 branch-off.

  • Remove buildGoPackage
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/deprecation-of-buildgopackage/46670/1

@eclairevoyant eclairevoyant added 6.topic: best practices 5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems labels Jun 7, 2024
@ehmry
Copy link
Contributor

ehmry commented Jun 8, 2024

Are you volunteering to add the mod files downstream?

@tie
Copy link
Member

tie commented Jun 8, 2024

Are you volunteering to add the mod files downstream?

Why do we need this? Go modules were designed to be compatible with existing ecosystem. Worst case, you can use local go.{mod,sum}, similar to Gemfile{,.lock} we already have in Ruby language framework.
Am I missing something here? Does this use case not work with buildGoModule (to be honest, I wouldn’t be surprised if it doesn’t given that it’s not the most idiomatic Nix/Nixpkgs piece of code I’ve seen)?

@katexochen
Copy link
Contributor Author

Are you volunteering to add the mod files downstream?

Not sure I get your question. I'm happy if people want to help with the migration.

@ehmry
Copy link
Contributor

ehmry commented Jun 8, 2024

Sorry, I'm fine with migrating if we keep the packages we have, I just don't want to see packages declared unmaintained and removed because of changes in packaging practices.

@katexochen
Copy link
Contributor Author

Sorry, I'm fine with migrating if we keep the packages we have, I just don't want to see packages declared unmaintained and removed because of changes in packaging practices.

I'd argue that this isn't a change in nixpkgs packaging practices, but rather a change in the Go ecosystem that these projects didn't follow -- sometimes, because it's difficult for them to make the switch or they are not willing to, but most of the time because the upstream project is just unmaintained (no reactions to issues/PRs, no commit for several years).

I also think it is fine to remove packages, for example if their upstream project is archived, or they are unmaintained and a burden to drag along, or simply lack relevance today (compare package acceptance criteria).

@AndersonTorres
Copy link
Member

dep2nix has three years without updates:
https://github.com/nixcloud/dep2nix

@ehmry
Copy link
Contributor

ehmry commented Jun 8, 2024

Software doesn't magically break after a year because no one was adding features. I thought that Go had a stable spec and standard library.

@Gerg-L
Copy link
Contributor

Gerg-L commented Jun 9, 2024

I'm going to attempt to migrate docker

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/1016/136

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1732

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/1016/138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5. scope: tracking Long-lived issue tracking long-term fixes or multiple sub-problems 6.topic: best practices 6.topic: golang
Projects
Status: In progress
Development

No branches or pull requests

7 participants