mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:50:14 +01:00
I've refactored the script in order to make it work in more contexts, which is why the delta is lost. I've actually refactored a significant amount with the intent of making the logic easier to understand, because I was also adjusting bits of it. Some key notes: - Removes the multi-pass update that was dealing with unfixed line numbers in explorer (I think the current script should work in one pass) - Fixed explorer to handle multiple line numbers on the same line (turns out we can rely on local format for line numbers). - Using execv instead of imports because making Python imports work in a setup like this feels like it's not worth it; only a nuisance. - Adding __init__.py to satisfy mypy, which otherwise considers the lit_autoupdate.py scripts to be issues. - Using py because I was thinking sh would be more platform-dependent. py should port better to Windows. - Getting rid of [[ID#]] capture groups in the semantics-ir tests because with the autoupdate it's kind of moot (also, hard to autogenerate the pairs without relying on the %### value). Note this does mean tests switch to more of a "make a change, see which tests change" setup. I don't know that that's a _bad_ thing though -- it's pretty much how tests are being written right now, which is why I went down this rabbit hole. It's a nuisance to make a change then _manually_ have to update a bunch of code. My intent is to use this for to convert parse-tree tests to lit, but I wanted to do this with _existing_ tests first as a proof of concept and to make sure there's agreement.
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.