-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Fastlane.Swift] Allow overriding LaneFileProtocol lifecycles when subclassing LaneFile #20563
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
Conversation
Allowing subclasses to override the onError function
Allowing subclasses to override the lifecycles
|
Hi SvenTiigi, I have a quick doubt, I have made a new executable package by adding Fastlane spm as dependency. Mostly I could find fastlane init swift which asked me to configure fastlane in my root folder with the new Fastfile.swift. New exec Package.swift with my custom lanes. let package = Package(
name: "fastlaneRunner",
products: [
.executable(name: "fastlaneRunner", targets: ["fastlaneRunner"])
],
dependencies: [
.package(url: "https://github.com/fastlane/fastlane", .upToNextMinor(from: .init(2, 179, 0)))
],
targets: [
.executableTarget(
name: "fastlaneRunner",
dependencies: [
.product(name: "Fastlane", package: "fastlane")
],
path: "Sources"
)
]
) |
|
Just bumped into this as I'm experimenting with Fastlane.swift via SPM. @karthikAdaptavant Not sure if I get your question, but you can either integrate the |
|
I just discovered that when So.. can we please merge this PR? It's just a simple change. cc @mollyIV @janpio @joshdholtz |
|
Bump, can we please merge this? It's the only major issue preventing us from using Fastlane.swift in production 😿 |
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.
Thanks for the nagging :)
Looks good to me, but I am not a Swift user, so I'll ask others in the team to review as well.
Thanks for your patience!
|
Just a small hint regarding the attached issue #21849: So in addition to this PR it would be great to add an appropriate invocation of fastlane/fastlane/swift/LaneFileProtocol.swift Lines 144 to 149 in 26b695f
There is a similar open PR #20552 to this problem. |
|
@SvenTiigi thanks for all this valuable info 🙌 I like your approach to restrict the changes in the PR #20552 to Swift Packages only, do you think they work, though? I found this: https://forums.swift.org/t/unable-to-compile-swift-package-when-used-in-xcode/36081 |
|
@rogerluan since the |
|
This PR is not getting the attention it needs considering the issues it fixes, so I just want to chime in that we're also waiting on this. 🙂 We've also been experimenting with Fastlane.swift through SPM and the issues this PR is taking care of are the ones that are currently blocking us from trying it out in a live environment. |
|
@rogerluan Do you have any updates on this PR's status? |
|
@rogerluan @lacostej Can we please merge this? 🙏 Is there anything that needs to be done? |
|
bump |
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.
Thanks for your contribution and so sorry it took sooo long to get to review it.
The changes are looking good. I was playing with it a bit and didn't spot any issues.
🚀 🚀
|
Love it. |
Checklist
bundle exec rspecfrom the root directory to see all new and existing tests passbundle exec rubocop -ato ensure the code style is validci/circlecibuilds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Resolves #21849
When using Fastlane.Swift in the context of a Swift Package the
LaneFileProtocollifecycles such asbeforeAll,onErrorandafterAllcan not be overridden by a subclass ofLaneFile.Package.swift
Description
This PR changes the modifier of the
onErrorfunction of theLaneFilefrompublictoopento fix theOverriding non-open instance method outside of its defining moduleerror (b9dba0a).Additionally, the
beforeAllandafterAlllifecycles have been added asopenfunctions to theLaneFileto fix theMethod does not override any method from its superclasserror (f4f5380).