TacticalMetaphysics / LiSE

Rules-based engine for life sims, with time travel
GNU Affero General Public License v3.0
116 stars 9 forks source link

Places sometimes cached as things #44

Closed clayote closed 7 years ago

clayote commented 7 years ago

This is a bug in the newschema branch. It's almost ready to be merged, but when there's some history already recorded and you contradict it by moving a thing from one place to another, you get a HistoryError followed by an AssertionError in the cache validation method. The correct behavior is to switch to a new branch and apply the change to it.

The cache is being set correctly at that moment, but when it tries to validate, it thinks the "known good" set of things contains places as well, suggesting that places got put in the thing cache at some point.

clayote commented 7 years ago

This turned out to be an issue with a SQL query that would load things' location info in an order inappropriate to the way it was to be cached.