Skip to content

Add yum provider support #2642

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

Merged
merged 1 commit into from
Mar 7, 2020
Merged

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Mar 6, 2020

No description provided.

@drexin drexin requested a review from aciidgh as a code owner March 6, 2020 00:42
@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@swift-ci smoke test

@drexin drexin force-pushed the wip-add-yum-support branch from 94e05e9 to 80c3fa4 Compare March 6, 2020 00:51
@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@swift-ci smoke test

@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@aciidb0mb3r any idea why this is failing?

/home/buildnode/jenkins/workspace/swift-package-manager-self-hosted-Linux-smoke-test/branch-master/swiftpm/Sources/PackageLoading/Target+PkgConfig.swift:127:39: error: type 'Platform.LinuxFlavor' has no member 'fedora'
16:53:02             if case .linux(.fedora) = platform {
16:53:02                                       ^~~~~~~~

The case is clearly part of the PR: https://github.com/apple/swift-package-manager/pull/2642/files#diff-72f5fe00a512bdefecfdb4d0a0574387R23

@aciidgh
Copy link
Contributor

aciidgh commented Mar 6, 2020

Ah, you need to land the TSC changes in this repository first: https://github.com/apple/swift-tools-support-core

///
/// - Parameters:
/// - packages: The list of package names.
public static func yum(_ packages: [String]) -> SystemPackageProvider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be marked using package description availability: @available(_PackageDescription, introduced: 999)

@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

Ah, good. Thanks!

@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@aciidb0mb3r Created swiftlang/swift-tools-support-core#59

Should I remove the code from this PR?

@drexin drexin force-pushed the wip-add-yum-support branch from 80c3fa4 to e8de92b Compare March 6, 2020 03:58
@aciidgh
Copy link
Contributor

aciidgh commented Mar 6, 2020

Should I remove the code from this PR?

Nah, it needs to be in both places right now :(

@@ -426,9 +426,11 @@ public enum SystemPackageProvider {
#if PACKAGE_DESCRIPTION_4
case brewItem([String])
case aptItem([String])
case yumItem([String])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't add this case for PackageDescription 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -1412,6 +1412,7 @@ final class BuildPlanTests: XCTestCase {
providers: [
.brew(["BTarget"]),
.apt(["BTarget"]),
.yum(["BTarget"]),
]
)
]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, not sure what's up with the commented out assertion. Can you check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll open a separate PR for that, as it's unrelated to this change. If for some reason this has to be reverted, we would regress there again.

@aciidgh
Copy link
Contributor

aciidgh commented Mar 6, 2020

Some minor comments but LGTM! Thanks for working on this 😃

@drexin drexin force-pushed the wip-add-yum-support branch from e8de92b to 8c57a7e Compare March 6, 2020 21:49
@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@aciidb0mb3r thanks for the review. I removed the PD4 cases.

@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@swift-ci test

@drexin
Copy link
Contributor Author

drexin commented Mar 6, 2020

@swift-ci smoke test

@aciidgh aciidgh merged commit d433df8 into swiftlang:master Mar 7, 2020
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.

2 participants