Skip to content

Remove fetcherVersion = 1 and 2 from fetchPnpmDeps #494184

Closed

Description

@qweered

Activity

  1. self-assigned this
    on Feb 25, 2026
  2. added
    0.kind: enhancement
    6.topic: nodejs
    5.scope: tracking
    on Feb 25, 2026
  3. qweered commented on Feb 26, 2026

    @qweered
    ContributorAuthor
  4. gepbird commented on Feb 26, 2026

    @gepbird
    Contributor

    I was thinking of a slower, passive migration where we only allow fetcherVersion >= 3 for the upcoming pnpm_11 and we remove the older versions when the majority of packages have migrated. This would take a few months or even years though as the packages/upstreams are not the fastest with migrating to the latest version. Instances with grep:

    • pnpm_8: 19
    • pnpm_9: 184 (first release is Apr 16, 2024)
    • pnpm_10: 139 (first release is Jan 7, 2025)

    I'm not against an active migration, but I think we should have a longer period of fetchPnpmDeps warning for older versions rather than throwing immediately. I think phasing out versions 1 and 2 can be in the same PR, the treewide is fine how you started it.

    make fetcherVersion = 3 default and remove need to specify it?

    Please don't do this. The reason fetcherVersion was introduced in the first place is to allow us to modify the FOD output without having to regenerate hashes for all instances. Sure, we can control hashes inside nixpkgs (although mass hash changes for updates is discouraged), but out of tree pnpm packages will break.
    For the second fetcher version version (first time we wanted to modify it) it solved a bug where the output was not reproducible and this solution changed most existing hashes.
    So phasing out is out of the question, and even though it's +1 line for each package, I'd like to keep the version explicit otherwise from that change we'd need to assume the default is 3, maybe in the future we introduce a 4th version and make that the default, people who updated nixpkgs with default version 3 to default 4 will experience breakage, even if it's likely uncommon.

    cc @Scrumplex

  5. RossSmyth commented on Feb 26, 2026

    @RossSmyth
    Contributor

    The nice part about Nixpkgs is we can just mass migrate whenever we want to. There's no reason to wait if someone wants to put in the effort. There's no reason to be passive.

    I do think that rather than removing them immediately, letting them emit a warning for a release cycle is good for external consumers ("this will stop working in 26.11, please migrate" or something).

  6. qweered commented on Apr 24, 2026

    @qweered
    ContributorAuthor

    Opened #513215

  7. qweered commented on Apr 27, 2026

    @qweered
    ContributorAuthor

    Opened 5 more prs migrating all fetcherVersion 2 -> 3, see header #494184 (comment)

  8. qweered commented on Apr 28, 2026

    @qweered
    ContributorAuthor

    cc @gepbird @Scrumplex for review

  9. gepbird commented on Jun 3, 2026

    @gepbird
    Contributor

    Thanks for the cleanup @qweered !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

0.kind: enhancement5.scope: tracking6.topic: nodejs

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions