mozilla / mentat

UNMAINTAINED A persistent, relational store inspired by Datomic and DataScript.
https://mozilla.github.io/mentat/
Apache License 2.0
1.65k stars 115 forks source link

[tx] Don't parse EDN to construct bootstrap schema during bootstrap phase #193

Open ncalexan opened 7 years ago

ncalexan commented 7 years ago

In #170, I got frustrated defining static structures in Rust and lazily parsed some EDN to represent symbolic schemas. We then turn around and transform the parsed structures into simpler triples to iterate over. This is all around the bootstrap V2_SYMBOLIC_SCHEMA code.

This ticket tracks defining a nested [(IDENT, [(ATTRIBUTE, VALUE), ...]), ...] structure in Rust directly, and avoiding using the EDN parser (and potentially even Value for the ident, attribute, and tree structure parts) during bootstrap.

This is a reasonable [good first bug].

rnewman commented 7 years ago

Somewhere I thought I filed an issue about parsing queries at compile time.

It's hard without const fn and perhaps some other support, but eventually there's no reason why a static EDN tree can't be parsed at compile time, all the way through to an abstract transact input or an abstract query.

Obviously we can also define a bunch of macros (or do it manually) to define the intermediate structures programmatically, which I guess is this ticket :)