postprocess: Add TrimTransform and enable postprocessing for lua#1849
postprocess: Add TrimTransform and enable postprocessing for lua#1849thedataking wants to merge 3 commits into
TrimTransform and enable postprocessing for lua#1849Conversation
TrimTransform and enable postprocessing for lua
c012824 to
b35967c
Compare
|
Interesting failure I observed: Using Root cause: The broken block is in Potential solution:
|
b35967c to
f4f226d
Compare
9d8d679 to
9a5f17f
Compare
The C declarations can contain preprocessor definitions with their own associated comments. Sometimes we also get license headers and similar front matter. Use a separate transformation to remove this front matter such that validation of comment insertion only take the relevant comments into account. Note: the trim step is currently tightly integrated into the comment transfer step but I expect we'll want to run it before other transforms as well. This can be handled in a follow-up change.
f4f226d to
7df7773
Compare
Crocodoctopus
left a comment
There was a problem hiding this comment.
Looks generally good, but I want to mention two concerns, mostly related to prompting:
I tested TrimTransform on json-c and it was very optimistic with the trim, with many false positives (probably 80% of comments). Double check if this is or isn't the case for lua.
Also on json-c, large functions can cause TrimTransform to fail in very unpredictable ways. I've caught TrimTransform refactoring entire functions. Even with prompt changes, this issue can persists.
json-c is outside the scope of this PR, so I wont block this on that front.
This is a problem, this PR shouldn't regress json-c. Did you see the false positives with gemini-3.1-flash-lite or gemini-3.5-flash or something else? |
|
gemini-3.1-flash-lite, gpt-5.5, and gpt-5.1 had this behavior. I haven't tried 3.5-flash. Edit: Upon testing with 3.5-flash it looks correct. |
No description provided.