Skip to content

[do not merge] Test PR for Swift-Markdown #13 #40031

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

franklinsch
Copy link
Contributor

Test PR for cross-repo testing swiftlang/swift-markdown#13.

@franklinsch franklinsch changed the title Test PR for Swift-Markdown #13 [do not merge] Test PR for Swift-Markdown #13 Nov 3, 2021
@franklinsch
Copy link
Contributor Author

swiftlang/swift-markdown#13
@swift-ci please smoke test

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 3, 2021

apple/swift-markdown#13
@swift-ci please smoke test

How does the cross-repo test working? I did not see any config file change. Is this grammar mean that we are testing swift repo with swift-markdown on this markdown-PR's branch?

@franklinsch
Copy link
Contributor Author

Is this grammar mean that we are testing swift repo with swift-markdown on this markdown-PR's branch?

Yes, that's right. It builds swift main with the Swift-Markdown PR.

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

In macOS Platform log's end

ERROR: command terminated with a non-zero exit status 1, aborting

I did not find what's wrong with the test. What's the actually failure about this? Is there something related to me to fix?

@franklinsch
Copy link
Contributor Author

It looks like the build is failing with:

11:57:06 error: unknown package 'swift-cmark' in dependencies of target 'Markdown'; valid packages are: 'swift-cmark-gfm', 'swift-argument-parser'

Which seems to be related to the changes in the Swift-Markdown PR

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

It looks like the build is failing with:

11:57:06 error: unknown package 'swift-cmark' in dependencies of target 'Markdown'; valid packages are: 'swift-cmark-gfm', 'swift-argument-parser'

Which seems to be related to the changes in the Swift-Markdown PR

Got the issue. In the past, we do not need to write package name for the dependence.

dependencies: ["cmark-gfm", "cmark-gfm-extensions", "CAtomic"])

But in the recent version of SPM(swift 5.x), if a dependence is in the same package, we could use the old way (byNameTarget), but if a dependence is in other package, we need to explicitly use something like .product(name: "cmark-gfm", package: "swift-cmark").

And in the bottom, we have this.

if ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil {
    // Building standalone, so fetch all dependencies remotely.
    package.dependencies += [
        .package(url: "https://github.com/apple/swift-cmark.git", .branch("gfm")),
        .package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "0.4.4")),
    ]
} else {
    // Building in the Swift.org CI system, so rely on local versions of dependencies.
    package.dependencies += [
        .package(path: "../swift-cmark-gfm"),
        .package(path: "../swift-argument-parser"),
    ]
}

Then the product's package name should be swift-cmark-gfm if we are have "SWIFTCI_USE_LOCAL_DEPS".

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

we could solve this by introduce a var like this.

let swiftCmarkPackageName = ProcessInfo.processInfo.environment["SWIFTCI_USE_LOCAL_DEPS"] == nil ? "swift-cmark" : "swift-cmark-gfm"

Let me check a while to see if there is a better solution.

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

I think the folder "swift-cmark-gfm" is here because we have "swift-cmark" folder already for the main branch of "swift-cmark" repo. Right? Can we have a better structure for this?

Or should we file a bug/feature to SPM to support this.
I think the dependence .product(name: "cmark-gfm", package: "swift-cmark")'s package name should be the name in the Package.swift's Package name rather the folder/url name.
Screen Shot 2021-11-04 at 17 32 45

@franklinsch

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

Temp fixed by adding a var. Update the branch, could we run test again? Thanks

@franklinsch
Copy link
Contributor Author

This is a change introduced in SE-0226:

Starting with the SwiftPM version following 5.4 (exact number TBD), SwiftPM will actively discourage the use of the name attribute on the package dependency declaration (will emit warning when used with tools-version >= TBD) and instead will compute an identity for the declared dependency by using the last path component of the dependency URL (or path in the case of local dependencies) in the dependencies section

As such, your proposed fix looks good to me.

@franklinsch
Copy link
Contributor Author

swiftlang/swift-markdown#13
@swift-ci please smoke test

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

This is a change introduced in SE-0226:

Starting with the SwiftPM version following 5.4 (exact number TBD), SwiftPM will actively discourage the use of the name attribute on the package dependency declaration (will emit warning when used with tools-version >= TBD) and instead will compute an identity for the declared dependency by using the last path component of the dependency URL (or path in the case of local dependencies) in the dependencies section

As such, your proposed fix looks good to me.

Got it, so it is a feature already discussed under swift-evolution.

@Kyle-Ye
Copy link
Contributor

Kyle-Ye commented Nov 4, 2021

The Windows Platform test seems to be cancelled by the user.

@franklinsch
Copy link
Contributor Author

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

swift-ci commented Nov 4, 2021

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 216a265

Install command
tar zxf swift-PR-40031-725-ubuntu16.04.tar.gz
More info

@franklinsch
Copy link
Contributor Author

swiftlang/swift-markdown#13
@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

swift-ci commented Nov 4, 2021

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 216a265

Install command
tar zxf swift-PR-40031-726-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

swift-ci commented Nov 4, 2021

macOS Toolchain
Download Toolchain
Git Sha - 216a265

Install command
tar -zxf swift-PR-40031-1210-osx.tar.gz --directory ~/

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.

4 participants