Skip to content

Enable support for pre-release Rust versions.#1604

Merged
anthony-gomez-fastly merged 2 commits intofastly:mainfrom
dgohman-fastly:dgohman-fastly/support-prerelease
Dec 19, 2025
Merged

Enable support for pre-release Rust versions.#1604
anthony-gomez-fastly merged 2 commits intofastly:mainfrom
dgohman-fastly:dgohman-fastly/support-prerelease

Conversation

@dgohman-fastly
Copy link
Contributor

Change summary

For Rust, set the IncludePrerelease field of the semver Constraints to true. This makes it possible to set channel = "nightly", without getting errors like this:

ERROR: the Rust version requirement was not satisfied: '1.94.0-nightly is a prerelease version and the constraint is only looking for release versions'.

Most users won't have any reason to use channel = "nightly", however it is useful for users that specifically wish to test `channel = "nightly", such as to help find problems with future Rust versions before they become stable versions.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

I didn't write any tests because I didn't find any test harness in the tree suitable for writing tests for a change of this nature, and also, it's a minor change that only impacts users that opt into it by choosing prerelease Rust versions, which will include me, for the purpose of testing.

User Impact

The only impact is on users who knowingly opt into using prerelease Rust versions, and the only change is to allow this to work.

Are there any considerations that need to be addressed for release?

I'm not aware of any.

For Rust, set the `IncludePrerelease` field of the semver [`Constraints`]
to true. This makes it possible to set `channel = "nightly"`, without
getting errors like this:

```
ERROR: the Rust version requirement was not satisfied: '1.94.0-nightly is a prerelease version and the constraint is only looking for release versions'.
```

Most users won't have any reason to use `channel = "nightly"`, however it
is useful for users that specifically wish to test `channel = "nightly",
such as to help find problems with future Rust versions before they become
stable versions.

[`Constraints`]: https://pkg.go.dev/github.com/Masterminds/semver/v3#Constraints
@anthony-gomez-fastly anthony-gomez-fastly merged commit 91fb167 into fastly:main Dec 19, 2025
16 of 17 checks passed
@dgohman-fastly dgohman-fastly deleted the dgohman-fastly/support-prerelease branch December 19, 2025 15:59
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.

2 participants