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

[RFC 184] versioned flakes references #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

domenkozar
Copy link
Member

@domenkozar domenkozar commented Nov 25, 2024

@domenkozar domenkozar changed the title RFC 183: versioned flakes [RFC 183] versioned flakes Nov 25, 2024
@domenkozar domenkozar changed the title [RFC 183] versioned flakes [RFC 183] versioned flakes references Nov 25, 2024
---
## Summary

Introduce a standardized versioning schema for Nix flakes using [SemVer](https://semver.org/),
Copy link
Member

@inclyc inclyc Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem in semver:

how can we prove two packages are semantically same, even if their versions are different?.

It is more reliable if: any package update will trigger "full-rebuilds" for those dependent on it.

I just feel a little bit strange about introducing "SemVer" here.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, isn't this RFC about versioning flakes, not packages?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused, isn't this RFC about versioning flakes, not packages?

That's the interesting paradox: if we don't use semantic versioning (SemVer) for packages, why should we use SemVer for flakes?

If there are valid reasons for using SemVer with 'flake' dependencies, why wouldn't those same reasons apply to packages as well?

Copy link
Member Author

@domenkozar domenkozar Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will you apply semver to nixpkgs flake?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the interesting paradox: if we don't use semantic versioning (SemVer) for packages, why should we use SemVer for flakes?

If there are valid reasons for using SemVer with 'flake' dependencies, why wouldn't those same reasons apply to packages as well?

  • Flake version is about the flake's API surface, while package version is about the package's API surface or whatever upstream wants to do, they are orthogonal to each other
  • You can't and shouldn't force developers to use a certain version format for their software, so package versions should be as flexible as possible (nixpkgs of course has no restrictions at all really)
  • Flake versions could be automatically resolved, it's well known where to search for versions and how to load them, while neither really applies to packages

I don't have an opinion on this RFC either way but the two situations are certainly very different.

@asymmetric asymmetric changed the title [RFC 183] versioned flakes references [RFC 184] versioned flakes references Nov 25, 2024
@asymmetric asymmetric added the status: open for nominations Open for shepherding team nominations label Nov 25, 2024
@nixos-discourse
Copy link

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

https://discourse.nixos.org/t/rfcsc-meeting-2024-11-25/56591/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: open for nominations Open for shepherding team nominations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants