Skip to content

Implement --enable-parseable-module-interfaces for swift-build buildsystem #8421

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
Apr 16, 2025

Conversation

daveinglis
Copy link
Contributor

@daveinglis daveinglis commented Mar 27, 2025

  • this also fixes -enable-library-evolution when used as a unsafeFlags

Closes: #8337

Modifications:

sets SWIFT_EMIT_MODULE_INTERFACE build setting when option is set

Result:

the build option will include the .swftinertface files in the module folder

@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis daveinglis force-pushed the pr/parseable_module branch from 395acee to 4047680 Compare March 27, 2025 18:11
@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis daveinglis force-pushed the pr/parseable_module branch from 4047680 to 0392765 Compare March 27, 2025 18:59
@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis daveinglis force-pushed the pr/parseable_module branch from 0392765 to c74d017 Compare March 31, 2025 18:15
@daveinglis
Copy link
Contributor Author

@swift-ci test

@daveinglis daveinglis force-pushed the pr/parseable_module branch from c74d017 to 32b7a28 Compare March 31, 2025 19:07
@@ -70,7 +70,19 @@ class BuildCommandTestCases: CommandsBuildProviderTestCase {
// is what `binContents` is meant to represent.
return contents != ["output-file-map.json"]
}
let moduleContents = (try? localFileSystem.getDirectoryContents(binPath.appending(component: "Modules"))) ?? []
var moduleContents: [String] = []
if buildSystemProvider == .native {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: instead of creating an if statement to control the behaviour of the build function, can we instead call a function that is overridden in the sub classes?

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 think this should wait since we will be moving to swift testing, we can refactor these tests better.

@@ -190,48 +202,6 @@ class BuildCommandTestCases: CommandsBuildProviderTestCase {
}
}

func testBinSymlink() async throws {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: In order to ensure the "concrete" class implement this this, can we keep an implementation that will fail, forcing the subclasses to implement the test?

This way, we are guaranteed that each sub-class will implement this test.

…ystem

- this also fixes -enable-library-evolution when used as a unsafeFlags

Closes: 8337
@daveinglis daveinglis force-pushed the pr/parseable_module branch from 32b7a28 to 6420013 Compare April 1, 2025 18:16
@daveinglis
Copy link
Contributor Author

@swift-ci test

1 similar comment
@daveinglis
Copy link
Contributor Author

@swift-ci test

@bkhouri
Copy link
Contributor

bkhouri commented Apr 3, 2025

@swift-ci please test self hosted windows

@daveinglis
Copy link
Contributor Author

@swift-ci test

@bkhouri bkhouri merged commit e842b0e into swiftlang:main Apr 16, 2025
6 of 7 checks passed
johnbute pushed a commit to johnbute/fork-swift-package-manager that referenced this pull request Apr 17, 2025
…ystem (swiftlang#8421)

- this also fixes -enable-library-evolution when used as a unsafeFlags

Closes: swiftlang#8337

### Modifications:

sets SWIFT_EMIT_MODULE_INTERFACE build setting when option is set

### Result:

the build option will include the .swftinertface files in the module
folder
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.

Swiftbuild system doesn't support the build --enable-parseable-module-interfaces flag
2 participants