Repository navigation
Skip generating generic unit parsing tables - #5563
Conversation
…r than generating and overwriting them.
|
This seems like a good change, but I've never really understood those tables. cc @mdboom in case he can still comment... |
|
Am I understanding right that this happens only when running the tests, @bsipocz, not in a normal runtime situation? |
|
@eteq - Actually I haven't tested what it does for |
|
@eteq - Yes, it does happen for |
|
This is still most confusing. I also noticed your change here essentially reverts changes made in #4003. It would be good to understand why the lexer thinks it has to regenerate the file (on python2, but not 3). |
|
@mhvk - Yes, I mentioned the revert in the description. The more puzzling question why the lexer of the previous version was happy with the file even though that also went through the cleanup script. Someone who knows the building procedure may be able to answer these. |
|
I can confirm now that this fixes things. But it's a but concerning we don't understand why. I think the best thing is to merge this now and figure out the underlying cause later - will make a separate issue for that. |
Skip generating generic unit parsing tables
|
backported to v1.3.x in 1374036 |
Upgrading the external PLY package to version 3.9 somehow broke the parsing table parsing. Running the tests with python2 now always overwrites the existing tables (as pointed out here #5526 (comment)). The tables in master were generated and then treated by clean_parse_tables.py at the time of the PLY upgrade.
There are 4 sets of these parsing tables, but it only effects
units.format.generic, as it's somehow accessed early during the setup process (?). I couldn't pin point the exact location, but braking the_parse()classmethod gives the following traceback below.Anyhow, since none of the code in this traceback found to be changed recently, my workaround to fix this asap would be to revert the removal of the try/except from 9ee8d3c only for this file only (as the 3 others are still working as expected).
cc @taldcroft and @mhvk