Skip to content

Commit

Permalink
Fix over-eager caching of Now variable (#191)
Browse files Browse the repository at this point in the history
Closes #185.

I gave a shot at making tests for this, but it's less trivial than it
seems at first glance. I manually confirmed this fixes the bug for now.

To explain what's going on here, you have to recognize that
`newRulesVariable` is used during constraint compilation (for constant
folding) and `newThisVariable` is used during the actual activation. We
don't want `now` to get constant-folded, so we should make sure it is
only defined at evaluation time, not before. I think this was most
likely switched on accident and probably also means that the `now`
variable was not working in custom constraints.
  • Loading branch information
jchadwick-buf authored Oct 3, 2024
1 parent 7345e69 commit 26dfd7f
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 232 deletions.
Loading

0 comments on commit 26dfd7f

Please sign in to comment.