1--- 2layout: default 3title: Version Numbers 4parent: Release & Milestone Tasks 5grand_parent: Contributors 6nav_order: 140 7--- 8 9<!-- 10© 2021 and later: Unicode, Inc. and others. 11License & terms of use: http://www.unicode.org/copyright.html 12--> 13 14# Version Numbers 15{: .no_toc } 16 17## Contents 18{: .no_toc .text-delta } 19 201. TOC 21{:toc} 22 23--- 24 25## ICU Version Number 26 27For reference, see the section in the User Guide about Version numbers here: 28 29<https://unicode-org.github.io/icu/userguide/icu/design#version-numbers-in-icu> 30 31### ICU Version Number for Front load, RC and GA tasks 32 33The process of releasing a new ICU version (E.G. ICU 70.1) is divided in three phases: 34* Front loading tasks 35* Release Candidate (RC) tasks 36* General Availability (GA) tasks 37 38As of ICU 70, the ICU Version number changes for each of these tasks. 39 40When "front loading" tasks, the version number will consist of a Major number, Minor number, and a Patch number. 41For example: ICU version 70.0.1 42 43For the RC and GA tasks, the ICU version number will consist of a Major number and a Minor number. 44For example: ICU version 70.1 45 46This means that when updating from the front load tasks to the RC tasks, files such as 47[icu4c/source/common/unicode/uvernum.h](https://github.com/unicode-org/icu/blob/main/icu4c/source/common/unicode/uvernum.h) 48need to be correspondingly updated. See below for more files to be updated and steps to be followed. 49 50 51### ICU Data 52 53[icu4c/source/data/misc/icuver.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/misc/icuver.txt) 54needs to be updated with the correct version number for ICU and its data. 55 56#### Since ICU 68 57 58In 59[tools/cldr/cldr-to-icu/build-icu-data.xml](https://github.com/unicode-org/icu/blob/main/tools/cldr/cldr-to-icu/build-icu-data.xml) 60edit `<property name="icuVersion" value="67.1.0.0"/>` and `<property 61name="icuDataVersion" value="67.1.0.0"/>`. 62 63The CLDR-to-ICU converter will then generate icuver.txt with the new version 64numbers. 65 66Run the converter, or coordinate with the person who will run it. 67 68#### Until ICU 67 (inclusive) 69 70Edit icuver.txt directly. 71 72### ICU4C 73 741. The instructions for updating the version number are in 75 [icu4c/source/common/unicode/uvernum.h](https://github.com/unicode-org/icu/blob/main/icu4c/source/common/unicode/uvernum.h). 762. [icu4c/source/data/makedata.mak](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/makedata.mak) 77 also needs to be updated with the correct version for `U_ICUDATA_NAME` (icudt). 783. After `uvernum.h` is updated, the file [Build.Windows.IcuVersion.props](https://github.com/unicode-org/icu/blob/main/icu4c/source/allinone/Build.Windows.IcuVersion.props) should be updated. 79 This can be done by hand, or by running the UNIX makefile target '**update-windows-makefiles**' 80 in `icu4c/source`. 81 * You will need to rerun "`./configure`" first though before you can run the 82 command "`make update-windows-makefiles`". 83 * Note: You can use MSYS+MinGW to run the UNIX makefile on Windows 84 platforms as well. 854. As well, the ICU4C "configure" script should be updated so that it reflects 86 the latest version number. 87 * Note: When updating the version number in the configure files be careful 88 not to just blindly search-and-replace the version number. 89 For example, there are lines like this: "As of ICU 62, both C and C++ 90 files require them" which need to have the exact version number 91 retained. 92 93### ICU4J 94 95Since ICU4J 4.6, you can quickly check the current version information by 96running jar main in icu4j.jar. For example, 97 98```sh 99$ java -jar icu4j.jar 100``` 101 102prints out - 103 104<pre> 105International Component for Unicode for Java 4.8 106Implementation Version: 4.8 107Unicode Data Version: 6.0 108CLDR Data Version: 2.0 109Time Zone Data Version: 2011g 110</pre> 111 112For updating ICU version numbers, follow the steps below. 113 1141. [icu4j/main/shared/build/common.properties](https://github.com/unicode-org/icu/blob/main/icu4j/main/shared/build/common.properties) 115 116 * icu4j.spec.version: This is API spec version, therefore, 2-digit major 117 version only. The version number won't be changed for maintenance 118 releases. (e.g. "55") 119 * icu4j.impl.version: This version is used for the actual release version, 120 including maintenance release numbers. (e.g. "55.1"). Note: We do not 121 use .0 - For example, ICU4J 54.1 uses "54.1", instead of "54.1.0" For 122 milestone 1, use <major>.0.1 (e.g. 60.0.1). 123 * icu4j.data.version: This version number is corresponding to the data 124 structure, therefore, won't be changed in maintenance releases. Use 125 2-digit number used by the data path. (e.g. "55") 126 * \[*Not applicable for ICU4J 60+*\] current.year: Some build script embed 127 the year taken from this into a copyright template. Make sure this value 128 is updated to the current year for a new release (also applicable to a 129 maintenance release). 130 1312. icu4j/build.properties (For API change report and release target) 132 133 * api.report.version: 2 digit release number. Note: If necessary, we may 134 include maintenance release number. (e.g "54", "481") 135 * api.report.prev.version: The previous version compared against the current 136 version. (e.g. "46") 137 * release.file.ver: This string is used for files names. For milestone 138 releases, use <2-digit major version> + "m" + <milestone number>, e.g. 139 "55m1". For release candidate, use <2-digit major version> + "rc", e.g. 140 54rc. For official releases, use full version numbers using under bar as the 141 separator, e.g. "54_1", "54_1_1". 142 * api.doc.version: The version displayed in API reference doc - use full 143 version number such as "60.1" for official and RC releases, "60 Milestone 1" for 144 milestone 1. 145 * maven.pom.ver: The version used in ICU pom.xml files. Use full version 146 number such as "60.1" for official releases, "61.1-SNAPSHOT" until 61.1 147 release, after 60.1. 148 1493. [icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java](https://github.com/unicode-org/icu/blob/main/icu4j/main/classes/core/src/com/ibm/icu/util/VersionInfo.java) 150 151 There is a static block starting at line 501 (as of 54.1) in the source file - 152 153 <pre> 154 /** 155 * Initialize versions only after MAP_ has been created 156 */ 157 static { 158 UNICODE_1_0 = getInstance(1, 0, 0, 0); 159 UNICODE_1_0_1 = getInstance(1, 0, 1, 0); 160 UNICODE_1_1_0 = getInstance(1, 1, 0, 0); 161 UNICODE_1_1_5 = getInstance(1, 1, 5, 0); 162 UNICODE_2_0 = getInstance(2, 0, 0, 0); 163 UNICODE_2_1_2 = getInstance(2, 1, 2, 0); 164 UNICODE_2_1_5 = getInstance(2, 1, 5, 0); 165 UNICODE_2_1_8 = getInstance(2, 1, 8, 0); 166 UNICODE_2_1_9 = getInstance(2, 1, 9, 0); 167 UNICODE_3_0 = getInstance(3, 0, 0, 0); 168 UNICODE_3_0_1 = getInstance(3, 0, 1, 0); 169 UNICODE_3_1_0 = getInstance(3, 1, 0, 0); 170 UNICODE_3_1_1 = getInstance(3, 1, 1, 0); 171 UNICODE_3_2 = getInstance(3, 2, 0, 0); 172 UNICODE_4_0 = getInstance(4, 0, 0, 0); 173 UNICODE_4_0_1 = getInstance(4, 0, 1, 0); 174 UNICODE_4_1 = getInstance(4, 1, 0, 0); 175 UNICODE_5_0 = getInstance(5, 0, 0, 0); 176 UNICODE_5_1 = getInstance(5, 1, 0, 0); 177 UNICODE_5_2 = getInstance(5, 2, 0, 0); 178 UNICODE_6_0 = getInstance(6, 0, 0, 0); 179 UNICODE_6_1 = getInstance(6, 1, 0, 0); 180 UNICODE_6_2 = getInstance(6, 2, 0, 0); 181 UNICODE_6_3 = getInstance(6, 3, 0, 0); 182 UNICODE_7_0 = getInstance(7, 0, 0, 0); 183 <b> 184 ICU_VERSION = getInstance(54, 1, 0, 0); 185 ICU_DATA_VERSION = ICU_VERSION;</b> 186 UNICODE_VERSION = UNICODE_7_0; 187 188 UCOL_RUNTIME_VERSION = getInstance(8); 189 UCOL_BUILDER_VERSION = getInstance(9); 190 UCOL_TAILORINGS_VERSION = getInstance(1); 191 } 192 </pre> 193 194 In the same file, starting at line 164 (as of 54.1) - 195 196 <pre> 197 /** 198 * Data version string for ICU's internal data. 199 * Used for appending to data path (e.g. icudt43b) 200 * @internal 201 * @deprecated This API is ICU internal only. 202 */ 203 @Deprecated 204 public static final String <b>ICU_DATA_VERSION_PATH = "54b";</b> 205 </pre> 206 2074. [icu4j/pom.xml](http://source.icu-project.org/repos/icu/trunk/icu4j/pom.xml) 208 (before ICU4J 60 only) 209 210 <pre> 211 <groupId>com.ibm.icu</groupId> 212 <artifactId>icu4j</artifactId> 213 <version><b>55-SNAPSHOT</b></version> 214 <name>ICU4J</name> 215 </pre> 216 217 Only for the final release (including maintenance release), update the <version> 218 item to the actual release version (e.g. "54.1", "4.8.1") Otherwise, use (next 219 ver)-SNAPSHOT. (e.g. "55-SNAPSHOT"). 220 2215. Time Bombs (before ICU4J 52) 222 223 ***Note: We no longer use time bombs since ICU4J 52. In the trunk, 224 logKnownIssue() is used for skipping known test failures. The new scheme no 225 longer depends on the current ICU4J version, so there are no updates 226 necessary in test codes when version number is updated. See [Skipping Known 227 Test Failures](../../../setup/eclipse/time.md) for more details.*** 228 229 There might be some test cases intentionally skipped for the current ICU4J 230 version. When ICU4J version is updated, these time bombed test cases may 231 show up. In this case, you should: 232 233 * Inform the list of failing test cases because of the version change to 234 icu-core ML - ask if someone has plan to fix them. 235 * File a ticket if a time bomb does not have any corresponding Jira ticket 236 and put the ticket number as comment 237 * Move the time bomb version to the next milestone. 238 239 The time bomb looks like below - 240 241 <pre> 242 if (<b>isICUVersionBefore(49, 1)</b>) { // ICU-6806 243 logln(showOrderComparison(uLocale, style1, style2, order1, order2)); 244 } else { 245 errln(showOrderComparison(uLocale, style1, style2, order1, order2)); 246 } 247 </pre> 248 249 Note: ICU4J time bomb - Before 250 [ICU-7973](https://unicode-org.atlassian.net/browse/ICU-7973), we used to 251 use skipIfBeforeICU(int,int,int). 252 253 When a test case with time bomb still fails before a major release, the time 254 bomb may be moved to the version before the first milestone of the next 255 major release stream. For example, the time bomb (49,1) is not yet resolved 256 before ICU4J 49 release, it should be updated to (50,0,1). This will prevent 257 the error test case showing up during 49 maintenance releases, and appear 258 before the first milestone of 50.0.1. 259 2606. ICU4J Eclipse plug-in version (Eclipse release only) 261 262 ICU4J Eclipse plug-in use the standard Eclipse versioning scheme - 263 X.Y.Z.v<build date>, for example, com.ibm.icu_4.2.1.v20100412.jar. By 264 default, the build script compose the version string from 265 icu4j.plugin.impl.version.string property in 266 [eclipse-build/build.properties](https://github.com/unicode-org/icu/blob/main/icu4j/eclipse-build/build.properties) 267 with current date at the build time. However, when we tag a version, we want 268 to freeze the build date part. To force a fixed version string, we add a 269 property - icu4j.eclipse.build.version.string in the build.properties. For 270 example, see 271 [tags/release-4-4-2-eclipse37-20110208/eclipse-build/build.properties](http://source.icu-project.org/repos/icu/tags/icu4j/release-4-4-2-eclipse37-20110208/eclipse-build/build.properties). 272 2737. [DebugUtilitiesData.java](https://github.com/unicode-org/icu/blob/main/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/DebugUtilities.java) 274 275 This file is automatically generated when data is generated for ICU4J. The 276 ICU4C version number string should be check to ensure that the correct 277 version number is being used. public static final String 278 ICU4C_VERSION="50.0.2"; Note: The ICU4C version number string in this JAVA 279 file is not really used for anything except for a few logln method calls. 280 Perhaps this member is not really needed. 281 282## Data Versions 283 284Make sure data file versions (for **data contents**) are properly assigned. 285 286If any of the data files in the 287[/icu/source/data/](https://github.com/unicode-org/icu/tree/main/icu4c/source/data) 288directory has changed **MANUALLY**, upgrade the version number accordingly as 289well. If the contents of a resource bundle has changed, then increase the 290version number (at least the minor version field). The CLDR generated data 291should have the correct number. **Note** from Markus (20090514, ICU 4.2 292timeframe): Most data files automatically get their version numbers set by the 293LDML2ICUConverter, from CLDR version numbers. It is not clear what, if anything, 294needs to be done for this task. 295 296The ICU4J data files depend on the ICU4C data files. Thus, in order to 297regenerate the updated ICU4J data files, you will first need to update the ICU4C 298data files version. 299 300Once the ICU4C data files are updated, follow the instructions in the Readme 301file here: 302<https://github.com/unicode-org/icu/blob/main/icu4c/source/data/icu4j-readme.txt> 303 304## Data File *Format* Versions 305 306Make sure data file **format** versions are updated. See 307<https://unicode-org.github.io/icu/userguide/icu_data/#icu-data-file-formats> 308 309For Unicode data files, it is also useful to look at recent tools-tree changes: 310[icu/commits/main/tools/unicode](https://github.com/unicode-org/icu/commits/main/tools/unicode) 311 312If the format of a binary data file has changed, upgrade the format version in 313the UDataInfo header for that file. Better: Change the format version 314immediately when the format is changed. The change must be made in both the 315producer/generator and consumer/runtime code. 316 317It is desirable to maintain backward compatibility, but sometimes impractical. 318Update the major version number for incompatible changes. Runtime code should 319permit higher minor version numbers for supported major versions. 320 321We rarely use the third and fourth version number fields, except for UTrie (only 322version 1, not UTrie2) parameters that don't really change. 323