You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facts are stored as a HashMap internally, so their order is not defined.
The Display impl for Authorizer does sort everything, so it has a stable output. It also adds more information in comments (namely the facts and rules origins, which is extremely important).
I guess we could just call .to_string() in dump_code() to keep backwards compatibility. However, the Display implementation for Authorizer only uses facts and rules from the Datalog::World value, so it may discard facts and rules added to the authorizer before calling authorize. I guess that overlaps with #192
The text was updated successfully, but these errors were encountered:
Fixed by #250
The most reasonable approach was to call .to_string() before sorting, because making an Ord implementation for Fact implied messing with parameters
Facts are stored as a
HashMap
internally, so their order is not defined.The
Display
impl forAuthorizer
does sort everything, so it has a stable output. It also adds more information in comments (namely the facts and rules origins, which is extremely important).I guess we could just call
.to_string()
indump_code()
to keep backwards compatibility. However, theDisplay
implementation forAuthorizer
only uses facts and rules from theDatalog::World
value, so it may discard facts and rules added to the authorizer before callingauthorize
. I guess that overlaps with #192The text was updated successfully, but these errors were encountered: