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

Implicit conversion loses integer precision warnings #418

Open
tobiasjordan opened this issue Feb 1, 2023 · 2 comments
Open

Implicit conversion loses integer precision warnings #418

tobiasjordan opened this issue Feb 1, 2023 · 2 comments

Comments

@tobiasjordan
Copy link

SwiftNIO commit hash: 845a97c

Context:
For a while now, building this package (with a recent Xcode Version (14.x)) produces 220 Implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' warnings. Any chance of getting this fixed?

The reason this is becoming a problem for me is because I run my Xcode project - which embeds this library as a Swift package - using the xcodebuild cli, treating all warnings as errors which then causes my CI pipeline to fail. As I couldn't find any way to disable (certain) warnings only in Swift packages, I'm creating this issue now. Thank you very much for any info on this, I'd very much appreciate it!

Steps to reproduce:

  1. Clone repo, open Swift.package in Xcode 14
  2. Build

$ swift --version
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0

Operating system: macOS 13.1 (22C65)

$ uname -a
Darwin M1-MacBook-Pro.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64

@Lukasa
Copy link
Contributor

Lukasa commented Feb 1, 2023

Unfortunately, these warnings come from code we don’t control, the BoringSSL layer. The issue has been reported upstream. Unfortunately for now there really isn’t anything we can do unless you can convince Xcode to remove the flag mentioned in that issue.

@tobiasjordan
Copy link
Author

Ah, got it, thank you for the explanation, @Lukasa. I had just quickly skimmed through the source code and because the affected source files were not an actual Swift dependency, I was under the impression the source was belonging to project. Glad to hear this is actively being worked on, though.

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

No branches or pull requests

2 participants