Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Oct 6, 2025

source_text is not semantically meaningful, and comments is mostly not either. Exclude both from ContentEq comparison for Program.

@github-actions github-actions bot added A-ast Area - AST C-bug Category - Bug labels Oct 6, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review October 6, 2025 08:38
Copilot AI review requested due to automatic review settings October 6, 2025 08:38
Copy link
Contributor

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 excludes the source_text and comments fields from semantic content comparison in the Program struct by adding #[content_eq(skip)] attributes. The change ensures that ContentEq comparisons focus on semantically meaningful AST content rather than incidental metadata like source text and comments.

  • Added #[content_eq(skip)] attributes to exclude non-semantic fields from equality comparison
  • Applied to both source_text and comments fields in the Program struct

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@overlookmotel overlookmotel self-assigned this Oct 6, 2025
@overlookmotel
Copy link
Member Author

Not sure who should review this. I've assigned to myself. If no-one has comments within a day or two, I'll merge it.

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 6, 2025

CodSpeed Performance Report

Merging #14370 will not alter performance

Comparing 10-06-fix_ast_skip_source_text_and_comments_fields_in_contenteq_for_program_ (a86ca0b) with main (4bf6f69)1

Summary

✅ 37 untouched

Footnotes

  1. No successful run was found on main (a86ca0b) during the generation of this report, so 4bf6f69 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Oct 6, 2025
Copy link
Member Author

overlookmotel commented Oct 6, 2025

Merge activity

… `Program` (#14370)

`source_text` is not semantically meaningful, and comments is *mostly* not either. Exclude both from `ContentEq` comparison for `Program`.
@graphite-app graphite-app bot force-pushed the 10-06-fix_ast_skip_source_text_and_comments_fields_in_contenteq_for_program_ branch from 29cd773 to a86ca0b Compare October 6, 2025 17:41
@graphite-app graphite-app bot merged commit a86ca0b into main Oct 6, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 10-06-fix_ast_skip_source_text_and_comments_fields_in_contenteq_for_program_ branch October 6, 2025 17:47
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants