Skip to content

Merge main into 6.2 #510

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

Merged
merged 8 commits into from
Jun 9, 2025
Merged

Merge main into 6.2 #510

merged 8 commits into from
Jun 9, 2025

Conversation

jakepetroules
Copy link
Contributor

No description provided.

jakepetroules and others added 8 commits April 17, 2025 11:39
Because _exit immediately terminates the process, the CloseHandle calls in the defer blocks in the body of the exec function are never called. This leads to the handles leaking on Windows. Move the body of the function into a do block above the _exit call to resolve this.
* Resolves #505 - Fix handling for Windows long paths

PR#369 - #369
Caused the majority of tests on Windows to fail, as normalization of
RelativePath was removed. This change  also removed the call to
'PathAllocCanonicalize' for AbsolutePath which had the long file
flag 'PATHCCH_ALLOW_LONG_PATHS'.

Reintroducing canonicalization of AbsolutePath path representation
to handle long paths.

* Update tests dealing with RelativePath to match implementation.
* Canonicalize the path representation for AbsolutePath which also allows
  for long path '\\?\' prefix addition when path > 260 in length.
* Strip trailing backslash on string representation of AbsolutePath to match
  definition. Only strips for non root paths.
* Add helper functions:
  - removeTrailingBackslash
  - stripPrefix
  - canonicalPathRepresentation
* Add Windows API Error helpers
* Add long path tests into each test case
* Fix up .suffix. '.' has no suffix
* Update copyright dates

* Make PathCchStripPrefix and PathCchRemoveBackslash use temporary buffer.

- Move PathCchStripPrefix and PathCchRemoveBackslash to use a
mutable temporary buffer.
    - Could not use buffer.withMemoryRebound and getCstring() as
      on Windows this seem to produce corrupt data.
- Add more tests for unParsed '\\?\' and device '\\.\' paths
- Remove the PATHCCH_CANONICALIZE_SLASHES flag as it is not
  needed.
- Add Win32Error.swift to CMakeLists
Users should migrate to Swift stdlib `Regex` type instead.
Helps make async client code safer by warning about use of blocking overloads.
…indows platforms

This will now be able to work correctly under FreeBSD, Android, musl, and so on.
@jakepetroules
Copy link
Contributor Author

@swift-ci test

@jakepetroules jakepetroules enabled auto-merge (rebase) June 9, 2025 06:28
@jakepetroules jakepetroules merged commit bd36846 into release/6.2 Jun 9, 2025
3 checks passed
@jakepetroules jakepetroules deleted the merge-6.2 branch June 9, 2025 12:19
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.

4 participants