-
Notifications
You must be signed in to change notification settings - Fork 169
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
[CHANGE] Restructure Swift Package #376
Open
dioKaratzas
wants to merge
8
commits into
develop
Choose a base branch
from
improvement/optimize-project
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1413321
[CHANGE] Restructure Swift Package
dioKaratzas fce6767
[CHANGE] SwiftFormat Source Files
dioKaratzas ebe253c
[CHANGE] Update linux container
dioKaratzas 0af8ccd
[CHANGE] Pin BigInt to 5.3.0
dioKaratzas a0100d1
[CHANGE] Update .gitignore to ignore renamed TestConfigPrivate.swift
dioKaratzas 1aba890
[ADD] swift5.10 manifest to prepare for the StrictConcurrency
dioKaratzas e7e4350
[CHANGE] Disable webSocketTests that might fail randomly
dioKaratzas 5febb97
[CHANGE] SwiftFormat Swift version
dioKaratzas 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,4 @@ fastlane/screenshots | |
fastlane/test_output | ||
|
||
scripts/bin/* | ||
TestConfig_private.swift | ||
TestConfigPrivate.swift |
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 |
---|---|---|
@@ -1,70 +1,132 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "BigInt", | ||
"repositoryURL": "https://github.com/attaswift/BigInt", | ||
"state": { | ||
"branch": null, | ||
"revision": "0ed110f7555c34ff468e72e1686e59721f2b0da6", | ||
"version": "5.3.0" | ||
} | ||
}, | ||
{ | ||
"package": "GenericJSON", | ||
"repositoryURL": "https://github.com/iwill/generic-json-swift", | ||
"state": { | ||
"branch": null, | ||
"revision": "0a06575f4038b504e78ac330913d920f1630f510", | ||
"version": "2.0.2" | ||
} | ||
}, | ||
{ | ||
"package": "secp256k1", | ||
"repositoryURL": "https://github.com/GigaBitcoin/secp256k1.swift.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "1a14e189def5eaa92f839afdd2faad8e43b61a6e", | ||
"version": "0.12.2" | ||
} | ||
}, | ||
{ | ||
"package": "swift-log", | ||
"repositoryURL": "https://github.com/apple/swift-log.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "5d66f7ba25daf4f94100e7022febf3c75e37a6c7", | ||
"version": "1.4.2" | ||
} | ||
}, | ||
{ | ||
"package": "swift-nio", | ||
"repositoryURL": "https://github.com/apple/swift-nio.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "124119f0bb12384cef35aa041d7c3a686108722d", | ||
"version": "2.40.0" | ||
} | ||
}, | ||
{ | ||
"package": "swift-nio-ssl", | ||
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "1750873bce84b4129b5303655cce2c3d35b9ed3a", | ||
"version": "2.19.0" | ||
} | ||
}, | ||
{ | ||
"package": "websocket-kit", | ||
"repositoryURL": "https://github.com/vapor/websocket-kit.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "e32033ad3c68ebec1b761bc961be7bd56bad02f8", | ||
"version": "2.3.1" | ||
} | ||
"originHash" : "3324b139415be85518d19463c6e2531e9bcc17d568a760c8b61de80c16e039db", | ||
"pins" : [ | ||
{ | ||
"identity" : "bigint", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/attaswift/BigInt", | ||
"state" : { | ||
"revision" : "0ed110f7555c34ff468e72e1686e59721f2b0da6", | ||
"version" : "5.3.0" | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
}, | ||
{ | ||
"identity" : "generic-json-swift", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/iwill/generic-json-swift", | ||
"state" : { | ||
"revision" : "0a06575f4038b504e78ac330913d920f1630f510", | ||
"version" : "2.0.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "secp256k1.swift", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/GigaBitcoin/secp256k1.swift.git", | ||
"state" : { | ||
"revision" : "9683e8e311c76d8114cd308b697dad2f9fc58fed", | ||
"version" : "0.17.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-atomics", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-atomics.git", | ||
"state" : { | ||
"revision" : "cd142fd2f64be2100422d658e7411e39489da985", | ||
"version" : "1.2.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-collections", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-collections.git", | ||
"state" : { | ||
"revision" : "9bf03ff58ce34478e66aaee630e491823326fd06", | ||
"version" : "1.1.3" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-http-types", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-http-types", | ||
"state" : { | ||
"revision" : "ae67c8178eb46944fd85e4dc6dd970e1f3ed6ccd", | ||
"version" : "1.3.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-log", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-log.git", | ||
"state" : { | ||
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537", | ||
"version" : "1.6.1" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio.git", | ||
"state" : { | ||
"revision" : "9746cf80e29edfef2a39924a66731249223f42a3", | ||
"version" : "2.72.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-extras", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-extras.git", | ||
"state" : { | ||
"revision" : "d1ead62745cc3269e482f1c51f27608057174379", | ||
"version" : "1.24.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-http2", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-http2.git", | ||
"state" : { | ||
"revision" : "b5f7062b60e4add1e8c343ba4eb8da2e324b3a94", | ||
"version" : "1.34.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-ssl", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-ssl.git", | ||
"state" : { | ||
"revision" : "7b84abbdcef69cc3be6573ac12440220789dcd69", | ||
"version" : "2.27.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-nio-transport-services", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-nio-transport-services.git", | ||
"state" : { | ||
"revision" : "38ac8221dd20674682148d6451367f89c2652980", | ||
"version" : "1.21.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-system", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-system.git", | ||
"state" : { | ||
"revision" : "d2ba781702a1d8285419c15ee62fd734a9437ff5", | ||
"version" : "1.3.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "websocket-kit", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/vapor/websocket-kit.git", | ||
"state" : { | ||
"revision" : "4232d34efa49f633ba61afde365d3896fc7f8740", | ||
"version" : "2.15.0" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// swift-tools-version:5.10 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "web3.swift", | ||
platforms: [ | ||
.iOS(SupportedPlatform.IOSVersion.v13), | ||
.macOS(SupportedPlatform.MacOSVersion.v11), | ||
.watchOS(.v7) | ||
], | ||
products: [ | ||
.library(name: "web3.swift", targets: ["web3"]), | ||
.library(name: "web3-zksync.swift", targets: ["web3-zksync"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/attaswift/BigInt", exact: "5.3.0"), | ||
.package(url: "https://github.com/iwill/generic-json-swift", from: "2.0.0"), | ||
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", from: "0.6.0"), | ||
.package(url: "https://github.com/vapor/websocket-kit.git", from: "2.0.0"), | ||
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0") | ||
], | ||
targets: [ | ||
.target( | ||
name: "web3", | ||
dependencies: | ||
[ | ||
.target(name: "keccaktiny"), | ||
.target(name: "aes"), | ||
.target(name: "Internal_CryptoSwift_PBDKF2"), | ||
.product(name: "BigInt", package: "BigInt"), | ||
.product(name: "GenericJSON", package: "generic-json-swift"), | ||
.product(name: "secp256k1", package: "secp256k1.swift"), | ||
.product(name: "WebSocketKit", package: "websocket-kit"), | ||
.product(name: "Logging", package: "swift-log") | ||
], | ||
path: "Sources/Web3Swift", | ||
swiftSettings: [ | ||
// .concurrencyChecking | ||
] | ||
), | ||
.target( | ||
name: "web3-zksync", | ||
dependencies: | ||
[ | ||
.target(name: "web3") | ||
], | ||
path: "Sources/Web3ZKSync", | ||
swiftSettings: [ | ||
// .concurrencyChecking | ||
] | ||
), | ||
.target( | ||
name: "keccaktiny", | ||
dependencies: [], | ||
path: "libs/keccak-tiny", | ||
exclude: ["module.map"] | ||
), | ||
.target( | ||
name: "aes", | ||
dependencies: [], | ||
path: "libs/aes", | ||
exclude: ["module.map"] | ||
), | ||
.target( | ||
name: "Internal_CryptoSwift_PBDKF2", | ||
dependencies: [], | ||
path: "libs/CryptoSwift" | ||
), | ||
.testTarget( | ||
name: "web3swiftTests", | ||
dependencies: ["web3", "web3-zksync"], | ||
path: "Tests/Web3SwiftTests", | ||
resources: [ | ||
.copy("Resources/rlptests.json"), | ||
.copy("Account/cryptofights_712.json"), | ||
.copy("Account/ethermail_signTypedDataV4.json"), | ||
.copy("Account/real_word_opensea_signTypedDataV4.json"), | ||
] | ||
) | ||
] | ||
) | ||
|
||
extension SwiftSetting { | ||
/// Enable complete concurrency checking for a target in a Swift package using Swift 5.9 or Swift 5.10 | ||
/// [Swift Concurrency Documentation](https://www.swift.org/documentation/concurrency/) | ||
static var concurrencyChecking: SwiftSetting { | ||
.enableExperimentalFeature("StrictConcurrency=complete") | ||
} | ||
} |
Oops, something went wrong.
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.
XCTAssertEqual(BigInt(hex: "")!, 0)
when updating to latest BigInt that assert fails