-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
deprecate utf8 for String #16469
Merged
Merged
deprecate utf8 for String #16469
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -887,7 +887,6 @@ export | |
ucfirst, | ||
unescape_string, | ||
uppercase, | ||
utf8, | ||
utf16, | ||
utf32, | ||
warn, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,14 +215,14 @@ end | |
# issue #11142 | ||
s = "abcdefghij" | ||
sp = pointer(s) | ||
@test utf8(sp) == s | ||
@test utf8(sp,5) == "abcde" | ||
@test typeof(utf8(sp)) == String | ||
@test String(sp) == s | ||
@test String(sp,5) == "abcde" | ||
@test typeof(String(sp)) == String | ||
s = "abcde\uff\u2000\U1f596" | ||
sp = pointer(s) | ||
@test utf8(sp) == s | ||
@test utf8(sp,5) == "abcde" | ||
@test typeof(utf8(sp)) == String | ||
@test String(sp) == s | ||
@test String(sp,5) == "abcde" | ||
@test typeof(String(sp)) == String | ||
|
||
@test get(tryparse(BigInt, "1234567890")) == BigInt(1234567890) | ||
@test isnull(tryparse(BigInt, "1234567890-")) | ||
|
@@ -434,7 +434,7 @@ let s = "abcdef", u8 = "abcdef\uff", u16 = utf16(u8), u32 = utf32(u8), | |
@test isvalid(u8) | ||
@test isvalid(u16) | ||
@test isvalid(u32) | ||
@test isvalid(String, u8) | ||
@test isvalid(String, u8) | ||
@test isvalid(UTF16String, u16) | ||
@test isvalid(UTF32String, u32) | ||
end | ||
|
@@ -464,11 +464,9 @@ end | |
# issue # 11464: uppercase/lowercase of UTF16String becomes a String | ||
str = "abcdef\uff\uffff\u10ffffABCDEF" | ||
@test typeof(uppercase("abcdef")) == String | ||
@test typeof(uppercase(utf8(str))) == String | ||
@test typeof(uppercase(utf16(str))) == UTF16String | ||
@test typeof(uppercase(utf32(str))) == UTF32String | ||
@test typeof(lowercase("ABCDEF")) == String | ||
@test typeof(lowercase(utf8(str))) == String | ||
@test typeof(lowercase(utf16(str))) == UTF16String | ||
@test typeof(lowercase(utf32(str))) == UTF32String | ||
|
||
|
@@ -481,16 +479,11 @@ foobaz(ch) = reinterpret(Char, typemax(UInt32)) | |
|
||
@test "a".*["b","c"] == ["ab","ac"] | ||
@test ["b","c"].*"a" == ["ba","ca"] | ||
@test utf8("a").*["b","c"] == ["ab","ac"] | ||
@test "a".*map(utf8,["b","c"]) == ["ab","ac"] | ||
@test ["a","b"].*["c","d"]' == ["ac" "ad"; "bc" "bd"] | ||
|
||
# Make sure NULL pointer are handled consistently by | ||
# `String`, `ascii` and `utf8` | ||
# Make sure NULL pointer are handled consistently by String | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pointers are |
||
@test_throws ArgumentError String(Ptr{UInt8}(0)) | ||
@test_throws ArgumentError String(Ptr{UInt8}(0), 10) | ||
@test_throws ArgumentError utf8(Ptr{UInt8}(0)) | ||
@test_throws ArgumentError utf8(Ptr{UInt8}(0), 10) | ||
|
||
# ascii works on ASCII strings and fails on non-ASCII strings | ||
@test ascii("Hello, world") == "Hello, world" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change broke CI and should not have been merged without waiting for tests. Please be more patient with these.
edit: fixed with cdd2859
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry. If CI didn't take so many hours it would be considerably less tempting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appveyor is mostly bogged down with timeouts due to a bug we need to fix somewhere in the parallel infrastructure.
I'll experiment with some alternative CI services to see if we might be able to spread the Travis matrix out a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'm increasingly convinced that we should run our own CI servers on AWS or something. And spin up new servers when the demand is high.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paying travis for more concurrent builds would likely be cheaper and less labor intensive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should focus on just doing the "more" rather than having to maintain our own version of services that already exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may also be time to refactor the test suite and run only tests specific to a module depending on the files changed in the commit. Most of our tests are anyway unit tests.
The complete test suite can be run daily once or twice independent of PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have quite the level of dependency-tracking to be able to do that reliably. Seemingly unrelated failures happen pretty often, and there's a big risk of breaking the ability to bisect if we allow more of those to make it to master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the current state I agree. OTOH, tests will only grow (as they should) and this exercise should be coupled with refactoring files in
Base
into their own sub modules. I remember @andreasnoack had attempted this awhile back but didn't get merged.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependency-tracking tooling might be something that will be needed anyway to properly fix #265, do tiered JITing, etc.