-
Notifications
You must be signed in to change notification settings - Fork 32
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
disambiguate empty sets from empty maps #252
Conversation
according to the grammar, `{}` could either mean *empty set* or *empty map*. Due to how the parser was written, it was always an empty set, and there was no way to have an empty map literal. This is an issue because empty maps would still be displayed as `{}`, and maps have a different api than sets, resulting in evaluation errors. This commit introduces `{,}` as the empty set literal, while `{}` is the empty map. The goal here is to be consistent with JSON, the reason why we chose the current syntax for arrays and maps.
CodSpeed Performance ReportMerging #252 will not alter performanceComparing Summary
|
3accb7a
to
022120c
Compare
5a2a5fb
to
3cceb75
Compare
3cceb75
to
cd5d154
Compare
coverage is OK, with tarpaulin run locally: 66.12% coverage, 5033/7612 lines covered, +0.54% change in coverage i haven’t found the reason why tarpaulin fails in CI |
biscuit-auth/src/datalog/mod.rs
Outdated
#[cfg(test)] | ||
const DEFAULT_DURATION_MILLIS: u64 = 1; | ||
#[cfg(not(test))] | ||
const DEFAULT_DURATION_MILLIS: u64 = 10_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't they be reversed? The longer one in tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(i had removed the commit anyway but i’ll give another try)
according to the grammar,
{}
could either mean empty set or empty map. Due to how the parser was written, it was always an empty set, and there was no way to have an empty map literal.This is an issue because empty maps would still be displayed as
{}
, and maps have a different api than sets, resulting in evaluation errors.This commit introduces
{,}
as the empty set literal, while{}
is the empty map. The goal here is to be consistent with JSON, the reason why we chose the current syntax for arrays and maps.