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

Problem with Agrume on Bitrise's testing step #227

Closed
erikamatesz opened this issue Oct 30, 2020 · 7 comments
Closed

Problem with Agrume on Bitrise's testing step #227

erikamatesz opened this issue Oct 30, 2020 · 7 comments

Comments

@erikamatesz
Copy link

I have an app (legacy code) which uses Agrume 5.3.0. When I build it on my Xcode and run tests on it, everything works just fine. But when I try to run my workflow on Bitrise, it gives me this error on the testing step:

** TEST BUILD FAILED **


The following build commands failed:
	CompileSwift normal arm64 /Users/vagrant/git/K2KonnectApp/Pods/Agrume/Agrume/Agrume.swift
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler

All targets of the project use Swift 4 and, inside my Podfile, there is this code:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if ['EPContactsPicker', 'SWXMLHash'].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
        end
        if ['Splitflap', 'Agrume', 'SwiftyGif', 'FoldingCell', 'UICircularProgressRing'].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.2'
            end
        end
    end
end

Can you help me figure it out?

@JanGorman
Copy link
Owner

Sorry to hear that. I was just going through the release history and looks like the 5.3 release was the one that switched to Swift 5 (tbh to this day I'm unsure how to deal with Swift version changes, should probably be a major release). Could you give 5.2.5 a try https://github.com/JanGorman/Agrume/tree/5.2.5

@erikamatesz
Copy link
Author

I'll do that right now and, as soon as I have an output, I'll share with you!

@erikamatesz
Copy link
Author

When I updated the pod and tried to run on my Xcode, I got this:

/Users/user/Desktop/projects/APP-PATH/Pods/Agrume/Agrume/ImageDownloader.swift:23:17: Call can throw, but it is not marked with 'try' and the error is not handled

@JanGorman
Copy link
Owner

That'll be due to the SwiftGif dependency https://github.com/JanGorman/Agrume/blob/5.2.5/Agrume.podspec#L25 – I remember that at some point it changed.

It's not constrained to a specific version so probably it's pulling the latest one. In your own Podfile you can set it to a version that doesn't throw.

I need to leave the house now, otherwise I'd be able to help and figure out which version it was exactly. Could be this one https://github.com/kirualex/SwiftyGif/releases/tag/4.2.0

Otherwise I'm able to help figure it out a later today

@erikamatesz
Copy link
Author

Ok, I'll try this and let you know the outputs :) Thanks!

@erikamatesz
Copy link
Author

I solved this part :) Now, another pod is giving me trouble. Thanks for your help!

@JanGorman
Copy link
Owner

Glad to hear 👍

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

No branches or pull requests

2 participants