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
Refactor: Clean up and follow official naming conventions #21
Conversation
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
- Renamed product from `ConcordiumSwiftSdk` to simply `Concordium`. This is the name that will be used for imports, so it should be clear and without redundancy like "swift". - Removed `./ExampleWallet`. A new one is going to be built from scratch in `./examples`. - Follow naming conventions from the official [API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/). I've previously named things according to my personal preferences (i.e. `GrpcNodeClient` instead of `GRPCNodeClient`), but the conventions are clear and we should follow them.
eb-concordium
approved these changes
Mar 27, 2024
bisgardo
added a commit
that referenced
this pull request
Mar 28, 2024
- Some types and variables that aren't named according to the official [API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/) but were missed in #21 have been renamed appropriately. - New type aliases for identity parameters are added. - The intermediate type `VerifyKeyGrpc` is replaced with an extension `fromGRPCType` on `VerifyKey` from `ConcordiumWalletCrypto`. - The functions the convert values from the generated gRPC types have been tightened up to not accept `nil` values and ensure that optional values are explicitly handled at the right place.
bisgardo
added a commit
that referenced
this pull request
Mar 28, 2024
- Some types and variables that aren't named according to the official [API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/) but were missed in #21 have been renamed appropriately. - New type aliases for identity parameters are added. - The intermediate type `VerifyKeyGrpc` is replaced with an extension `fromGRPCType` on `VerifyKey` from `ConcordiumWalletCrypto`. - The functions the convert values from the generated gRPC types have been tightened up to not accept `nil` values and ensure that optional values are explicitly handled at the right place.
bisgardo
added a commit
that referenced
this pull request
Apr 2, 2024
- Some types and variables that aren't named according to the official [API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/) but were missed in #21 have been renamed appropriately. - New type aliases for identity parameters are added. - The intermediate type `VerifyKeyGrpc` is replaced with an extension `fromGRPCType` on `VerifyKey` from `ConcordiumWalletCrypto`. - The functions the convert values from the generated gRPC types have been tightened up to not accept `nil` values and ensure that optional values are explicitly handled at the right place.
bisgardo
added a commit
that referenced
this pull request
Apr 2, 2024
# Example CLI renaming When working on the next features, we ran into a [known bug in Swift](apple/swift#55127) that prevents the annotation `@main` from being usable from within a file named `main.swift`. According to a [note in the docs of `ArgumentParser`](https://apple.github.io/swift-argument-parser/documentation/argumentparser/gettingstarted/) (and apparently not documented anywhere else), this shouldn't work at all: > The Swift compiler uses either the type marked with @main or a main.swift file as the entry point for an executable program. You can use either one, but not both [...] So it's a bit of a mystery why it works in the current version, but not once more features are added... To fix the problem we rename `main.swift` to `commands.swift`. It also turns out that by upgrading to `swift-tools-version: 5.9`, we can abbreviate the setup to omit the "executable product" declaration and the intermediary directory inside `Sources`. Also, the executable is renamed to `concordium-example-client` to ensure that it never is mistaken for a production ready tool. Finally, some variables are renamed for consistency and the readme got an overhaul. # Vaious cleanup - Some types and variables that aren't named according to the official [API Design Guidelines](https://www.swift.org/documentation/api-design-guidelines/) but were missed in #21 have been renamed appropriately. - New type aliases for identity parameters are added. - The intermediate type `VerifyKeyGrpc` is replaced with an extension `fromGRPCType` on `VerifyKey` from `ConcordiumWalletCrypto`. - The functions the convert values from the generated gRPC types have been tightened up to not accept `nil` values and ensure that optional values are explicitly handled at the right place.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change is purely renaming and deletion of files and types. There are no changes in behavior.
ConcordiumSwiftSdk
to simplyConcordium
. This is the name that will be used for imports, so it should be clear and without redundancy like "swift".GrpcCli
to justCLI
and the produced executable toconcordium
../ExampleWallet
. A new one is going to be built from scratch in./examples
.GrpcNodeClient
instead ofGRPCNodeClient
), but the conventions are clear and we should follow them.