-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Shorten #file and add #filePath (behind an experimental flag) #25656
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
Conversation
@swift-ci please benchmark |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Okay, "up to 6% code size" is probably a fair summary of that. Let's try compiler performance and look at number of bytes output as a rough proxy for code size of the source compatibility suite. @swift-ci please test compiler performance |
3641b30
to
8dc50eb
Compare
@swift-ci please smoke test |
@swift-ci please benchmark |
@swift-ci please test compiler performance |
macOS test failures are examples of the feature working correctly, but affecting tests I didn't update. I'm not sure why they didn't run locally. 🤷♂️ |
Performance: -O
Code size: -O
Performance: -Osize
Code size: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Summary for master fullUnexpected test results, excluded stats for RxCocoa, Base64CoderSwiftUI, SwifterSwift Regressions found (see below) Debug-batchdebug-batch briefRegressed (0)
Improved (1)
Unchanged (delta < 1.0% or delta < 100.0ms) (2)
debug-batch detailedRegressed (3)
Improved (5)
Unchanged (delta < 1.0% or delta < 100.0ms) (194)
Releaserelease briefRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (3)
release detailedRegressed (0)
Improved (0)
Unchanged (delta < 1.0% or delta < 100.0ms) (18)
|
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please smoke test |
aad3f02
to
c3ab35b
Compare
@swift-ci please test |
Build failed |
Build failed |
The test failure is because I need to re-gyb SwiftSyntax files. |
c3ab35b
to
d96ff67
Compare
This change may have significant code size benefits.
Along with a not-yet-usable way to get back to the old behavior.
This makes the path behavior more first-class. The feature is now hidden behind an experimental flag, -enable-experimental-concise-pound-file.
d96ff67
to
63ec1cf
Compare
@swift-ci please test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Build failed |
@swift-ci please clean test |
SwiftSyntax update for "Shorten #file and add #filePath (behind an experimental flag)" (swiftlang/swift#25656)
Be more lenient about the path separator. This repairs the tests on Windows after swiftlang#25656.
#file
includes an entire gigantic path whenever it is used, and it is often used implicitly. This has two negative effects: It wastes space on something that is almost never needed and it invisibly embeds information in the binary, such as the developer's username, that they may want to keep private.This PR changes the behavior of
#file
so that it evaluates to a short string containing the module name and filename, but not the full path. It also adds#filePath
, which continues to give you the absolute path.These changes are hidden behind a feature flag,
-enable-experimental-concise-pound-file
, because making them permanent will require an evolution proposal.This change includes some basic tests with the flag enabled, but they're not comprehensive; for instance, code completion isn't tested anywhere. The implementation for the proposal should update existing
#file
tests and add matching#filePath
tests to ensure adequate coverage.Progresses towards fixing rdar://problem/56816166.