You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ICU4X pins Rust Nightlies in CI for multiple purposes:
44
+
45
+
-`diplomat-coverage/src/main.rs`: Running the diplomat-coverage task, which uses unstable Rustdoc JSON output, requiring synchronization between the Rust version and the `rustdoc_types` dependency.
46
+
-`PINNED_CI_NIGHTLY`: Running various FFI CI jobs that need _some_ Rust nightly to use build-std or other nightly features, without becoming beholden to arbitrary
47
+
-`LLVM_COMPATIBLE_NIGHTLY`: Usage of `-Clinker-plugin-lto` in size-optimized tests where Rust and Clang need to be using compatible LLVM versions.
48
+
49
+
50
+
ICU4X also runs its entire CI against the latest nightly once a day, reporting errors to Slack. These errors help us catch upstream breakages early, but ICU4X does not have any particular SLO against these being fixed. We guarantee we build on the latest stable as detailed in the first section of this page.
51
+
52
+
The first two nightlies here can be updated whenever necessary to whatever nightly works. It not necessary to keep the nightly versions the same, though it is ideal to try. The choice of these nightlies does not have much of a direct impact on users.
53
+
54
+
55
+
For users who wish to use ICU4X with `-Clinker-plugin-lto`, we have some guarantees about the nightly they can use it with (`LLVM_COMPATIBLE_NIGHTLY`, found in the makefiles under `tutorials/c-tiny`). We recommend usage of ICU4X with `-Clinker-plugin-lto`, on `LLVM_COMPATIBLE_NIGHTLY`, for size-constrained clients who have the option available. To ensure this option is readily available to ICU4X clients, we guarantee that `LLVM_COMPATIBLE_NIGHTLY` must work with "widely available LLVM" versions. This may further constrain our MSRV policy above in case `LLVM_COMPATIBLE_NIGHTLY` cannot be pinned to something that works with an otherwise-allowed MSRV.
56
+
57
+
One can test that a candidate `LLVM_COMPATIBLE_NIGHTLY` "works with" an LLVM version when the size test benchmarks (makefiles in `tutorials/c-tiny/`) run without erroring due to mismatched LLVM metadata. Note that Rust uses LLVM trunk, so it may happen that a Rust nightly is not compatible with _any_ released LLVM version. Some experimentation is often required to find a nightly/LLVM pair that works.
58
+
59
+
60
+
"widely available LLVM" here means that:
61
+
62
+
- It MUST be available via apt on all currently-supported Ubuntu LTS
63
+
- It MUST be available via apt on Debian `testing`
64
+
- It MUST be available via `brew`
65
+
- It MUST be available on Fedora via `yum`
66
+
- It MUST be available on the GitHub Actions runners with `ubuntu-latest`
67
+
- It SHOULD be available on the latest XCode
68
+
- It SHOULD be available on ICU4X developer machines using nonstandard package management (more on this below)
69
+
- It SHOULD be available on RHEL and latest Rocky Linux via `yum`
70
+
71
+
Here, SHOULD requirements can be overridden by TC approval, where the developer must make a per-use case argument as to why the upgrade is beneficial to the project.
72
+
73
+
More information on each of these bullet points, and how to verify them without needing that OS. below. Commands are for installing LLVM 18, for illustrative purposes.
74
+
75
+
76
+
#### Ubuntu
77
+
78
+
Policy: Must be available on the oldest still-supported Ubuntu LTS.
79
+
80
+
Command: `apt install llvm-18` on Ubuntu LTS.
81
+
82
+
Verification: Package should be available on [oldest still-supported Ubuntu LTS][ubuntu-release]. Visit the page https://launchpad.net/ubuntu/+source/llvm-toolchain-18 (with the number replaced with the desired LLVM version), and scroll down to see if the oldest active Ubuntu LTS is there. [Currently][ubuntu-release], that is 20.04 Focal Fossa, starting April 2025 it will be Jammy Jellyfish (until April 2027).
Verification: Visit the page https://packages.debian.org/search?keywords=llvm-18&searchon=names&suite=testing§ion=all (with the number 18 replaced by the desired LLVM version) and ensure the package is listed under "Exact matches".
95
+
96
+
Note: "Debian stable" is typically _very_ old and is not what most Debian-based systems use. E.g. Debian stable is currently on Rust 1.63, which is more than two years old. Stable is intended to be extremely stable without even performing backwards-compatible upgrades.
97
+
98
+
#### Fedora
99
+
100
+
Policy: Must be available on latest stable Fedora
101
+
102
+
Command: `yum install llvm18`
103
+
104
+
Verification: Visit the page https://packages.fedoraproject.org/pkgs/llvm18/llvm18/ (with the number 18 replaced with desired LLVM version), and ensure that in the "Releases overview" table, there is an entry in the "Stable" column for "Fedora N" where N is a number. You can double check that N is the latest stable by visiting [this page](https://fedoraproject.org/).
105
+
106
+
#### XCode
107
+
108
+
Policy: Should be available on the latest XCode, but policy can be overridden by TC approval in cases where there is a strong case for a new feature.
109
+
110
+
Command: none
111
+
112
+
113
+
Verification: Look at the bottom of [XCode's Wikipedia page][xcode-wiki] and check that the latest released XCode has an LLVM version equal to or greater than the one being used.
Verification: Latest Rocky Linux (currently Rocky Linux 9) and RHEL should be listed on [this page](https://pkgs.org/search/?q=llvm-toolset) with an LLVM version that is equal to or greater than the desired LLVM version. It's okay if the exact LLVM version is not listed, `yum module install` allows installing older versions via explicit command.
132
+
133
+
#### GitHub Actions
134
+
135
+
Policy: Must be available on GitHub actions `ubuntu-latest` (i.e. ICU4X CI should be able to just `apt install` the LLVM)
136
+
137
+
Command `apt install llvm-18` on ICU4X CI.
138
+
139
+
Verification: `ubuntu-latest` is always older than the oldest still-supported Ubuntu LTS, so this does not need to be verified separately. There are potential edge cases where GitHub's package repository mirrors are lagging behind where this policy basically means that we should wait a few days for things to smooth out. GitHub's precise runner image version can be looked up [here](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md).
140
+
141
+
#### ICU4X developer machines
142
+
143
+
ICU4X developers may request additional criteria for their machines in case their machines use nonstandard package management, for example employer-managed machinees. These criteria will be listed below, and adding new criteria should require TC approval.
144
+
145
+
Policy: Should be available on ICU4X developer machines based on criteria below. Overriding this policy requires approval from affected developers.
146
+
147
+
Verification: Affected ICU4X developers are in charge of testing this: if developer A wishes to perform an LLVM upgrade to a version satisfying all of the above policies, they may do so without checking if it works on developer B's machine, but developer B is allowed to block or revert the PR if they have issues.
148
+
149
+
The current criteria are:
150
+
151
+
- "Available on GLinux" (Used by Googler ICU4X developers): GLinux packages are based on Debian `testing` so this should almost always be true based on previous criteria, but there may be occasional cases where things lag behind for a week or two, in which case the Rust upgrade should be delayed til fixed.
0 commit comments