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
Output generated conversion functions/names #7644
Conversation
@wojtek-t PTAL |
@pmorie FYI |
ioutil.WriteFile(namesTxt, generatedNames.Bytes(), os.FileMode(0644)) | ||
|
||
compareBuffers(t, functionsTxt, existingFunctions, generatedFunctions) | ||
compareBuffers(t, namesTxt, existingNames, generatedNames) |
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.
should probably clean up the files for a successful run (or maybe always). If not, maybe add them to a gitignore
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.
derp, the files are meant to be used. Disregard...failed to comprehend.
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.
But perhaps clean up in the success case still since they're only meant to be used in the failure case
One of the things I struggled with recently was that the generator output didn't tell me all of the things it failed to generate based on an api change I made (removing an field from internal but leaving it in the v1beta* apis). It was on Container so pretty much everything that had a container didn't generate. Maybe we can use a technique like this to give some output in the conversion utility for reference. |
Cleaned up files if there were no problems |
LGTM |
Output generated conversion functions/names
This outputs the generated functions/names to files so that people who hit test failures related to needing to regenerate conversion functions already have them generated