Skip to content
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

DirtyField should cause an IDE warning or integration test fail for invalid datafields #5706

Open
slarticodefast opened this issue Feb 26, 2025 · 1 comment · May be fixed by #5713
Open

Comments

@slarticodefast
Copy link
Member

slarticodefast commented Feb 26, 2025

It uses a string to select the field to dirty, so the compiler currently doesn't complain if you got an invalid one, making it easy to miss.
Example space-wizards/space-station-14#35510

You only get an error once that line of code is actually reached:
[ERRO] entity: Tried to dirty delta field NextAttack on AKMS (1549/n1549, WeaponRifleAk) that isn't implemented.

This should maybe also cause a debug assert instead.

@Tayrtahn Maybe you can come up with something.

@Tayrtahn
Copy link
Member

Without diving into the code yet, this does sound like something that an analyzer could handle, but I can't say that for certain. I'll look into it!

@Tayrtahn Tayrtahn linked a pull request Feb 27, 2025 that will close this issue
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 a pull request may close this issue.

2 participants