Skip to content

Conversation

@bkolb
Copy link

@bkolb bkolb commented Feb 6, 2025

In a recent change, swift changed the way a hash is calculated. https://github.com/swiftlang/llvm-project/pull/9140/files#diff-dcdee0465a74e090b01bd5bd0d214f65f430f25a56b837ab627966318de1ff27R289

This change replicates this change.

Issue: #120

@bkolb bkolb requested a review from keith as a code owner February 6, 2025 15:00
@bkolb
Copy link
Author

bkolb commented Feb 6, 2025

I used this tag to build swift: swift-DEVELOPMENT-SNAPSHOT-2025-01-10-a and tested with this. it seems to work.

In a recent change, swift changed the way a hash is calculated.
https://github.com/swiftlang/llvm-project/pull/9140/files#diff-dcdee0465a74e090b01bd5bd0d214f65f430f25a56b837ab627966318de1ff27R289

This change replicates this change.

Issue: MobileNativeFoundation#120
Signed-off-by: Bernd Kolb <b_kolb@apple.com>
@keith
Copy link
Member

keith commented Feb 14, 2025

thanks for submitting this! do we have to worry about backwards compat here?

can you rebase and fix the DCO?

@luispadron
Copy link
Contributor

luispadron commented Apr 1, 2025

To make this backwards compatible, should index-import have a flag/arg to determine which hash algorithm to use?

@keith
Copy link
Member

keith commented Apr 1, 2025

I think defaulting to this new behavior, and adding a flag for the legacy behavior, is probably fine

@luispadron
Copy link
Contributor

luispadron commented Apr 1, 2025

@keith makes sense, i can add that if @bkolb cant get to it. Did we confirm this fixes issues though? I tested with a local build based off this branch using the release instructions but i was still seeing issues in Xcode 16.3:

/private/var/tmp/_bazel_lpadron/9ae9416857eb79bb978de35a53d54970/rules_xcodeproj.noindex/build_output_base/execroot/_main/bazel-out/_global_index_store/v5/units/UnsafeMutableBufferPointer+SE-0370.swift.o-1AIWS878QEG6M -- Failed opening
 '/private/var/tmp/_bazel_lpadron/9ae9416857eb79bb978de35a53d54970/rules_xcodeproj.noindex/build_output_base/execroot/_main/bazel-out/_global_index_store/v5/units/UnsafeMutableBufferPointer+SE-0370.swift.o-1AIWS878QEG6M': No such file or directory

More info in: MobileNativeFoundation/rules_xcodeproj#3160

@keith
Copy link
Member

keith commented Apr 1, 2025

i haven't tested e2e, what has is it producing instead for this object?

@luispadron
Copy link
Contributor

luispadron commented Apr 1, 2025

edited -- this was a mistake on my part i had not tested it e2e, forgot rules_swift also needs this patch

@luispadron
Copy link
Contributor

Tested (correctly this time) end-to-end and this is working now in Xcode 16.3 & macOS 15.4 👍🏼

@luispadron
Copy link
Contributor

@keith I have some commits to fix-up (once im done testing) but i added a flag over in: #131 and the hash change. We can close this in favor of that PR

@keith keith closed this Apr 1, 2025
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