-
Notifications
You must be signed in to change notification settings - Fork 440
Remove line directives from generated files. #7
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
These just add noise in the generated files and contain absolute file paths on whosever filesystem the files were generated, so they aren't terribly useful.
They're not so useful for the snapshots, but they would be useful when working locally, no? |
I'll defer to those with far more GYB experience than I have 🙂 I'm happy to add a new command line flag that preserves them for local development but leaves them out by default for snapshots, or vice versa. |
If you use the line-directive script to run swift, it will use these line directives to repaint the error messages to point into the original .gyb source. That's what they're there for. Typically it's not very useful to look at the generated files.
… On Sep 7, 2018, at 1:14 AM, Tony Allevato ***@***.***> wrote:
These just add noise in the generated files and contain absolute file
paths on whosever filesystem the files were generated, so they aren't
terribly useful.
You can view, comment on, or merge this pull request online at:
#7 <#7>
Commit Summary
Remove line directives from generated files.
File Changes
M build-script.py <https://github.com/apple/swift-syntax/pull/7/files#diff-0> (3)
Patch Links:
https://github.com/apple/swift-syntax/pull/7.patch <https://github.com/apple/swift-syntax/pull/7.patch>
https://github.com/apple/swift-syntax/pull/7.diff <https://github.com/apple/swift-syntax/pull/7.diff>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#7>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AACsIY3cJ3xNvHTnWtdMq5TwVCxoXf9Kks5uYirugaJpZM4WeYWl>.
|
I agree that the experience of looking at the gyb-soucre is not terribly enlightening because the generation logic is oft too complex to grasp instantly while the generated source is. Still, taking the option away entirely seems like a regression. I would suggest not generating the line directives by default (which will also stop them from showing up in the generated snapshots) but adding an option like |
An option sounds good to me. I've named it |
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 now
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
@swift-ci 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!
Remove line directives from generated files.
[4.2] Merge pull request #7 from allevato/remove-line-directives
# This is the 1st commit message: fixed testAvailabilityQuery34 and testAvailabilityQueryUnavailability28 # This is the commit message swiftlang#2: Update Sources/SwiftParserDiagnostics/ParseDiagnosticsGenerator.swift Co-authored-by: Kim de Vos <[email protected]> # This is the commit message swiftlang#3: added fixedSource in test case # This is the commit message swiftlang#4: minor changes # This is the commit message swiftlang#5: implemented recovery inside the parser # This is the commit message swiftlang#6: runned format.py # This is the commit message swiftlang#7: minor changes # This is the commit message swiftlang#8: minor changes
[Gardening] Rename fill(_:into:) to fill(parseResult:into:)
These just add noise in the generated files and contain absolute file
paths on whosever filesystem the files were generated, so they aren't
terribly useful.