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

Silence duplicate symbol runtime warning #5068

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented Jun 19, 2023

Similar to #4901 but updated with a new warning from Xcode 15 beta 1.

Unfortunately this doesn't appear to work, even with this change the warning is still logged:

objc[18947]: Class _TtC11SwiftParserP33_78149DB072C20084E7D780D86E26C3AF41StringLiteralExpressionIndentationChecker is implemented in both /private/var/tmp/_bazel_jp/d6a0d3abed4579623f79fc46ad4a7a79/execroot/_main/bazel-out/darwin_arm64-opt/bin/swiftlint (0x1059a79a0) and /Applications/Xcode-15.0.0-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/libSwiftParser.dylib (0x10703da50). One of the two will be used. Which one is undefined.

It might have something to do with how long the symbol name is.

Similar to #4901 but updated with a new warning from Xcode 15 beta 1.

Unfortunately this doesn't appear to work, even with this change the
warning is still logged.

It might have something to do with how long the symbol name is.
@jpsim
Copy link
Collaborator Author

jpsim commented Jun 19, 2023

Any thoughts @keith ?

@SwiftLintBot
Copy link

SwiftLintBot commented Jun 19, 2023

17 Messages
📖 Linting Aerial with this PR took 1.12s vs 1.12s on main (0% slower)
📖 Linting Alamofire with this PR took 1.43s vs 1.42s on main (0% slower)
📖 Linting Brave with this PR took 7.98s vs 8.0s on main (0% faster)
📖 Linting DuckDuckGo with this PR took 3.84s vs 3.84s on main (0% slower)
📖 Linting Firefox with this PR took 9.95s vs 9.97s on main (0% faster)
📖 Linting Kickstarter with this PR took 10.39s vs 10.35s on main (0% slower)
📖 Linting Moya with this PR took 0.59s vs 0.58s on main (1% slower)
📖 Linting NetNewsWire with this PR took 3.27s vs 3.26s on main (0% slower)
📖 Linting Nimble with this PR took 0.67s vs 0.66s on main (1% slower)
📖 Linting PocketCasts with this PR took 7.84s vs 7.82s on main (0% slower)
📖 Linting Quick with this PR took 0.35s vs 0.34s on main (2% slower)
📖 Linting Realm with this PR took 11.93s vs 11.92s on main (0% slower)
📖 Linting Sourcery with this PR took 2.3s vs 2.31s on main (0% faster)
📖 Linting Swift with this PR took 5.11s vs 5.1s on main (0% slower)
📖 Linting VLC with this PR took 1.37s vs 1.38s on main (0% faster)
📖 Linting Wire with this PR took 8.53s vs 8.52s on main (0% slower)
📖 Linting WordPress with this PR took 12.08s vs 12.14s on main (0% faster)

Generated by 🚫 Danger

@jpsim jpsim marked this pull request as draft June 19, 2023 18:17
@keith
Copy link
Collaborator

keith commented Jun 20, 2023

Soo, the issue is related to the warning you're disabling. It's actually fixed if you change the name size from 64 to 128 (or probably just anything longer than this string) in objc_dupclass.h. I don't know why that works because it sure seems like dyld expects the strings to only be 64 characters https://github.com/apple-oss-distributions/dyld/blob/c8a445f88f9fc1713db34674e79b00e30723e79d/common/MachOAnalyzer.cpp#L4381 but it seems to so I guess I'd go with that!

@jpsim
Copy link
Collaborator Author

jpsim commented Jun 22, 2023

Thanks for digging into this, @keith. Indeed increasing the max dup class name length appears to resolve the issue with Xcode 15 beta 1 and beta 2.

@jpsim jpsim marked this pull request as ready for review June 22, 2023 14:01
@jpsim jpsim enabled auto-merge (squash) June 22, 2023 14:02
@jpsim jpsim merged commit b69ae7c into main Jun 22, 2023
@jpsim jpsim deleted the silence-duplicate-symbol-runtime-warning branch June 22, 2023 14:14
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.

3 participants