Skip to content

Replace colon with underscore in caching filePath (and a few other characters) - #6358

Merged
SimplyDanny merged 3 commits into
realm:mainfrom
roman-bcny:remote-path
Nov 27, 2025
Merged

SimplyDanny merged 3 commits into
realm:mainfrom
roman-bcny:remote-path

Conversation

@roman-bcny

Copy link
Copy Markdown
Contributor

Without this we end up with a file name http__:site which doesn't work on Windows and crashes ConfigurationTests.testValidRemoteChildConfig with abort() which fast-exits resulting in partial test results

Subcode: 0x7 FAST_FAIL_FATAL_APP_EXIT 
ucrtbase!abort+0x4e

With this change I'm able to run swift test on Windows to completion (x64 6.2.1):

Test Suite 'All tests' failed at 2025-11-24 18:23:31.026
         Executed 1025 tests, with 91 failures (1 unexpected) in 365.412 (365.412) seconds

cc @compnerd

@compnerd compnerd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ugh, yes, this is horrible character to use in the file path. : serves as the ADS delimiter on Windows and some other file systems also dislike this character I believe.

@SwiftLintBot

SwiftLintBot commented Nov 25, 2025 •

Copy link
Copy Markdown
1 Warning
⚠️ If this is a user-facing change, please include a CHANGELOG entry to credit yourself!
You can find it at CHANGELOG.md.
18 Messages
📖 Building this branch resulted in a binary size of 26775.59 KiB vs 26775.45 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.78 s vs 0.78 s on main (0% slower).
📖 Linting Alamofire with this PR took 1.03 s vs 1.06 s on main (2% faster).
📖 Linting Brave with this PR took 6.81 s vs 6.83 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 21.85 s vs 21.88 s on main (0% faster).
📖 Linting Firefox with this PR took 10.88 s vs 10.9 s on main (0% faster).
📖 Linting Kickstarter with this PR took 7.5 s vs 7.53 s on main (0% faster).
📖 Linting Moya with this PR took 0.44 s vs 0.44 s on main (0% slower).
📖 Linting NetNewsWire with this PR took 2.23 s vs 2.25 s on main (0% faster).
📖 Linting Nimble with this PR took 0.63 s vs 0.65 s on main (3% faster).
📖 Linting PocketCasts with this PR took 7.07 s vs 7.14 s on main (0% faster).
📖 Linting Quick with this PR took 0.42 s vs 0.41 s on main (2% slower).
📖 Linting Realm with this PR took 3.22 s vs 3.27 s on main (1% faster).
📖 Linting Sourcery with this PR took 1.82 s vs 1.75 s on main (4% slower).
📖 Linting Swift with this PR took 4.15 s vs 4.16 s on main (0% faster).
📖 Linting VLC with this PR took 1.1 s vs 1.05 s on main (4% slower).
📖 Linting Wire with this PR took 17.38 s vs 17.4 s on main (0% faster).
📖 Linting WordPress with this PR took 11.32 s vs 11.32 s on main (0% slower).

Here's an example of your CHANGELOG entry:

* Replace colon with underscore in caching filePath.  
  [roman-bcny](https://github.com/roman-bcny)
  [#issue_number](https://github.com/realm/SwiftLint/issues/issue_number)

note: There are two invisible spaces after the entry's text.

Generated by 🚫 Danger

@SimplyDanny SimplyDanny left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There're even more characters allowed in a URL that must not be used in a "universal" file path. I think those are

< > : " / \ | ? *

and trailing dots .. Since we're already on it, we may replace them too.

@roman-bcny roman-bcny changed the title Replace colon with underscore in caching filePath Replace colon with underscore in caching filePath (and a few other characters) Nov 27, 2025
@roman-bcny

Copy link
Copy Markdown
Contributor Author

@SimplyDanny makes sense, updated

@SimplyDanny
SimplyDanny enabled auto-merge (squash) November 27, 2025 19:49
@SimplyDanny
SimplyDanny merged commit 2e92f75 into realm:main Nov 27, 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.

4 participants