Skip to content

Support ICU 62+ #2436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 28, 2019
Merged

Support ICU 62+ #2436

merged 1 commit into from
Oct 28, 2019

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Jul 28, 2019

  • ICU 62.1 icu4c DecimalFormat api now wraps the new NumberFormatter
    api.

  • Update currency spacing accoring to ICU changes
    (http://bugs.icu-project.org/trac/ticket/6560)

  • Disable tests that allowed different patterns for negative numbers,
    http://icu-project.org/apiref/icu4c/classDecimalFormat.html states
    that negative patterns serve only to specify the negative prefix
    and suffix. The number of digits, minimal digits and other
    characteristics are ignored in the negative subpattern.

    Support for different negative patterns may need to be added as a
    workaround.

@spevans
Copy link
Contributor Author

spevans commented Jul 28, 2019

@swift-ci test

@@ -1028,8 +1044,8 @@ class TestNumberFormatter: XCTestCase {
XCTAssertEqual(formatter.negativeFormat, "---#.##")

formatter.positiveFormat = nil
XCTAssertEqual(formatter.positiveFormat, "#")
XCTAssertEqual(formatter.format, "#;000;---#.##")
//XCTAssertEqual(formatter.positiveFormat, "#")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not leave commented code in? Either wrap it in shouldFail… or remove it.

@millenomi
Copy link
Contributor

I'm okay taking this if we use testExpectedToFail and do not ship with commented code.

@millenomi
Copy link
Contributor

Also, what ICU are we shipping with? Is there an update cadence?

@spevans
Copy link
Contributor Author

spevans commented Aug 15, 2019

I was just waiting for the automerge to 5.1 to be switched off - which it is now - to avoid this ending in 5.1 without the corresponding update to the swift repo.

I will modify the tests to disable them, I will try and get them working again in the future as they work correctly on Darwin.

I'll sort out a swift repo PR to update Linux to use ICU64.2 to test with this.

@spevans spevans force-pushed the pr_support_icu62 branch 2 times, most recently from 9500ea2 to 01d35c6 Compare August 15, 2019 19:33
@spevans
Copy link
Contributor Author

spevans commented Aug 15, 2019

@swift-ci test

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Aug 15, 2019

@swift-ci test

@compnerd compnerd marked this pull request as ready for review August 30, 2019 21:11
- ICU 62.1 icu4c DecimalFormat api now wraps the new NumberFormatter
  api.

- Update currency spacing according to ICU changes
  (http://bugs.icu-project.org/trac/ticket/6560)

- Disable tests for converting Double.leastNonzeroMagnitude to a
  localised string, this is currently broken due to a bug in the
  underlying double-conversion library used by ICU.

- Disable tests that allowed different patterns for negative numbers,
  http://icu-project.org/apiref/icu4c/classDecimalFormat.html states
  that negative patterns serve only to specify the negative prefix
  and suffix. The number of digits, minimal digits and other
  characteristics are ignored in the negative subpattern.

- Support for different negative patterns may need to be added as a
  workaround in the future.
@spevans
Copy link
Contributor Author

spevans commented Sep 24, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Sep 24, 2019

@swift-ci test linux

@compnerd
Copy link
Member

@spevans
Copy link
Contributor Author

spevans commented Oct 13, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Oct 13, 2019

The plan to upgrade ICU will be:

  1. Merge this PR, that mostly disables tests that dont work with newer versions.
  2. Update to ICU65.1 in a 2nd PR
  3. Re-enable some tests in ICU: Update TestNumberFormatter tests to be compatible with ICU62+ and Darwin #2535 that have been updated to work with 65.1 and Catalina (for Darwin Compatibility).

These PRs will be merged individually to avoid having to do cross repo simultaneous merges.

@spevans
Copy link
Contributor Author

spevans commented Oct 28, 2019

@swift-ci test

@spevans
Copy link
Contributor Author

spevans commented Oct 28, 2019

@swift-ci test and merge

@swift-ci swift-ci merged commit 5bb9828 into swiftlang:master Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants