Skip to content

🔧 Version fork releases as <upstream>+libhal.<N> - #7

Merged
kammce merged 1 commit into
libhal-2.6from
libhal-version-suffix
Oct 24, 2026
Merged

kammce merged 1 commit into
libhal-2.6from
libhal-version-suffix

Conversation

@kammce

@kammce kammce commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Fork releases get their own version, <upstream>+libhal.<N>, so a fork fix ships as a new version instead of re-tagging and re-deploying the existing one. The first is 2.6.0+libhal.1@libhal, which includes #6.

The release tag sets the version. The deploy passes the tag (e.g. 2.6.0+libhal.1@libhal) as --version, and set_version() strips the @libhal user. There's nothing to bump in the recipe.

  • The version must be <upstream>+libhal.<N>, where <upstream> is the version in src/CMakeLists.txt. Anything else fails, which catches a tag that doesn't match the source, e.g. 2.6.0@libhal or 2.7.0+libhal.1@libhal on 2.6.0 code.
  • Without a version (local builds, and CI check runs, which pass latest) it's <upstream>+libhal.0, which sorts below every release.

Conan sorts 2.6.0+libhal.1 after 2.6.0 and before 2.6.1, and numerically (+libhal.10 > +libhal.9). Ranges like [~2.6] include it without include_prerelease; libhal switches to that range in libhal/libhal#256. A pre-release suffix (2.6.0-libhal.1) would sort before 2.6.0 instead, so it isn't used.

Releasing

Publish a GitHub release whose tag is the next version plus @libhal, e.g. 2.6.0+libhal.1@libhal. After rebasing onto a new upstream version, start again at +libhal.1.

Tested locally

  • conan export with no version, latest, 2.6.0+libhal.2@libhal and 2.6.0+libhal.3 gives 2.6.0+libhal.0, 2.6.0+libhal.0, 2.6.0+libhal.2 and 2.6.0+libhal.3. 2.6.0@libhal and 2.7.0+libhal.1@libhal fail with a message naming the expected form.
  • conan create with libhal's options, including test_package, passes on LLVM 23.
  • libhal built against 2.6.0+libhal.1@libhal with [~2.6] resolves to it, and its 14 test suites pass.
  • A read-only conan list of the new version against the libhal remote returns a clean "not found", so the + in the URL is accepted. The upload itself is only tested by the first deploy.

Fork releases are versioned <upstream>+libhal.<N>, where <upstream> is
the version in src/CMakeLists.txt. The first is 2.6.0+libhal.1@libhal.

The release tag sets the version: the deploy passes the tag as
--version, and set_version() strips the @libhal user from it. A version
that isn't <upstream>+libhal.<N> fails, which catches a tag that doesn't
match the source. Without a version (local builds, CI check runs passing
"latest"), it's <upstream>+libhal.0, which sorts below every release.

Fork fixes can then ship as new versions instead of re-tagging and
re-deploying the existing one. Conan sorts 2.6.0+libhal.1 after 2.6.0
and before 2.6.1, and ranges such as [~2.6] include it without
include_prerelease. A pre-release suffix (2.6.0-libhal.1) would sort
before 2.6.0 instead.
@kammce
kammce force-pushed the libhal-version-suffix branch from 289c0db to eeb681b Compare October 24, 2026 17:14

@kammce kammce left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

LGTM

@kammce
kammce merged commit cf6542f into libhal-2.6 Oct 24, 2026
12 checks passed
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

Successfully merging this pull request may close these issues.

1 participant