-
Notifications
You must be signed in to change notification settings - Fork 468
fix: module name #694
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
fix: module name #694
Conversation
Good suggestions. 👌 I would argue why have even web3swift and (web3)core separate? What was the intention behind it? p.s. This will be a fun one to rebase. 😅 |
The intention was to separate essential parts of the code from secondary (e.g. ERC standard implementations), mainly for convenience and clarity for those who contribute to web3swift repository. |
Heh, this is actually because of you and only you) It was around mid of August when I've raised question about whether it worth it to split lib into a modules or not? And there was just you who answered back there and your answer was yes) Anyway I'm kidding of course, the intent of core one is to give ability to the developer folks use just very necessary minimum within their app if they wanted to rather then all big-fat library instead. So this would comes to stripping their binary size. And the actual Also that refactoring helped to decoupling a lot of internal implementations. Though it's not complete from my point of view, I've wanted to split it even more granularly:
But this one could lasts forever, so I ends up with this. |
🤣👌 |
@JeneaVranceanu while I see the issue, and agree that the module name was taken a bit excessively, and even more then that, having this issue #651 raised recently from other developer folks, I'd wondering, is it worth it to rename it now, while keeping in mind all those developer folks who already uses this lib and who has to refactor their code base, yep, I estimate them as a little, but they still are. Also this issue stands straight mostly in Cocoapods, as well, as it would take some time to update it this way by me (means renamed core likely should be pushed there as new pod), because swift 5.7 provides module aliasing, I've not tested it by myself, but my guess is that it depends on toolchain version installed, so it should be available to all whom has latest Xcode installed. On the other hand the issue is real, as I don't feel it, I see the folks that it hurts, and if we would made that change we should do it now or at 4.0.0. So I'd like to hear a bit more about how bad this issue is before accepting it. |
Note: by user I mean a developer who uses the library. TL;DR The name is quite vague and unclear. People will complain and we can do better. @yaroslavyaroslav I'm currently migrating a project to 3.. and it took me 20-30 seconds to realize that the module I need to import was |
GitHub insights says that we have 258 unique git cloners. Lets treat that number as a number of active users though I'm sure it's lower than that. Publishing a new update we can add enough description to it clearly highlight that people should replace |
@JeneaVranceanu sounds convincing, have nothing to say against it. |
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.
✅ If we have multiple modules this def makes sense.
If I understood correctly now this was mainly done for contributors. I'd argue though that for users of the library, multiple modules are not really convenient. So this might be something to discuss in the future e.g. for v4.
# Conflicts: # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+Call.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+EstimateGas.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+FeeHistory.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetAccounts.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBalance.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBlockByHash.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBlockByNumber.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBlockNumber.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetCode.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetGasPrice.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetTransactionCount.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetTransactionDetails.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetTransactionReceipt.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+SendRawTransaction.swift # Sources/web3swift/EthereumAPICalls/Ethereum/Eth+SendTransaction.swift # Tests/web3swiftTests/remoteTests/ST20AndSecurityTokenTests.swift
8455cba
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'd approve everything, but the gitignore change, is it by purpose?
.gitignore
Outdated
# Sourcetree app | ||
icon.png |
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.
Why?
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.
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.
Maybe is it worth to put such into ~/.gitignore_global
? I mean that this is your setup specific, not the tools that is used into project itself.
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.
👍
Removed from .gitignore
.
Updated module name from
Core
toWeb3Core
because in 3rd party projects it doesn't make sense to import the module namedCore
. It doesn't tell anything about what the module actually is.For example, if you want to use only
EthereumAddress
in some file of your project you need to addimport Core
among the imports. Usingimport web3swift
will result inCannot find type 'EthereumAddress' in scope
becauseCore
is a different module.Using both
web3swift
andCore
still doesn't explain whatCore
is.