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

Document the versioning scheme #19114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions docs/website/docs/developers/general/versioning-scheme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
icon: octicons/versions-16
---

# Versioning scheme

A shared version format is used for the packages

* `iree-base-compiler` (formally named `iree-compiler`)
* `iree-base-runtime` (formally named `iree-runtime`)
* `iree-turbine`

## Overview

Type of build | Version format | Version example
------------- | -------------- | ---------------
Stable release (PyPI) | `X.Y.Z` | `3.0.0`
Nightly release (GitHub `schedule`) | `X.Y.ZrcYYYYMMDD` | `3.0.0rc20241029`
Dev release (GitHub `pull_request`) | `X.Y.Z.devNN` | `3.0.0.dev+6d55a11`
Local build | `X.Y.Z.devNN` | `3.0.0.dev+6d55a11`

### Key

Identifier | Explanation
---------- | -----------
`X` | Major version
`Y` | Minor version
`Z` | Patch version
`rc` | release candidate (`main` branch)
`dev` | developer build (code on pull request branches)
`YYYY` | Year, e.g. `2024`
`MM` | Month, e.g. `10`
`DD` | Day, e.g. `29`
`NN` | git commit hash, e.g. `6d55a11`

## Composition of version numbers

A release number is in the format of `X.Y.Z` (MAJOR.MAJOR.PATCH)

* `X` and `Y` are defined as shared version numbers between all packages.
* The patch level `Z` MAY be incremented individually.
* A PATCH release contains only bug fixes and the version `Z` (`x.y.Z`) MUST be
incremented. A bug fix is an internal change that fixes incorrect behavior
and MUST NOT introduce breaking changes.
* A MINOR release (unlike SemVer) as well as a MAJOR release MAY contain
backwards-incompatible, breaking changes, like API changes and removals and
furthermore bug fixes and new features.

### Development and nightly releases

* Development builds (e.g. from a regular CI) MUST be released with a version
number defined as `X.Y.Z.dev+NN`, where `NN` is the git commit hash.
* Nightly releases MUST be released with a version number defined as `X.Y.ZrcYYYYMMDD`.
* The intent is to promote a recent, high quality release candidate to a final
version.

Binary stamps and tools will continue to report the original release candidate version.

## Semantics

The following semantics apply:

* If the version `X` (`X.y.z`) is increased for one package, the version number
change MUST be adopted by all (other) packages. The same applies for the
version `Y` (`x.Y.Z`).
* If the version `X` or `Y` are changed, `Z` MUST be set `0`.
* After a release, `Y` MUST be increased to ensure precedence of nightly builds.
For example:
* The latest stable release published on November 15th 2024 is versioned as
version `3.0.0`.
* The next nightly builds are released as `3.1.0rc20241116`.
* The next stable release is released as or `3.1.0`.
Comment on lines +67 to +72
Copy link
Member

Choose a reason for hiding this comment

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

How do patch releases factor in here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think for nightly released we need to branch of at the tag for the stable release and apply whatever patches are needed. This is not addressed here and might be better suited to be placed at https://github.com/iree-org/iree/blob/main/docs/website/docs/developers/general/release-management.md. WDYT? Want me to add a section to release-management.md (in follow up PR)?

Copy link
Member

Choose a reason for hiding this comment

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

This made it seem like the patch version is never incremented, since

  • If the version X or Y are changed, Z MUST be set 0.
  • After a release, Y MUST be increased

Maybe qualify "after a release" to "after a regularly scheduled release" leave room for patch releases

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I see. I add a sentence here than as well but also send a separate PR that documents on who we could cut a patch release.

1 change: 1 addition & 0 deletions docs/website/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ nav:
- "developers/general/developer-tips.md"
- "developers/general/github-actions.md"
- "developers/general/release-management.md"
- "developers/general/versioning-scheme.md"
- "developers/general/testing-guide.md"
- "Building":
- "developers/building/bazel.md"
Expand Down
Loading