Skip to content

Add an implicit dependency on the '_SwiftConcurrencyShims' library #62883

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 2 commits into from
Jan 18, 2023

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jan 6, 2023

Whenever concurrency mode is enabled in compilation

@artemcm artemcm requested review from etcwilde and nkcsgexi January 6, 2023 17:54
@artemcm
Copy link
Contributor Author

artemcm commented Jan 6, 2023

@swift-ci smoke test

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

The concurrency shims have to exist if the concurrency module does because it uses the shims, but I'm also totally fine with explicit behavior over implicit assumptions.

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

LGTM!

@artemcm artemcm force-pushed the DepScanConcurrencyShims branch 2 times, most recently from d8b8015 to 10ac586 Compare January 6, 2023 18:14
@artemcm
Copy link
Contributor Author

artemcm commented Jan 6, 2023

@swift-ci smoke test and merge

@artemcm
Copy link
Contributor Author

artemcm commented Jan 6, 2023

@swift-ci smoke test Linux Platform

@artemcm artemcm changed the title [Dependency Scanning] Add an implicit dependency on the '_SwiftConcurrencyShims' library Add an implicit dependency on the '_SwiftConcurrencyShims' library Jan 9, 2023
@artemcm artemcm force-pushed the DepScanConcurrencyShims branch from 10ac586 to 2d54f90 Compare January 9, 2023 19:37
@artemcm artemcm requested review from hborla and xedin as code owners January 9, 2023 19:37
@artemcm
Copy link
Contributor Author

artemcm commented Jan 9, 2023

@swift-ci test

@@ -92,7 +92,7 @@ func f4(_ j: Wibble) { } // expected-error{{cannot find type 'Wibble' in scope}}
f4(5)

func f1() {
var c : Class // expected-error{{cannot find type 'Class' in scope}}
var c : Klass // expected-error{{cannot find type 'Klass' in scope}}
markUsed(c.x) // make sure error does not cascade here
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intent of the test here is to avoid propagating the original error. Once this additional Clang module is brought in, the name Class somehow conflicts with name-resolution logic as affected by the newly-added implicit Clang module dependency. Renaming this variable allows us to keep testing the original thing and not worry about it being affected by brought-in clang declarations...

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me!

@@ -1,4 +1,4 @@
// RUN: %empty-directory(%t.mod)
// RUN: %swift -emit-module -o %t.mod/cake1.swiftmodule %S/Inputs/cake1.swift -disable-implicit-string-processing-module-import -parse-as-library
// RUN: %swift -emit-module -o %t.mod/cake1.swiftmodule %S/Inputs/cake1.swift -disable-implicit-string-processing-module-import -disable-implicit-concurrency-module-import -parse-as-library
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These tests were subtly affected by the presence of the new module as well, so I just disabled overall implicit concurrency loading and modified the expected outputs accordingly. The tests are still exercising/verifying the functionality they were before.

@artemcm
Copy link
Contributor Author

artemcm commented Jan 9, 2023

@artemcm
Copy link
Contributor Author

artemcm commented Jan 11, 2023

3 similar comments
@artemcm
Copy link
Contributor Author

artemcm commented Jan 11, 2023

@artemcm
Copy link
Contributor Author

artemcm commented Jan 12, 2023

@artemcm
Copy link
Contributor Author

artemcm commented Jan 12, 2023

Whenever concurrency mode is enabled in compilation. This avoids instead ad-hoc requests to load this module in SILGen.
@artemcm artemcm force-pushed the DepScanConcurrencyShims branch from 2d54f90 to c5e1b6b Compare January 13, 2023 19:29
@artemcm
Copy link
Contributor Author

artemcm commented Jan 13, 2023

@swift-ci test

@artemcm
Copy link
Contributor Author

artemcm commented Jan 13, 2023

@swift-ci test macOS platform

2 similar comments
@artemcm
Copy link
Contributor Author

artemcm commented Jan 14, 2023

@swift-ci test macOS platform

@artemcm
Copy link
Contributor Author

artemcm commented Jan 17, 2023

@swift-ci test macOS platform

@artemcm
Copy link
Contributor Author

artemcm commented Jan 17, 2023

swiftlang/swift-driver#1264
@swift-ci test macOS platform

@artemcm
Copy link
Contributor Author

artemcm commented Jan 18, 2023

@artemcm artemcm merged commit 4eefefa into swiftlang:main Jan 18, 2023
@artemcm artemcm deleted the DepScanConcurrencyShims branch January 18, 2023 22:57
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