• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2© 2016 and later: Unicode, Inc. and others.
3License & terms of use: http://www.unicode.org/copyright.html
4-->
5
6# Double Conversion Vendor Library
7
8This library is used by ICU4C to perform double-to-string and string-to-double conversions.
9
10## Updating double-conversion from Upstream to ICU
11
12IMPORTANT: Please start with a clean working directory before continuing (no uncommitted changes).
13
14Go to https://github.com/google/double-conversion/releases/latest/ to determine the latest version number. You can also pull from a branch instead of a tag.
15
16Run `pull-from-upstream.sh` as below:
17
18	./pull-from-upstream.sh <tag/branch>
19
20The script runs in 4 steps.
21
22### Step 1: Download Tarball
23
24You will be prompted to download the tarball of the upstream tag/branch. If confirmed, the script will download the file to a temp directory and unpack it there.
25
26At this point, the ICU source tree is still pristine.
27
28### Step 2: Patch ICU4C
29
30The script computes the ICU patches on double-conversion (diff between the ICU4C source tree and the vendor source tree), then copies in the new version of the files that it downloaded, and apply the ICU patches on top of those new files.
31
32Look in the command output.  If you see a message like `Hunk #6 NOT MERGED`, it means that you have to open the file manually and resolve the merge conflict.
33
34It is also possible that upstream added, deleted, or renamed files.  In this situation, you need to spend extra time touching up these changes in ICU4C.
35
36At this point, the ICU4C source tree is changed, and the vendor directory is still pristine.
37
38### Step 3: Copy to Vendor
39
40Here, the script copies the pristine source from the temp directory to the vendor directory.  You should always do this unless you aborted one of the previous steps.
41
42### Step 4: Cleanup
43
44The script will ask whether to delete its temp directory.  If you want to keep the temp directory to refer to the ICU patches, for example, you can skip this step.
45
46## Checking ICU Patches
47
48Look over any ICU patches in the icu4c/i18n version of the code files; they should be marked clearly with "ICU PATCH" comments.  Make sure that the patches are still needed and remove them if possible.
49
50## Next Steps
51
52Build and test ICU4C, and send the PR for review.
53