Copilot: Fix GYB generation instructions.#475
Merged
Conversation
Generated by 🚫 Danger |
There was a problem hiding this comment.
Pull request overview
This PR fixes the GYB code generation instructions used by GitHub Copilot. The old command python3 Utils/gyb.py ... > Source/Device.generated.swift was generating output with unwanted line directive comments (bloat). The new command ./Utils/gyb --line-directive '' -o ./Source/Device.generated.swift ./Source/Device.swift.gyb explicitly suppresses these directives using the --line-directive '' flag, producing cleaner generated Swift code.
Key Changes
- Updated GYB generation command from Python direct invocation to using the gyb wrapper executable
- Added
--line-directive ''flag to suppress line directive comments that were causing bloat - Changed output method from shell redirection (
>) to explicit output flag (-o)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copilot is producing a generated Swift file with a lot of bloat from GYB because of incorrect instructions.