Files
Sebastian Poxhofer a3d265d45d refactor(datasource): stop double-caching releases at the index level (#46103)
* refactor(datasource): stop double-caching releases at the index level

15 datasources set `caching = true`, which makes the registry wrapper in
`lib/modules/datasource/index.ts` store every `getReleases` result under
`datasource-releases-<id>` for 15 minutes, while their own `cached()`
wrapper already stores the same result under `datasource-<id>` with a
longer TTL and stale-fallback. Drop `caching` from those 15; the four
that rely on the index cache alone (dart-version, flutter-version,
maven, pypi) keep it.

`caching` is documented as requiring the datasource to return the
`isPrivate` flag, and none of these 15 ever set it, so the index layer
was caching private results unconditionally. The remaining `cached()`
layer honours `cachePrivatePackages` as before.

Also fix two cache-key/registry defects found alongside:

- `galaxy-collection` declares `registryStrategy = 'hunt'` but keyed its
  cache on the package name only, so a `null` from the first hunted
  registry was replayed for the second one. The registry URL is now part
  of the key, which invalidates existing entries once.
- `typst` ignores `config.registryUrl` and always reads its default
  registry, so it now sets `customRegistrySupport = false`. A configured
  `registryUrls` for typst is now warned about and ignored instead of
  being silently dropped.

* Merge branch 'main' into secustor/refactor/datasource-remove-index-caching
2026-09-24 21:07:52 +00:00
..

This datasource fetches available Rust compiler versions from the official Rust distribution infrastructure at https://static.rust-lang.org/manifests.txt.

How it works

The datasource retrieves version information from a single source file (manifests.txt) which contains chronological URLs to manifest files for all Rust releases. Rather than fetching each individual manifest TOML file, version information is extracted directly from the URL patterns using regex parsing.

Supported Versions

The datasource only returns versions that correspond to specific Rust releases:

  • Stable releases: 1.81.0, 1.82.0, etc.
  • Beta releases: 1.83.0-beta.4, 1.83.0-beta.5, etc.
  • Dated nightlies: nightly-2025-11-23, nightly-2025-11-24, etc.

Version Extraction

Manifest URLs follow this pattern:

static.rust-lang.org/dist/YYYY-MM-DD/channel-rust-{identifier}.toml

Examples:

  • static.rust-lang.org/dist/2025-11-24/channel-rust-nightly.toml → Version: nightly-2025-11-24
  • static.rust-lang.org/dist/2024-10-17/channel-rust-1.82.0.toml → Version: 1.82.0
  • static.rust-lang.org/dist/2025-01-15/channel-rust-1.83.0-beta.5.toml → Version: 1.83.0-beta.5

Release Timestamps

Release timestamps are derived from the date in the manifest URL and set to midnight UTC (YYYY-MM-DDTHH:MM:SS.000Z). This provides day-level precision for release timing.

Versioning Scheme

This datasource uses the rust-release-channel versioning scheme, which understands Rust's release channels, dated nightlies, and semantic versioning for stable and beta releases.