Indexes 6: Changes version_filter field in index schema#1344
Indexes 6: Changes version_filter field in index schema#1344dcookspi wants to merge 1 commit intoindex-5-repo-cmds-config-and-cli-flagsfrom
version_filter field in index schema#1344Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
83c8d12 to
3dcf4e3
Compare
95154e5 to
6e12345
Compare
crates/spk-proto/schema/spk.fbs
Outdated
| // LessThanOrEqualToRange, LessThanRange, LowestSpecifiedRange, | ||
| // NotEqualsVersion, SemverRange WildCardRange | ||
| version: Version; | ||
| // Used for: Compat, |
There was a problem hiding this comment.
No, I've taken it out.
| let base = fb_rule | ||
| .version() | ||
| .map(|v| fb_version_to_version(v)) | ||
| .expect("A CompatRange should have a version in an index"); |
There was a problem hiding this comment.
It's hurting my brain that the type names mentioned in these expect strings are aligned with the version_range types, but they don't match the VersionRangeOperator enum arm names, and it makes this code look like there's "random" inconsistencies. But now I see they do match the VersionRange enum names.
How about changing the names used in these strings to match the enum names?
There was a problem hiding this comment.
Todo:
- Update the names in the messages to match the enum names
| None | ||
| } else { | ||
| // A version filter is a bunch of version ranges, e.g. | ||
| // [kg/3.10 |
There was a problem hiding this comment.
Do I need to hunt down the PR where this [ came from? 😅
39f3a57 to
50c68f1
Compare
list/table representation instead of a string. The field no longer needs to be parsed when extracted from the index. Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
6e12345 to
c3fb021
Compare
This changes the
version_filterfield in the index schema to a flatbuffers list and table representation, instead of a string. This allows the version filter rules (VersionRange entries) to be extracted from the index without string parsing.The resulting index is slightly larger at 122 MB (see Indexes PR 5: #1340). Index generation time is about the same. But the solve times improve for the larger solves (marked with *):
This is the 6th of the chained PRs for adding indexes to spk solves:
new_unchecked()constructors to spk schema objects #1337spk repo indexsubcommand for index generation and updates #1340