Comments (21)
@Jitsusama I got same error build with Xcode 9 beta Swift 3.2
from uint128.
@Jitsusama The above error occurs when using the Swift 3.2 parameter
from uint128.
when build with Swift 4.0, will got the following error:
/Volumes/dev2/UInt128/Sources/UInt128.swift:313:26: 'UIntMax' is unavailable
/Volumes/dev2/UInt128/Sources/UInt128.swift:445:21: 'BitwiseOperations' is unavailable: Use FixedWidthInteger protocol instead
/Volumes/dev2/UInt128/Sources/UInt128.swift:542:21: 'IntegerArithmetic' is unavailable
/Volumes/dev2/UInt128/Sources/UInt128.swift:333:32: 'UIntMax' is unavailable
/Volumes/dev2/UInt128/Sources/UInt128.swift:543:31: 'IntMax' is unavailable
/Volumes/dev2/UInt128/Sources/UInt128.swift:312:1: Type 'UInt128' does not conform to protocol 'BinaryInteger'
/Volumes/dev2/UInt128/Sources/UInt128.swift:312:1: Type 'UInt128' does not conform to protocol 'Numeric'
/Volumes/dev2/UInt128/Sources/UInt128.swift:347:21: Binary operator '&+' cannot be applied to operands of type 'UInt128' and 'Int'
/Volumes/dev2/UInt128/Sources/UInt128.swift:354:21: Binary operator '&-' cannot be applied to operands of type 'UInt128' and 'Int'
/Volumes/dev2/UInt128/Sources/UInt128.swift:544:53: 'IntMax' is unavailable
/Volumes/dev2/UInt128/Sources/UInt128.swift:551:49: 'addWithOverflow' is unavailable: Use addingReportingOverflow(:) instead.
/Volumes/dev2/UInt128/Sources/UInt128.swift:555:49: 'addWithOverflow' is unavailable: Use addingReportingOverflow(:) instead.
/Volumes/dev2/UInt128/Sources/UInt128.swift:560:50: 'addWithOverflow' is unavailable: Use addingReportingOverflow(:) instead.
/Volumes/dev2/UInt128/Sources/UInt128.swift:571:49: 'subtractWithOverflow' is unavailable: Use subtractingReportingOverflow(:) instead.
/Volumes/dev2/UInt128/Sources/UInt128.swift:575:49: 'subtractWithOverflow' is unavailable: Use subtractingReportingOverflow(:) instead.
/Volumes/dev2/UInt128/Sources/UInt128.swift:580:50: 'subtractWithOverflow' is unavailable: Use subtractingReportingOverflow(:) instead.
/Volumes/dev2/UInt128/Sources/UInt128.swift:874:19: Missing argument label 'integerLiteral:' in call
/Volumes/dev2/UInt128/Sources/UInt128.swift:882:19: Missing argument label 'integerLiteral:' in call
/Volumes/dev2/UInt128/Sources/UInt128.swift:564:13: Call can throw, but it is not marked with 'try' and the error is not handled
/Volumes/dev2/UInt128/Sources/UInt128.swift:584:13: Call can throw, but it is not marked with 'try' and the error is not handled
from uint128.
I'm keeping stuff in the swift3.2 and swift4.0 branches until the APIs are finalized. The current swift3.2 and swift4.0 branches should work for you now, so I'm going to close out this issue.
from uint128.
Thanks for that report! Do you know if this is when it's being built as a Swift 4.0 product, or, a Swift 3.x project?
from uint128.
Thanks! I'll try to take a look tonight and see what's up. I'm surprised that much would've changed in a Swift 3.2, but maybe the issue is with the compiler having stricter checks than it did before, or maybe it's even a compiler bug. Regardless, I'll take a look.
In the mean time, if you think you know what the problem is, feel free to make a PR.
from uint128.
I was expecting Swift 4 errors. Thanks for the output though. I should probably address both at the same time.
Hopefully I can get access to the pre-release Xcode that you're using, as I don't have an active Apple Developer account.
from uint128.
Yay, my free account lets me download it! Depending on how long it takes to download, I may or may not be able to make progress on this tonight.
from uint128.
Slowwww download. I'll probably have to look at it tomorrow evening or sometime through the weekend.
I had looked through the Swift 3.2 source code a few weeks ago and noticed that a number of their Integer protocols had been shifted around. My suspicion is that these changes got committed and will require me to perform some re-jigging. Based on that, I am guessing that I will have to make a branch and test out whether I can get both Swift 3.2 and Swift 4.0 to compile against a modified version of this library. As I understand it, it will take some time for either version to go mainstream, so I might keep this code in a separate branch until they become more GA. We'll cross that bridge when we get to it though.
Out of curiosity, @guoxiaoqiao and @antterminator, what are your plans for switching your own projects to Swift 3.2 and/or 4.0? Do you think it would make sense to support 3.1, 3.2 and 4.0 simultaneously for a while? If so, do you think I should maintain separate branches, or just have separate version tags and document which tag you want to pin to in order to work with the project at a certain release?
from uint128.
@Jitsusama Because Xcode 9 beta can not be used to publish App, so I just do some code compatibility verification
from uint128.
@Jitsusama Support Swift 3.2 is enough for me since my project based on Swift 3.x, thanks!
from uint128.
Here's a PDF version of a Keynote I put together showing the UInt64 protocol hierarchy and its differences between Swift 3.1 and Swift 3.2/4.0. I'm going to spend some time thinking about how to change UInt128 to match. The hardest part is figuring out how to identify/handle all of the deprecations.
I'm half thinking of going into the scary world of compiler preprocessors (#if
), but I'm not sure if I want to go there.
Swift UInt64 Protocol Hierarchy.pdf
from uint128.
Alright, it also looks like Swift 3.2 and 4.0's syntax is mostly compatible. So, if I handle one, I handle them both. I'm mapping out all of the properties/methods that are required. It looks like there are quite a few of them. Just a warning, this might take me a bit to work out. Also, I think I'll probably use a single branch for all of these changes and will only merge it into master after Swift 3.2/4.0 are finalized, which as far as I understand should be around when Xcode 9 goes stable.
from uint128.
Wow, lots of stuff to change. I never imagined they would change this much in their underlying UnsignedInteger protocols. Every one change breaks everything else, so I don't even have a single commit yet. But, I have about 80% of the method/parameters implemented. I think there is a chance that I can maintain backwards compatibility with Swift 3.1 also. Anywho, probably won't have this finished this weekend, but know that I am picking away at it.
from uint128.
@Jitsusama Pleased to hear the progress, thanks for your work.
from uint128.
I've put through my first commit. It's still quite rough, but the skeleton of what needs to be changed is present. Feel free to follow the PR to track my progress.
from uint128.
I'm still making some slow progress on this. I ate some time updating the project configuration with @guoxiaoqiao's help, but it was time well spent. I'm currently working on banging out passing tests for the core functionality, one test at a time.
from uint128.
I'm still working on this and am making good progress. I have 18 more test methods to write up/verify functionality on. Of these, I expect about half involve actual production code that needs to be written. If only I could do this as my day job 😃
from uint128.
One more method to implement. As an FYI @guoxiaoqiao and @antterminator, this remaining method shouldn't affect most workflows. The swift3.2 branch, as it is, is probably ready for use. Let me know if you discover any issues with it.
from uint128.
The Swift 3.2 branch is totally legit. Please test @guoxiaoqiao and @antterminator and let me know how it works. There is quite a bit of API deprecated in Swift 3.2/4.0 that I haven't replicated, so make sure you update your code to use the newer BinaryInteger
/FixedWidthInteger
protocol API.
from uint128.
I've now pulled in my own deprecated API. I haven't attempted to pull in automatically generated API that has been deprecated by Swift though. If one of ya'll could test this out, it would be appreciated, otherwise, I'll probably just merge this in within the next week, as it does seem to be working well for myself.
from uint128.
Related Issues (16)
- Needs Test Cases HOT 7
- can't find Instance method 'fromUnparsedString' in swift3.2 branch HOT 7
- Not correct work: significantBits HOT 5
- ArithmeticOverflow has been deleted HOT 2
- UInt256 HOT 11
- swift 3.0 HOT 4
- Cocoapods support HOT 8
- Please consider Carthage support HOT 1
- Bump Version Number to 0.9.0
- Add UInt128.max HOT 2
- UInt128 to String conversions are slow HOT 3
- Unable to add with package manager HOT 2
- Is UInt128 Ready for a Version Bump? HOT 4
- Convert value to CVarArg type HOT 1
- No build scheme for iOS platform HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uint128.