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

Core: clear cached all_state after connect_entrances #4550

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

qwint
Copy link
Collaborator

@qwint qwint commented Jan 24, 2025

What is this fixing or adding?

#4519 revealed that it is possible for one world to create an invalid all state cache and another world using all state cache to use that invalid state
this is one solution of a couple offered to reduce the chances that that could happen

other options include:

  • removing caching from get_all_state altogether (because there's so few timings where it makes sense)
  • making get_all_state(True) check a flag set by Main denoting that a particular step (probably set_rules?) has finished so caching is sensible, and have all calls to get_all_state(True) before that flag is set not save a cache

How was this tested?

reverted the changes to factorio and shivers that got around this problem and seeing that the new code alone also fixes that particular issue

If this makes graphical changes, please attach screenshots.

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jan 24, 2025
@ScipioWright ScipioWright added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jan 25, 2025
@Exempt-Medic
Copy link
Member

Can we alternatively modify the test_all_state_before_connect_entrances test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants