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

Transition away from Foundation.URL #6706

Merged
merged 1 commit into from Jul 18, 2023
Merged

Transition away from Foundation.URL #6706

merged 1 commit into from Jul 18, 2023

Conversation

neonichu
Copy link
Member

@neonichu neonichu commented Jul 13, 2023

The parser of NSURL is changing in macOS Sonoma and will no longer be compatible with the GitHub-style SSH URLs which means we have to transition back to using our own URL type (which is a wrapper of String for now) in order to continue to support SSH URLs.

rdar://112482783

@neonichu neonichu self-assigned this Jul 13, 2023
@neonichu
Copy link
Member Author

Saw a couple test failures locally, so this isn't really ready to land, yet. We will need to cherry-pick this into 5.9 to be compatible with Sonoma there.

I believe older Xcodes are already not supported on Sonoma, which is good, but I wonder whether it is worth having some kind of warning in 5.8 which tells people that it doesn't work on Sonoma if we're shipping more point updates.

@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

"invalid relative path '/-8a5edab2'; relative path should not begin with '/'"

That one looks scary 🤣

@neonichu
Copy link
Member Author

Ah, looks like that is an issue with the basename function I wasn't sure about above.

@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu
Copy link
Member Author

I think the remaining test failure is from me accidentally breaking V1 of fingerprint storage.

@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu neonichu marked this pull request as ready for review July 14, 2023 00:48
@neonichu
Copy link
Member Author

neonichu commented Jul 14, 2023

I think this should be working now, so it can come out of draft.

Note that I haven't tested this on Sonoma yet, it is just based on code inspection to identify APIs that need to change, there might be more required here.

@neonichu
Copy link
Member Author

Looks like the CMake build is broken, I think I forgot to add the new file there.

@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

Sources/Basics/GitURL.swift Outdated Show resolved Hide resolved
Sources/Basics/GitURL.swift Outdated Show resolved Hide resolved
Sources/Basics/GitURL.swift Outdated Show resolved Hide resolved
Copy link
Member

@tomerd tomerd left a comment

Choose a reason for hiding this comment

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

some small comments / ideas

@neonichu neonichu changed the title WIP: Transition away from Foundation.URL Transition away from Foundation.URL Jul 15, 2023
@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu
Copy link
Member Author

Had to switch over some more APIs to make the tests actually pass on Sonoma.

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu neonichu force-pushed the no-foundation-url branch 2 times, most recently from 28055d2 to 930c0d2 Compare July 18, 2023 18:33
@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

2 similar comments
@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu
Copy link
Member Author

No Windows CI right now, I guess...

@neonichu neonichu enabled auto-merge (squash) July 18, 2023 18:34
@neonichu
Copy link
Member Author

CMake Error at Sources/Basics/CMakeLists.txt:9 (add_library):
  Cannot find source file:

    SourceControlURL.swift

I changed the CMake config, but didn't actually rename the file 😅

The parser of `NSURL` is changing in macOS Sonoma and will no longer be compatible with the GitHub-style SSH URLs which means we have to transition back to using our own URL type (which is a wrapper of `String` for now) in order to continue to support SSH URLs.

rdar://112482783
@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please smoke test windows

@neonichu neonichu merged commit 068fa49 into main Jul 18, 2023
5 checks passed
@neonichu neonichu deleted the no-foundation-url branch July 18, 2023 22:09
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