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

Installation section gives misadvice about version (at least for 0.x.y.z) #434

Closed
dpwiz opened this issue Sep 18, 2023 · 3 comments
Closed

Comments

@dpwiz
Copy link

dpwiz commented Sep 18, 2023

It says In your cabal file: acme-example ^>= 0.1. But it doesn't know the actual version policy for the package.

Of course, there's PVP with MAJOR.MAJOR.MINOR.PATCH scheme. But even if we ignore all the explicit non-practitioners there's something like a custom for "experimental", where the "epoch" major being 0, shifts the breaking part further to the right.

Ideally the packages should signal their "breaking" scheme somewhere in the package description, but that's outside the Flora powers (x-breaking: 0.x.y, anyone?).

I think at least a hack for 0.x would make the advice a bit more resilient by recommending acme-example ^>= 0.1.2 instead.

@tchoutri
Copy link
Contributor

tchoutri commented Sep 19, 2023

@dpwiz Ok I can understand the argument for the 0.x version series. Can I let you submit a patch? This is the bit of code you want to modify:

formatInstallString :: PackageName -> Release -> Text
formatInstallString packageName Release{version} =
Text.pack . render $
hcat [pretty packageName, PP.space, rangedVersion, ","]
where
rangedVersion :: Doc
rangedVersion = "^>=" <> majMin
majMin :: Doc
majMin = pretty $ mkVersion $ List.take 2 $ versionNumbers version

@tchoutri
Copy link
Contributor

@dpwiz Do you still wish to tackle that one or can I reassign it?

@tchoutri
Copy link
Contributor

tchoutri commented Feb 5, 2024

closed by #490

@tchoutri tchoutri closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants