-
Notifications
You must be signed in to change notification settings - Fork 335
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
Banned Procedures for making changes (Baking Unitdefs) #4172
base: master
Are you sure you want to change the base?
Conversation
@sprunk @WatchTheFort for your awareness i cannot assign reviewers |
lmao I thought you were going to delete the def baking code, and wanted Sprung to review that |
At a basic level I agree but I don't have that much of a stake here, so just for completeness I'll list both the upsides and the downsides so that the actual decision makers (perhaps even admins rather than WtF? They all touch defs relatively a lot) can make a more informed decision. Note that by "baking" I mean using the baking script included with BAR which is a much more limited definition than the general definition of moving stuff from postprocessing to raw files (which is fine and often desirable if it's targeted and doesn't involve plowing through and upheaving the whole file and unrelated values). The good things about baking:
And the reasons to remove:
|
TBH, I thought i was clear about the PR guidelines being the target of the PR as the process to ban something like unitdef baking has to be done at this level. I would rather stop behavoir from continueing rather than deleting already merged code and asking people to redo work, as doing that would mean that people would be doubly affected by merge conflicts.
We also lose the where aspect for a number of tags when comments stating where they are defined are lost. |
For sure it can be done, baking is not bad per-se, but the baking code should be careful to not touch anything it doesn't need to change. ie, don't change capitalization, don't reorganize things, generally don't affect any lines not really needed to be changed. Anyways I understand for some use cases it can be almost impossible without some automatization/baking, whoever needs that can ping me and we can find a better way. |
By definition, baked defs are reformatted because they didn't adhere to a consistent format. Exception: comments |
Seth has a good point. The wording of the rule should say something like "mass formatters" instead of "baking". |
If we're going to say, "Don't use this single-purpose tool for the single purpose it was created for," then we should just delete the tool. |
I'll update that then btw everything you list here under I view it as reasons to not use for now until these listed reasons have answers to resolve why the baking is bad.
Ultimately the issue is that the tool is desctructive to unitdefs, the issues that are being raised are, to my knowledge, resolvable to a degree. |
Don't think that's necessarily the definition of baked defs... You can bake without reformatting (just not with that tool). |
I wouldn't delete it yet, because it can be used as a step for a tool that merges changes without modifying uneeded lines, or it could have other uses, like to see what gets modified through some code. Maybe simply add warning to the tool saying don't blindly copy the results into units/... etc? |
Is this not already covered under
|
this is to cover a means of creating change |
here is the tool (well for now its more a script), https://github.com/saurtron/bar-unitbaker still need a bit of work to make it more usable and add a couple missing features, but that's the idea I had when I said that, merges changes from the bar unitbaker back into the units/ folder in a clean way. |
This is silly, you often can't even tell if a PR was made by baking or by other means. Just judge a PR on its merits. |
Work done
Unitdef baking creates significant burdens on everyone else who has open/draft PRs.
Unitdef baking has created issues where PRs have had to be fully redone due to someone using Unitdef baking to make changes.
See #3818 where this matter made significant headache causing Kroyla to kill and open a new PR.
Unitdef baking also kills all comments in Unitdefs.
I do believe it is possible to do unitdef baking while retaining comments but im not sure.
all cases of Unitdef baking that I have seen have resulted in comments being deleted.