Skip to content
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: Web3Core.podspec #749

Merged

Conversation

zhangliugang
Copy link
Contributor

Summary of Changes

Fixes Web3Core.podspec

before publish new version to Cocoapods, change Podfile like this:

pod 'web3swift', :git => 'https://github.com/web3swift-team/web3swift.git', :commit => '{merge commit}'
pod 'Web3Core', :git => 'https://github.com/web3swift-team/web3swift.git', :commit => '{merge commit}'

Test Data or Screenshots

By submitting this pull request, you are confirming the following:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the develop branch.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.
  • I have checked that all tests work and swiftlint is not throwing any errors/warnings.

@yaroslavyaroslav
Copy link
Collaborator

yaroslavyaroslav commented Feb 1, 2023

Thanks, just asking, did you run pod spec lint Web3Swift.podspec before pushing it?

@JeneaVranceanu
Copy link
Collaborator

@zhangliugang Thanks for the effort but it looks like there are still a few errors.
@yaroslavyaroslav I think we should add CI command pod spec lint Web3Swift.podspec check when Web3Swift.podspec file changes. Not sure yet exactly how to configure that but I think it's possible.

The issues:

 -> Web3Core (3.0.6)
    - ERROR | name: The name of the spec should match the name of the file.
    - ERROR | [iOS] unknown: Encountered an unknown error (CocoaPods could not find compatible versions for pod "CryptoSwift":
  In Podfile:
    Web3Core (from `/Users/jeneavn/Downloads/web3swift-fix-podspec_module_name/web3swift.podspec`) was resolved to 3.0.6, which depends on
      CryptoSwift (~> 1.5.1)

None of your spec sources contain a spec satisfying the dependency: `CryptoSwift (~> 1.5.1)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.) during validation.

Analyzed 1 podspec.

[!] The spec did not pass validation, due to 2 errors.

Screenshot 2023-02-01 at 19 27 22

@yaroslavyaroslav I think Web3Core should be changed to Web3Swift in podspec?

Screenshot 2023-02-01 at 19 32 35

@yaroslavyaroslav
Copy link
Collaborator

yaroslavyaroslav commented Feb 1, 2023

Oh, nice idea, I've had though about how to adds some checks to pods that would work with its limitation, and lint definitely would. So I'll add it within a week or so to ci/cd. There's also --allow-warnings flag required because there's warnings throws from within some of dependency of us.

Btw, I have no idea why the hell it throws an error about unreachable pod if both pod version didn't updated and it didn't deleted from their repo. That dependency tool just cursed I guess.

@zhangliugang
Copy link
Contributor Author

lint failed because it clone code from tag 3.0.6
I changed podspec version to 3.1.0, and pod spec lint Web3Core.podspec works fine now.
if you want to lint web3swift.podspec, maybe you should publish Web3Core first

@yaroslavyaroslav
Copy link
Collaborator

@zhangliugang it should be unrelated, I mean while you performing lint on Web3Core should went successfully without changing web3swift podspec. Coz it actually have no dependencies to web3swift. Error could appears because of a wrong command calling (don't remember now, but there's one that test podspec remotely, like downloaded from GitHub, and another checking local code).

Anyway, It worth it to bump version in both specs as it necessary to release pod anyway.

@zhangliugang
Copy link
Contributor Author

@yaroslavyaroslav I mean web3swift depends on Web3Core. when lint on web3swift, pod resolve spec.dependency from https://github.com/CocoaPods/Specs.git not this repo, since the newest version of Web3Core in pod repo is 3.0.6, so it will fail util you push Web3Core.

I found an existing release workflow from https://github.com/mac-cain13/R.swift.Library/blob/master/.github/workflows/release.yml, this may give you some inspirer.

@yaroslavyaroslav
Copy link
Collaborator

Ah, yep, looks like I didn't got your point at first place. Thanks for the example, I'll look at it shortly. Anyway, if you know some way how to made multi pod maintainable by ci/cd you're more then welcome to suggest some. Since this is such a pain to made it manually every time.

@yaroslavyaroslav
Copy link
Collaborator

@zhangliugang It's good, but since I will release 3.1.1 this week, and this PR would be a part of it please bump both specs in files to 3.1.1.

Also I'll leave it here for the history: The right way to check whether the local code is passing pod checks is: pod lib lint --allow-warnings Web3Core.podspec

@JeneaVranceanu
Copy link
Collaborator

Updated versions to 3.1.1

@yaroslavyaroslav yaroslavyaroslav merged commit 57463b8 into web3swift-team:develop Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants