Repository navigation
Replies: 1 comment 1 reply
|
@MarcoGorelli would this unblock you on Monty? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
tl;dr We need to publish Pyrefly on crates.io to remove a blocker to including Pyrefly in Monty (pydantic/monty#501). To make it clear that our library API is unstable, I propose publishing using a
0.0.100X00Yversioning scheme derived from our regular1.X.Yreleases (e.g.,1.4.1would map to0.0.1004001).Context
Monty publishes to crates.io, so we need to publish Pyrefly’s crates for Monty to be able to depend on them. However, Pyrefly does not have a stable library API, so if we published our crates using the same
1.X.Yversioning that our PyPI and VSCode releases follow, the version numbers would be misleading.Proposal
Publish our crates with
0.0.Nversioning to make it obvious that the API is highly unstable.Nwill be computed from our regular1.X.Yversion asN = 1,000,000 + 1,000 * X + Y. I like this particular mapping for two reasons:1.X.Yis0.0.100X00Y.0.X.Yversion numbers that we’ve already used for our alpha and beta releases.The versioning leaves room for 999 patch releases to the same minor version and 999 minor releases (about 80 years’ worth at one release a month). Dev releases will have their
-dev.Nsuffix copied over unchanged.Ongoing cost
Even with
0.0.Nversioning, publishing our crates means committing to some level of ongoing support for them:[patch]overrides.The boring stuff (i.e., the technical details)
We have 11 crates that need to be published. The main
pyreflycrate already has a placeholder0.0.1release, which is harmless. We should configure trusted publishing and publish via a GitHub workflow, as we already do for PyPI.In order to rewrite the version number for crates.io publishing and nothing else, we can run a small script in the publishing workflow to edit
Cargo.tomlbefore publishing. We would never commit these edits.All reactions