-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Fastlane.Swift] Allow overriding LaneFileProtocol lifecycles when subclassing LaneFile #20563
base: master
Are you sure you want to change the base?
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? |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds 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
LaneFileProtocol
lifecycles such asbeforeAll
,onError
andafterAll
can not be overridden by a subclass ofLaneFile
.Package.swift
Description
This PR changes the modifier of the
onError
function of theLaneFile
frompublic
toopen
to fix theOverriding non-open instance method outside of its defining module
error (b9dba0a).Additionally, the
beforeAll
andafterAll
lifecycles have been added asopen
functions to theLaneFile
to fix theMethod does not override any method from its superclass
error (f4f5380).