Skip to content

Conversation

@Zandor300
Copy link
Member

Copilot is producing a generated Swift file with a lot of bloat from GYB because of incorrect instructions.

@github-actions
Copy link

1 Warning
⚠️ Plist changed, don't forget to localize your plist values

Generated by 🚫 Danger

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@Zandor300 Zandor300 merged commit 47f838f into master Dec 2, 2025
10 checks passed
@Zandor300 Zandor300 deleted the fix/copilot-gyb-instructions branch December 2, 2025 09:54
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.

2 participants