-
Notifications
You must be signed in to change notification settings - Fork 73
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
misc: Fix the way --split-input-file is handled #2820
Conversation
// CHECK: // ----- | ||
|
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.
We can now CHECK
for these markers!
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.
Yes, this annoyed me so many times 🤩
Why the modulo whitespace btw? Unless clear reason (or over complex implementation), I would also not split if preceding whitespace
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2820 +/- ##
==========================================
+ Coverage 89.85% 89.91% +0.05%
==========================================
Files 399 400 +1
Lines 50179 50313 +134
Branches 7755 7776 +21
==========================================
+ Hits 45088 45238 +150
+ Misses 3860 3847 -13
+ Partials 1231 1228 -3 ☔ View full report in Codecov by Sentry. |
How do we handle this for non- |
I found a bunch of tests that had indented splits, and I found that it's quite irritating to debug why the file wasn't split at a certain point if the split is indented by a single whitespace^^ Also, MLIR also allows indented splits, so yeah. |
Seems weird that the tests pass... But good point! Looking at MLIR, it just splits on any line containing |
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.
fantastic
To me we should copy that yes, but what's currently implemented then? I thought it was already that |
We currently split on I fixed it to eat the whole line. |
Wait, I was wrong. Current behaviour mimics MLIRs, so we are good! |
Make
--split-input-file
only split on// -----
if it's the first thing on a line (modulo whitespace)