Skip to content

Some of the GenerateXcodeprojTests are hanging on pull request testing #2809

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

abertelrud
Copy link
Contributor

Some of the Xcode project generation tests were using in-memory file systems and others not. But the Xcode project generation code does not currently support non-local file systems (which should itself perhaps be addressed), and so this could cause tests to start traversing large parts of the actual file system, including over NFS mounts.

Ideally the Xcode project generation should support the in-memory file system, but since this functionality was primarily useful before Xcode supported loading packages natively, it's not clear whether it's worth the effort to fix that.

rdar://65200866

Some of the Xcode project generation tests were using in-memory file systems and others not.  But the Xcode project generation code does not currently support non-local file systems (which should itself perhaps be addressed), and so this could cause tests to start traversing large parts of the actual file system, including over NFS mounts.

Ideally the Xcode project generation should support the in-memory file system, but since this functionality was primarily useful before Xcode supported loading packages natively, it's not clear whether it's worth the effort to fix that.

rdar://65200866
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

The test failure (XCTAssertEqual failed: ("couldn't find pc file for BTarget") is not equal to ("couldn't find pc file")) is one that I've seen locally as well. It's unrelated to this change. Still, I'd like to fix that before merging this PR just to make sure we have a green checkmark.

@abertelrud
Copy link
Contributor Author

I think I see what's going on here. A change went into swift-tools-support-core that changed the diagnostic string here, but the corresponding swift-package-manager PR is still open as #2779. I'll see what's preventing that one from getting merged, but this confirms that it's unrelated to the changes in this PR.

@abertelrud
Copy link
Contributor Author

Waiting for #2779 to finish its tests, after which we can merge it (it's been approved). That should make the tests for this PR go green, and then we just need a review before merging.

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

Probably best to view the diff without whitespace changes, since the nesting level changed for some of the code in the tests.

@@ -29,15 +29,18 @@ class GenerateXcodeprojTests: XCTestCase {
func testXcodebuildCanParseIt() {
#if os(macOS)
mktmpdir { dstdir in
let fileSystem = InMemoryFileSystem(emptyFiles: "/Sources/DummyModuleName/source.swift")
let packagePath = dstdir.appending(component: "foo")
let modulePath = packagePath.appending(components: "Sources", "DummyModuleName")
Copy link
Member

Choose a reason for hiding this comment

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

Not an issue, but func appending(components names: String...) -> AbsolutePath is an interesting implementation... 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We use that function all over the place though. Are you saying it would be better to use two appends?

@abertelrud abertelrud merged commit c543d1a into swiftlang:master Jul 9, 2020
@abertelrud abertelrud deleted the eng/65200866-xcodeproj-generation-tests-are-hanging branch September 19, 2020 07:01
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