Skip to content

Make yaml files more similar to semiwrap create-yaml outputs #187

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

Open
wants to merge 5 commits into
base: 2027
Choose a base branch
from

Conversation

pjreiniger
Copy link

I was trying to clean up the warnings about functions not being defined in the yaml files and noticed there were a lot of functions / attributes that had been deleted. So I ran the equivalent of semiwrap create-yaml with my bazel setup, and got a tremendously large diff because the yaml files have hand edited components.

This is part 1 of cleaning them up. Overwhelmingly the biggest changes that create-yaml introduces are the --- at the top of the file, and preferring "" vs ''. I also included the reordering of fields if it was just a handful, I'm assuming the tool is deterministic and will spit out the same results.

Part 2 will include the deletion of unused stuff and addition of new stuff. I wanted to break out this PR because it should be a quick and easy one to review despite its length, then the follow up can be looked at more deeply to make sure nothing is getting deleted that shouldn't.

@virtuald
Copy link
Member

So... a lot of those changes were made in the semiwrap migration (see commits such as https://github.com/robotpy/mostrobotpy/commit/2494329eb79b7aa568c4f11f4c905cf8c56e393c#diff-6e6228da5451e5083eb717cc[…]c425dfd083eb4aa9a37bda6a7ba9e) when I edited everything en masse via ruyaml.

Probably it would be better for semiwrap to generate output that's similar to that instead of the other way around. Eventually, I'd like to have create-gen to modify yaml files to insert new content, which would require using ruyaml because it keeps comments.

I'm looking for the edit script that I created, I thought I posted it somewhere. I can find it on my other computer later if you're interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants