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

add SKIP_VERIFICATION option and --noverify cli flag #71645

Merged
merged 5 commits into from
Feb 10, 2024

Conversation

nornagon
Copy link
Contributor

@nornagon nornagon commented Feb 9, 2024

Summary

None

Purpose of change

While developing, it's common for me to relaunch the game frequently to test
C++ changes. The verification step takes quite a long time, and especially for
UI changes, is wasted time—it's testing the same thing every time.

Describe the solution

Add an option to turn this off, as well as a CLI flag to skip it for ease of
access when developing.

Describe alternatives you've considered

Perhaps this should be a CLI flag only? The option was the easiest way I could
find to plumb the bool from the CLI to the init code, but it wouldn't be too
hard to add a global or some other plumbing instead.

Or, the verification step should only run if some input to it has changed (e.g.
if the flatbuffer cache was updated).

Testing

Additional context

@github-actions github-actions bot added the [C++] Changes (can be) made in C++. Previously named `Code` label Feb 9, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 9, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 9, 2024
Copy link
Contributor

github-actions bot commented Feb 9, 2024

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • If enabled, this skips the JSON verification step during loading. This may give a faster loading time, but risks JSON errors not being caught until runtime.

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

@ZhilkinSerg
Copy link
Contributor

Need to make sure that no consistency check function does anything with the objects that normally should go to finalize function.

@github-actions github-actions bot added Map / Mapgen Overmap, Mapgen, Map extras, Map display Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Feb 9, 2024
@github-actions github-actions bot added Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies Scenarios New Scenarios, balancing, bugs with scenarios labels Feb 9, 2024
@nornagon
Copy link
Contributor Author

nornagon commented Feb 9, 2024

Need to make sure that no consistency check function does anything with the objects that normally should go to finalize function.

I checked through every function in check_consistency. Almost all of them are const and/or call const functions or use const iterators. So we're at least moderately safe :D

I fixed a few that didn't const, and a couple of things were actually doing mutations in check_consistency—specifically, a couple of values in emits were being clamped if out of range, and a scenario allowlist was derived. I moved both of those to the finalize step.

@Maleclypse Maleclypse merged commit 3230213 into CleverRaven:master Feb 10, 2024
26 checks passed
@nornagon nornagon deleted the noverify-option branch February 10, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mutations / Traits / Professions/ Hobbies Mutations / Traits / Professions/ Hobbies Scenarios New Scenarios, balancing, bugs with scenarios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants