Skip to content

Commit d44c5ff

Browse files
committed
Rust: Clarify format of rust_analyzer_release_tag
1 parent 765edd9 commit d44c5ff

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎rust/scripts/update_rust_analyzer.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def get_rust_analyzer_crate_release_date(rust_analyzer_version: str) -> str:
7676
def get_rust_analyzer_release_tag(rust_analyzer_version: str) -> str:
7777
"""
7878
Get the latest rust-analyzer release tag in the git repository before or at
79-
the crate publication.
79+
the crate publication. The returned string has the format `YYYY-MM-DD.N`
80+
where the `.N` part is optional.
8081
8182
Empirically, the rust-analyzer crates are published after the corresponding
8283
git tag. We hence look for the latest git tag that is before or at the crate
@@ -145,6 +146,8 @@ def update_rust_analyzer_sources(
145146

146147
def get_compatible_rust_toolchain(rust_analyzer_release_tag: str) -> str:
147148
"""Get the latest Rust toolchain released no later than rust-analyzer."""
149+
# Keep the `YYYY-MM-DD` part of the release tag, stripping off the optional
150+
# incrementing suffix.
148151
rust_analyzer_release = rust_analyzer_release_tag[:10]
149152

150153
# `manifests.txt` is a list of all toolchains. The one we're interested in looks like

0 commit comments

Comments
 (0)