-
Notifications
You must be signed in to change notification settings - Fork 562
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
Build broken by python error in aarch64/codec.py: No attribute 'split' on Tuple #6580
Comments
I've locked the master branch for now to prevent further issues and reduce the amount of churn until the build issues are resolved |
I've had a quick look into this. I would expect this to fail if presented with a tuple, but it seems that the line it's failing on expects a string and would fail if it got a tuple even before the change. I've followed the code through and don't see anything in the patch itself that would cause this to fail as by this point we've re-written the opndsets with the function opndset_naming to remove the lists. I can try to reproduce this if you have the python version you're using and which ref you're trying to build |
Detail:
Tracing back,
This is later flattened in the function Clearly, something is getting past this check but I'm not sure how and the patch mentioned above hasn't changed any of this. |
This is trying to update from 0a6c057 to 3772e01. I only looked at the git blame for the split to identify the supposed culprit: did not do a bisect or look further to see if that PR was just moving stuff around. Looks like this error is actually from a static analyzer on codec.py rather than an actual runtime error: it's pytype https://google.github.io/pytype/ |
That would make sense Codec.py is structured in a way that's hard for static analysers to deal with. There isn't an easy way to restructure the code to remove the variable reuse that's likely causing the static analyser to dislike this. We could selectively type annotate the functions, but I'd be hesitant about that breaking compatibility with older pythons. I'd recommend adding a disabling comment for the checker:
|
We may try to disable this pytype check temporarily to unblock internal and github progress so getting codec.py to not trigger pytype errors can be addressed separately. |
Thanks, that does seem to work. |
Disable a pytype static analysis check on opnd_stem() in aarch64/codec.py as the analysis produces a false positive. Tested on an internal build where pytype is enabled. Fixes #6580
This patch refactors how the script gets hold of the name of generated functions. Previously there was a pass in opndset_naming() that overwrote the value of the opndset attribute. This was causing issues with type checking because this changed the type of an opndset from a tuple or string to always a string which was flagged as an error when .split() was used on it. As part of this change the fall-through code became completely dead code and has been removed. It was obsoleted originally by the addition of + masks for the operands. It was also revealed by this change that several encodings in the codecs were no longer used and represented less correct versions of other encodings. They have been removed. issue: #6580 Change-Id: I36f410e72cb0c3ac93cf6b3dff8e4199b85d688a
I've spent a bit of time refactoring the code to remove the variable reuse and clean up some of the dead code: |
Disable a pytype static analysis check on opnd_stem() in aarch64/codec.py as the analysis produces a false positive. Tested on an internal build where pytype is enabled. Fixes #6580
…ow (#6595) This patch refactors how the script gets hold of the name of generated functions. Previously there was a pass in opndset_naming() that overwrote the value of the opndset attribute. This was causing issues with type checking because this changed the type of an opndset from a tuple or string to always a string which was flagged as an error when .split() was used on it. As part of this change the fall-through code became completely dead code and has been removed. It was obsoleted originally by the addition of + masks for the operands. It was also revealed by this change that several encodings in the codecs were no longer used and represented less correct versions of other encodings. They have been removed. issue: #6580
Our internal build, once past the breakage from #6575, is still broken when trying to pull in the latest Github sources, on this error:
The text was updated successfully, but these errors were encountered: