You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AwsCommonRuntimeKit has a dependency on aws_http_stream:
build\debug\_deps\awscrtswift-src\Source\AwsCommonRuntimeKit\http\HTTPStream.swift:12:41: error: cannot find type 'aws_http_stream' in scope
10 | var callbackData: HTTPStreamCallbackCore
11 |
12 | init(rawValue: UnsafeMutablePointer<aws_http_stream>,
| `- error: cannot find type 'aws_http_stream' in scope
13 | callbackData: HTTPStreamCallbackCore) {
14 | self.callbackData = callbackData
This type is defined in: aws-c-http\include\aws\http\private\request_response_impl.h
If you build aws-c-http using CMake, it does not install private headers. AwsCommonRuntimeKit is getting around this because the clang importer is slurping in all of the headers when you build with spm, since aws-c-http does not provide a modulemap.
Expected Behavior
Probably shouldn't depend on private headers.
Current Behavior
Definitely depends on private headers.
Reproduction Steps
Build aws-c-http with CMake then try to link it against AwsCommonRuntimeKit.
Possible Solution
I'm not familiar with the code, but the comments on the aws_http_stream definition imply its a base type. So use the derived types, or make the base type public in a consumable header?
From quick check we are not relying on concrete types for either of those structures in swift. Swift is just interacting with the pointers to those types through apis exposed in public headers. And then any manipulation of the concrete type is done on crt side through the private header. This is a fairly common approach for c99, and should be fine with swift as well
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
AwsCommonRuntimeKit
has a dependency onaws_http_stream
:This type is defined in:
aws-c-http\include\aws\http\private\request_response_impl.h
If you build
aws-c-http
usingCMake
, it does not install private headers.AwsCommonRuntimeKit
is getting around this because the clang importer is slurping in all of the headers when you build with spm, sinceaws-c-http
does not provide a modulemap.Expected Behavior
Probably shouldn't depend on private headers.
Current Behavior
Definitely depends on private headers.
Reproduction Steps
Build
aws-c-http
with CMake then try to link it againstAwsCommonRuntimeKit
.Possible Solution
I'm not familiar with the code, but the comments on the
aws_http_stream
definition imply its a base type. So use the derived types, or make the base type public in a consumable header?Additional Information/Context
No response
aws-crt-swift version used
commit 60c0cf4acb617af5b7f5b67170f9fbf65fd2a382 (origin/main, origin/HEAD, main)
Compiler and Version used
compnerd.org Swift version 6.0-dev (LLVM a527f49f462b0d7, Swift eef85a7be270421) Target: x86_64-unknown-windows-msvc
Operating System and version
Windows 11 Version 23H2 Build 22631.4249
The text was updated successfully, but these errors were encountered: