Skip to content
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

[CompilerPlugin] Updates after Foundation removal #2618

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Apr 22, 2024

  • Merge _AtomicBool into _SwiftSyntaxCShims
  • Make _AtomicBool header only
  • Separate errno from _stdio.h
  • Give swift_name attributes to C shims

Also, move SwiftCompilerPlugin.PluginMessageConnection to SwiftCompilerPluginMessageHandling, so other components e.g. swift-plugin-server can use it as well.

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test

@rintaro rintaro force-pushed the cshims-unified branch 3 times, most recently from a295a7c to 7c37f5f Compare April 22, 2024 23:15
@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 22, 2024

@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 23, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 23, 2024

@swift-ci Please test Windows

@@ -24,7 +24,7 @@ fileprivate struct AtomicBool {
}
}
#else
import _AtomicBool
import _SwiftSyntaxCShims
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we’ve got AtomicBool available in the CMake build as well now (I never thought of making it header-only, nice idea), I think we can also remove the hack of defining a fake AtomicBool when SWIFT_SYNTAX_BUILD_USING_CMAKE is sent and instead always use _SwiftSyntaxCShims.

@rintaro rintaro force-pushed the cshims-unified branch 2 times, most recently from 503e579 to de8f78f Compare April 24, 2024 17:33
@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

apple/swift#73224
@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

apple/swift#73224
@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 24, 2024

apple/swift#73224
@swift-ci Please test Windows

Headers are now in 'swiftsyntax' subdirectory to avoid file name conflicts
with libc. e.g. '#include <_stdio.h>' referenced from C++ compiler code
which might pick up '_SwiftSyntaxCShims/include/_stdio.h'
So that other modules (e.g. swift-plugin-server can use it)
Renamed to 'StandardIOMessageConnection'
@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

apple/swift-package-manager#7503
@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

apple/swift-package-manager#7503
@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 25, 2024

apple/swift-package-manager#7503
@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 26, 2024

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Apr 26, 2024

@swift-ci Please test Windows

@rintaro
Copy link
Member Author

rintaro commented Apr 26, 2024

Leaving the AtomicBool hack as-is for now, because making SwiftSyntax depend on CShims in CMake is too much hassle.

@rintaro
Copy link
Member Author

rintaro commented Apr 26, 2024

@swift-ci Please test

1 similar comment
@rintaro
Copy link
Member Author

rintaro commented Apr 26, 2024

@swift-ci Please test

@rintaro rintaro merged commit 7c58d26 into apple:main Apr 26, 2024
3 checks passed
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.

None yet

3 participants