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

Support Swift 6 language mode and Swift Syntax 600.0.0 #98

Merged
merged 13 commits into from
Jun 19, 2024

Conversation

liamnichols
Copy link
Owner

@liamnichols liamnichols commented Jun 15, 2024

Whitespace between @available and the opening ( causes a compile failure in Swift 6. It was found in the generated code due to how Swift Syntax 5XX.X.X would format the output.

This Pull Request does the following:

  • Patches the generated code with a simple regex find and replace
  • Updates the Package.swift to support Swift Syntax 600.0.0 once it is released
  • Adds CI checks to run against each major Swift Syntax version
  • Removes the regex workaround when using Swift Syntax 600.0.0 since the formatter in this version fixes the original whitespace issue
  • Fix some deprecation warnings and removes other workarounds when using Swift Syntax 600.0.0

Copy link

github-actions bot commented Jun 15, 2024

✅ Pull Request passed benchmark checks

Summary

Wed Jun 19 10:57:59 UTC 2024

===========================================================================================================
Threshold deviations for StringGenerator.generateSource(for:tableName:accessLevel:):XCStringsToolBenchmarks
===========================================================================================================
Time (total CPU) (ms, %) main pull_request Difference % Threshold %
p25 750 965 28 5
p50 750 965 28 5
p75 793 967 22 5

New baseline 'pull_request' is WORSE than the 'main' baseline thresholds.


Comparing results between 'main' and 'pull_request'

Host 'Mac-1718792565479.local' with 3 'arm64' processors with 7 GB memory, running:
Darwin Kernel Version 23.5.0: Wed May  1 20:12:39 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_VMAPPLE

XCStringsToolBenchmarks

StringGenerator.generateSource(for:tableName:accessLevel:) metrics

Time (total CPU) (ms) * p0 p25 p50 p75 p90 p99 p100 Samples
main 750 750 750 793 793 793 793 2
pull_request 965 965 965 967 967 967 967 2
Δ 215 215 215 174 174 174 174 0
Improvement % -29 -29 -29 -22 -22 -22 -22 0

@liamnichols
Copy link
Owner Author

Oh, need to account for #available too

@liamnichols liamnichols changed the title Fix issues causing compile failures in Swift 6 language mode Support Swift 6 language mode and Swift Syntax 600.0.0 Jun 19, 2024
@liamnichols liamnichols marked this pull request as ready for review June 19, 2024 10:44
@liamnichols liamnichols merged commit 991b0d7 into main Jun 19, 2024
11 checks passed
@liamnichols liamnichols deleted the ln/swift-6-compatibility branch June 19, 2024 12:12
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.

Generated @available has trailing whitespace
1 participant