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

Fill: Crash if there are remaining unfilled locations #2830

Merged
merged 12 commits into from
Jan 13, 2025

Conversation

alwaysintreble
Copy link
Collaborator

What is this fixing or adding?

Lots of various bugs that are a bit hard to track down arise from this issue so it's better to just crash loudly with a clear error.

How was this tested?

commented out my filler gen and watched it crash

If this makes graphical changes, please attach screenshots.

@github-actions github-actions bot added waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. affects: core Issues/PRs that touch core and may need additional validation. labels Feb 16, 2024
Copy link
Collaborator

@qwint qwint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recreated the same seed I had recently seen unfilled locations on,
ran with the apworld that allowed unfilled locations, got the Fill error and failed generation
ran with the update to fix the issue on my apworld, generated without issue

@NewSoupVi
Copy link
Member

NewSoupVi commented Feb 16, 2024

I disagree with this

If I'm running an 100 slot async generation, I'd rather have a couple "nothings" than to have to redo the whole thing after an hour. I'm probably just going to revert this on my local installation

Could we have the old behavior as an arg? --loose_generation_requirements or something

@alwaysintreble
Copy link
Collaborator Author

The old behavior is having unfilled locations and causing rom games to crash when they try to get the items in locations or the locations not existing in the multiworld.

@qwint
Copy link
Collaborator

qwint commented Feb 16, 2024

Could add a prompt, instead of the Exception, explicitly informing the person generating of the risks and allowing them to type 'y' if they are willing to proceed, and throwing the Exception if they send anything else.
But also this shouldn't come up often as worlds are expected to submit an equal location/itempool, no?

@Exempt-Medic Exempt-Medic added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Mar 28, 2024
@Exempt-Medic Exempt-Medic added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Apr 8, 2024
@Berserker66 Berserker66 added waiting-on: author Issue/PR is waiting for feedback or changes from its author. and removed waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. labels Apr 14, 2024
@alwaysintreble
Copy link
Collaborator Author

Could add a prompt, instead of the Exception, explicitly informing the person generating of the risks and allowing them to type 'y' if they are willing to proceed, and throwing the Exception if they send anything else. But also this shouldn't come up often as worlds are expected to submit an equal location/itempool, no?

This doesn't make any sense to do. "Would you like to continue?" and then it just crashes due to the aforementioned issues 10 minutes later.

@alwaysintreble alwaysintreble added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: author Issue/PR is waiting for feedback or changes from its author. labels Apr 23, 2024
@Berserker66
Copy link
Member

Idea: How about the above per-player counts gets turned into a differential and then an exception is raised with its info, such as :
"Player wags had 3 more locations than items" (as exception) or "Player Berserker had 4 more items than locations" (as logging.warning)

Copy link
Member

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works and LGTM

Fill.py Outdated Show resolved Hide resolved
@Berserker66
Copy link
Member

I'm fairly sure these if trees could be condensed quite a bit with this little trick:

>>>  collections.Counter({"a": 1, "b": 1})-collections.Counter({"a": 1})
Counter({'b': 1})

Fill.py Outdated Show resolved Hide resolved
Fill.py Outdated Show resolved Hide resolved
Fill.py Outdated Show resolved Hide resolved
@Exempt-Medic Exempt-Medic merged commit f9cc19e into ArchipelagoMW:main Jan 13, 2025
16 checks passed
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: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants