Compare commits

..

6 commits

Author SHA1 Message Date
Schrottkatze b8720b2df9
pawarser, json-pawarser: get first debug print working! 2024-10-21 18:29:46 +02:00
Schrottkatze af6886214b
flake.lock: Update 2024-10-21 15:31:08 +02:00
Schrottkatze ac75978c01
pawarser: Implement Parser::finish 2024-10-21 15:16:36 +02:00
Schrottkatze 9b1f6a1dc1
pawarser: Implement CompletedMarker::precede 2024-10-21 15:15:40 +02:00
Schrottkatze fed8cf2466
pawarser: require/derive PartialEq + Eq for NodeKind and its contents 2024-10-21 15:15:06 +02:00
Schrottkatze 91f766c18e
pawarser: make raw_tokens vec owned in input 2024-10-21 15:13:38 +02:00
11 changed files with 523 additions and 222 deletions

View file

@ -4,8 +4,8 @@ use crate::{syntax_error::SyntaxError, syntax_kind::SyntaxKind};
use self::object::object; use self::object::object;
type Parser<'src, 'toks> = pawarser::Parser<'src, 'toks, SyntaxKind, SyntaxError>; pub(crate) type Parser<'src> = pawarser::Parser<'src, SyntaxKind, SyntaxError>;
type CompletedMarker = pawarser::CompletedMarker<SyntaxKind, SyntaxError>; pub(crate) type CompletedMarker = pawarser::CompletedMarker<SyntaxKind, SyntaxError>;
const BASIC_VALUE_TOKENS: EnumSet<SyntaxKind> = const BASIC_VALUE_TOKENS: EnumSet<SyntaxKind> =
enum_set!(SyntaxKind::BOOL | SyntaxKind::NULL | SyntaxKind::NUMBER | SyntaxKind::STRING); enum_set!(SyntaxKind::BOOL | SyntaxKind::NULL | SyntaxKind::NUMBER | SyntaxKind::STRING);
@ -27,12 +27,15 @@ mod object {
pub(super) fn object(p: &mut Parser) -> Option<CompletedMarker> { pub(super) fn object(p: &mut Parser) -> Option<CompletedMarker> {
let obj_start = p.start("object"); let obj_start = p.start("object");
if !p.at(SyntaxKind::BRACE_OPEN) { if !p.eat(SyntaxKind::BRACE_OPEN) {
obj_start.abandon(p); obj_start.abandon(p);
return None; return None;
} }
todo!() member(p);
p.eat(SyntaxKind::BRACE_CLOSE);
Some(obj_start.complete(p, SyntaxKind::OBJECT))
} }
fn member(p: &mut Parser) -> Option<CompletedMarker> { fn member(p: &mut Parser) -> Option<CompletedMarker> {
@ -46,7 +49,7 @@ mod object {
p.eat(SyntaxKind::STRING); p.eat(SyntaxKind::STRING);
member_name_start.complete(p, SyntaxKind::MEMBER_NAME); member_name_start.complete(p, SyntaxKind::MEMBER_NAME);
} else { } else {
return todo!("handle other tokens"); return todo!("handle other tokens: {:?}", p.current());
} }
if !p.eat(SyntaxKind::COLON) { if !p.eat(SyntaxKind::COLON) {

View file

@ -1,3 +1,29 @@
mod grammar; mod grammar;
mod syntax_error; mod syntax_error;
mod syntax_kind; mod syntax_kind;
#[cfg(test)]
mod test {
use pawarser::parser::ParserBuilder;
use crate::{
grammar::{value, Parser},
syntax_kind::{lex, SyntaxKind},
};
#[test]
fn test() {
const TEST_DATA: &str = r#"{"hello_world": "meow"}"#;
let toks = lex(TEST_DATA);
let mut p: Parser = ParserBuilder::new(toks)
.add_meaningless(SyntaxKind::WHITESPACE)
.add_meaningless(SyntaxKind::NEWLINE)
.build();
value(&mut p);
let out = p.finish();
assert_eq!("", format!("{:#?}", out))
}
}

View file

@ -1,6 +1,6 @@
use crate::syntax_kind::SyntaxKind; use crate::syntax_kind::SyntaxKind;
#[derive(Clone)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum SyntaxError { pub enum SyntaxError {
DisallowedKeyType(SyntaxKind), DisallowedKeyType(SyntaxKind),
MemberMissingValue, MemberMissingValue,

View file

@ -16,14 +16,6 @@ pub fn lex(src: &str) -> Vec<(SyntaxKind, &str)> {
#[enumset(no_super_impls)] #[enumset(no_super_impls)]
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
pub enum SyntaxKind { pub enum SyntaxKind {
// Error SyntaxKinds
LEX_ERR,
PARSE_ERR,
// Meta SyntaxKinds
TOMBSTONE,
EOF,
OBJECT, OBJECT,
MEMBER, MEMBER,
MEMBER_NAME, MEMBER_NAME,
@ -61,6 +53,13 @@ pub enum SyntaxKind {
WHITESPACE, WHITESPACE,
#[token("\n")] #[token("\n")]
NEWLINE, NEWLINE,
// Error SyntaxKinds
LEX_ERR,
PARSE_ERR,
// Meta SyntaxKinds
EOF,
} }
impl pawarser::parser::SyntaxElement for SyntaxKind { impl pawarser::parser::SyntaxElement for SyntaxKind {
@ -75,6 +74,16 @@ impl From<SyntaxKind> for rowan::SyntaxKind {
} }
} }
impl From<rowan::SyntaxKind> for SyntaxKind {
fn from(raw: rowan::SyntaxKind) -> Self {
assert!(raw.0 <= SyntaxKind::EOF as u16);
#[allow(unsafe_code, reason = "The transmute is necessary here")]
unsafe {
std::mem::transmute::<u16, SyntaxKind>(raw.0)
}
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::syntax_kind::{lex, SyntaxKind}; use crate::syntax_kind::{lex, SyntaxKind};

View file

@ -1,19 +1,29 @@
use std::cell::Cell; use std::{cell::Cell, fmt, marker::PhantomData, mem};
use enumset::{EnumSet, EnumSetType}; use enumset::{EnumSet, EnumSetType};
use rowan::{GreenNode, GreenNodeBuilder};
use crate::parser::event::NodeKind;
use self::{event::Event, input::Input, marker::Marker}; use self::{event::Event, input::Input, marker::Marker};
pub use error::SyntaxError; pub use {error::SyntaxError, output::ParserOutput};
pub mod error; pub mod error;
mod event; mod event;
mod input; mod input;
pub mod marker; pub mod marker;
pub mod output;
/// this is used to define some required SyntaxKinds like an EOF token or an error token /// this is used to define some required SyntaxKinds like an EOF token or an error token
pub trait SyntaxElement pub trait SyntaxElement
where where
Self: EnumSetType + Into<rowan::SyntaxKind> + Clone, Self: EnumSetType
+ Into<rowan::SyntaxKind>
+ From<rowan::SyntaxKind>
+ fmt::Debug
+ Clone
+ PartialEq
+ Eq,
{ {
/// EOF value. This will be used by the rest of the parser library to represent an EOF. /// EOF value. This will be used by the rest of the parser library to represent an EOF.
const EOF: Self; const EOF: Self;
@ -21,8 +31,8 @@ where
const ERROR: Self; const ERROR: Self;
} }
pub struct Parser<'src, 'toks, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> { pub struct Parser<'src, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> {
input: Input<'src, 'toks, SyntaxKind>, input: Input<'src, SyntaxKind>,
pos: usize, pos: usize,
events: Vec<Event<SyntaxKind, SyntaxErr>>, events: Vec<Event<SyntaxKind, SyntaxErr>>,
step_limit: u32, step_limit: u32,
@ -30,7 +40,7 @@ pub struct Parser<'src, 'toks, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError
} }
impl<'src, 'toks, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> impl<'src, 'toks, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError>
Parser<'src, 'toks, SyntaxKind, SyntaxErr> Parser<'src, SyntaxKind, SyntaxErr>
{ {
/// eat all meaningless tokens at the end of the file. /// eat all meaningless tokens at the end of the file.
pub fn eat_succeeding_meaningless(&mut self) { pub fn eat_succeeding_meaningless(&mut self) {
@ -93,21 +103,107 @@ impl<'src, 'toks, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError>
assert!(steps <= self.step_limit, "the parser seems stuck."); assert!(steps <= self.step_limit, "the parser seems stuck.");
self.steps.set(steps + 1); self.steps.set(steps + 1);
} }
pub fn finish(self) -> ParserOutput<SyntaxKind, SyntaxErr> {
let Self {
input,
pos,
mut events,
step_limit,
steps,
} = self;
let (mut raw_toks, meaningless_tokens) = input.dissolve();
let mut builder = GreenNodeBuilder::new();
// TODO: document what the hell a forward parent is
let mut fw_parents = Vec::new();
let mut errors: Vec<SyntaxErr> = Vec::new();
raw_toks.reverse();
for i in 0..events.len() {
match mem::replace(&mut events[i], Event::tombstone()) {
Event::Start {
kind,
forward_parent,
} => {
if kind == NodeKind::Tombstone && forward_parent.is_none() {
continue;
}
// resolving forward parents
// temporarily jump around with the parser index and replace them with tombstones
fw_parents.push(kind);
let mut idx = i;
let mut fp = forward_parent;
while let Some(fwd) = fp {
idx += fwd as usize;
fp = match mem::replace(&mut events[idx], Event::tombstone()) {
Event::Start {
kind,
forward_parent,
} => {
fw_parents.push(kind);
forward_parent
}
_ => unreachable!(),
}
}
// clear semantically meaningless tokens before the new tree node for aesthetic reasons
while raw_toks
.last()
.is_some_and(|v| meaningless_tokens.contains(v.0))
{
// update first next Eat event
match events.iter_mut().find(|ev| matches!(ev, Event::Eat { .. })) {
Some(Event::Eat { count }) => *count -= 1,
_ => unreachable!(),
}
// put whitespace into lst
let (tok, text) = raw_toks.pop().unwrap();
builder.token(tok.into(), text);
}
// insert forward parents into the tree in correct order
for kind in fw_parents.drain(..).rev() {
match kind {
NodeKind::Syntax(kind) => builder.start_node(kind.into()),
NodeKind::Error(err) => {
errors.push(err);
builder.start_node(SyntaxKind::ERROR.into())
}
_ => {}
}
}
}
Event::Finish => builder.finish_node(),
Event::Eat { count } => (0..count).for_each(|_| {
let (tok, text) = raw_toks.pop().unwrap();
builder.token(tok.into(), text);
}),
}
}
ParserOutput {
green_node: builder.finish(),
errors,
_syntax_kind: PhantomData::<SyntaxKind>,
}
}
} }
pub struct ParserBuilder< pub struct ParserBuilder<
'src, 'src,
'toks,
SyntaxKind: SyntaxElement, SyntaxKind: SyntaxElement,
// SyntaxErr: SyntaxError, // SyntaxErr: SyntaxError,
> { > {
raw_toks: &'toks Vec<(SyntaxKind, &'src str)>, raw_toks: Vec<(SyntaxKind, &'src str)>,
meaningless_token_kinds: EnumSet<SyntaxKind>, meaningless_token_kinds: EnumSet<SyntaxKind>,
step_limit: u32, step_limit: u32,
} }
impl<'src, 'toks, SyntaxKind: SyntaxElement> ParserBuilder<'src, 'toks, SyntaxKind> { impl<'src, SyntaxKind: SyntaxElement> ParserBuilder<'src, SyntaxKind> {
pub fn new(raw_toks: &'toks Vec<(SyntaxKind, &'src str)>) -> Self { pub fn new(raw_toks: Vec<(SyntaxKind, &'src str)>) -> Self {
Self { Self {
raw_toks, raw_toks,
meaningless_token_kinds: EnumSet::new(), meaningless_token_kinds: EnumSet::new(),
@ -133,7 +229,7 @@ impl<'src, 'toks, SyntaxKind: SyntaxElement> ParserBuilder<'src, 'toks, SyntaxKi
self self
} }
pub fn build<SyntaxErr: SyntaxError>(self) -> Parser<'src, 'toks, SyntaxKind, SyntaxErr> { pub fn build<SyntaxErr: SyntaxError>(self) -> Parser<'src, SyntaxKind, SyntaxErr> {
let Self { let Self {
raw_toks, raw_toks,
meaningless_token_kinds, meaningless_token_kinds,

View file

@ -1,7 +1,9 @@
use std::fmt;
/// A marker trait... for now! /// A marker trait... for now!
// TODO: constrain that conversion to `NodeKind::Error` is enforced to be possible // TODO: constrain that conversion to `NodeKind::Error` is enforced to be possible
pub trait SyntaxError pub trait SyntaxError
where where
Self: Clone, Self: fmt::Debug + Clone + PartialEq + Eq,
{ {
} }

View file

@ -22,7 +22,7 @@ impl<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> Event<SyntaxKind, Syntax
} }
} }
#[derive(Clone)] #[derive(Clone, PartialEq, Eq)]
pub enum NodeKind<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> { pub enum NodeKind<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> {
Tombstone, Tombstone,
Syntax(SyntaxKind), Syntax(SyntaxKind),

View file

@ -2,17 +2,17 @@ use enumset::{EnumSet, EnumSetType};
use super::SyntaxElement; use super::SyntaxElement;
pub struct Input<'src, 'toks, SyntaxKind: SyntaxElement> { pub struct Input<'src, SyntaxKind: SyntaxElement> {
raw: &'toks Vec<(SyntaxKind, &'src str)>, raw: Vec<(SyntaxKind, &'src str)>,
// enumset of meaningless tokens // enumset of meaningless tokens
semantically_meaningless: EnumSet<SyntaxKind>, semantically_meaningless: EnumSet<SyntaxKind>,
// indices of non-meaningless tokens // indices of non-meaningless tokens
meaningful_toks: Vec<usize>, meaningful_toks: Vec<usize>,
} }
impl<'src, 'toks, SyntaxKind: SyntaxElement> Input<'src, 'toks, SyntaxKind> { impl<'src, SyntaxKind: SyntaxElement> Input<'src, SyntaxKind> {
pub fn new( pub fn new(
raw_toks: &'toks Vec<(SyntaxKind, &'src str)>, raw_toks: Vec<(SyntaxKind, &'src str)>,
meaningless: Option<EnumSet<SyntaxKind>>, meaningless: Option<EnumSet<SyntaxKind>>,
) -> Self { ) -> Self {
let mut meaningful_toks = Vec::new(); let mut meaningful_toks = Vec::new();
@ -55,4 +55,13 @@ impl<'src, 'toks, SyntaxKind: SyntaxElement> Input<'src, 'toks, SyntaxKind> {
pub fn meaningless_tail_len(&self) -> usize { pub fn meaningless_tail_len(&self) -> usize {
self.raw.len() - (self.meaningful_toks.last().unwrap() + 1) self.raw.len() - (self.meaningful_toks.last().unwrap() + 1)
} }
pub fn dissolve(self) -> (Vec<(SyntaxKind, &'src str)>, EnumSet<SyntaxKind>) {
let Self {
raw,
semantically_meaningless,
..
} = self;
(raw, semantically_meaningless)
}
} }

View file

@ -69,6 +69,17 @@ pub struct CompletedMarker<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> {
impl<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> CompletedMarker<SyntaxKind, SyntaxErr> { impl<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> CompletedMarker<SyntaxKind, SyntaxErr> {
pub fn precede(self, p: &mut Parser<SyntaxKind, SyntaxErr>, name: &str) -> Marker { pub fn precede(self, p: &mut Parser<SyntaxKind, SyntaxErr>, name: &str) -> Marker {
todo!() let new_pos = p.start(name);
match &mut p.events[self.pos] {
Event::Start { forward_parent, .. } => {
// point forward parent of the node this marker completed to the new node
// will later be used to make the new node a parent of the current node.
*forward_parent = Some(new_pos.pos - self.pos)
}
_ => unreachable!(),
}
new_pos
} }
} }

View file

@ -0,0 +1,67 @@
use std::{fmt, marker::PhantomData};
use rowan::{GreenNode, GreenNodeData, GreenTokenData, NodeOrToken};
use crate::{SyntaxElement, SyntaxError};
pub struct ParserOutput<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> {
pub green_node: GreenNode,
pub errors: Vec<SyntaxErr>,
pub(super) _syntax_kind: PhantomData<SyntaxKind>,
}
impl<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> std::fmt::Debug
for ParserOutput<SyntaxKind, SyntaxErr>
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut errs: Vec<&SyntaxErr> = self.errors.iter().collect();
errs.reverse();
debug_print_output::<SyntaxKind, SyntaxErr>(
NodeOrToken::Node(&self.green_node),
f,
0,
&mut errs,
)
}
}
fn debug_print_output<SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError>(
node: NodeOrToken<&GreenNodeData, &GreenTokenData>,
f: &mut std::fmt::Formatter<'_>,
lvl: i32,
errs: &mut Vec<&SyntaxErr>,
) -> std::fmt::Result {
for _ in 0..lvl {
f.write_str(" ")?;
}
match node {
NodeOrToken::Node(n) => {
let kind: SyntaxKind = node.kind().into();
if kind != SyntaxKind::ERROR {
writeln!(f, "{:?} {{", kind)?;
} else {
let err = errs
.pop()
.expect("all error syntax nodes should correspond to an error");
writeln!(f, "{:?}: {err:?} {{", kind)?;
}
for c in n.children() {
debug_print_output::<SyntaxKind, SyntaxErr>(c, f, lvl + 1, errs)?;
}
for _ in 0..lvl {
f.write_str(" ")?;
}
f.write_str("}\n")
}
NodeOrToken::Token(t) => {
writeln!(
f,
"{:?} {:?};",
Into::<SyntaxKind>::into(t.kind()),
t.text()
)
}
}
}

View file

@ -3,12 +3,54 @@
"cachix": { "cachix": {
"inputs": { "inputs": {
"devenv": "devenv_2", "devenv": "devenv_2",
"flake-compat": "flake-compat_2", "flake-compat": [
"devenv",
"flake-compat"
],
"git-hooks": [
"devenv",
"pre-commit-hooks"
],
"nixpkgs": [ "nixpkgs": [
"devenv", "devenv",
"nixpkgs" "nixpkgs"
]
},
"locked": {
"lastModified": 1726520618,
"narHash": "sha256-jOsaBmJ/EtX5t/vbylCdS7pWYcKGmWOKg4QKUzKr6dA=",
"owner": "cachix",
"repo": "cachix",
"rev": "695525f9086542dfb09fde0871dbf4174abbf634",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "cachix",
"type": "github"
}
},
"cachix_2": {
"inputs": {
"devenv": "devenv_3",
"flake-compat": [
"devenv",
"cachix",
"devenv",
"flake-compat"
], ],
"pre-commit-hooks": "pre-commit-hooks" "nixpkgs": [
"devenv",
"cachix",
"devenv",
"nixpkgs"
],
"pre-commit-hooks": [
"devenv",
"cachix",
"devenv",
"pre-commit-hooks"
]
}, },
"locked": { "locked": {
"lastModified": 1712055811, "lastModified": 1712055811,
@ -27,17 +69,17 @@
"devenv": { "devenv": {
"inputs": { "inputs": {
"cachix": "cachix", "cachix": "cachix",
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_2",
"nix": "nix_2", "nix": "nix_3",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks_2" "pre-commit-hooks": "pre-commit-hooks_2"
}, },
"locked": { "locked": {
"lastModified": 1712925466, "lastModified": 1729445229,
"narHash": "sha256-MJ6VxGNu/ftbn8SErJjBz80FUNXkZfcObHg/JP7wwAc=", "narHash": "sha256-3vhSEs2ufSvv2Oct8G9CWEPFI57c4NAZ2wR2accHELM=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "1af93652caf48bfeef6ba7d1cf59fc66e506e5c2", "rev": "006016cf4191c34c17cfdb6669e0690e24302ac0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -48,15 +90,53 @@
}, },
"devenv_2": { "devenv_2": {
"inputs": { "inputs": {
"cachix": "cachix_2",
"flake-compat": [ "flake-compat": [
"devenv", "devenv",
"cachix", "cachix",
"flake-compat" "flake-compat"
], ],
"nix": "nix_2",
"nixpkgs": [
"devenv",
"cachix",
"nixpkgs"
],
"pre-commit-hooks": [
"devenv",
"cachix",
"git-hooks"
]
},
"locked": {
"lastModified": 1723156315,
"narHash": "sha256-0JrfahRMJ37Rf1i0iOOn+8Z4CLvbcGNwa2ChOAVrp/8=",
"owner": "cachix",
"repo": "devenv",
"rev": "ff5eb4f2accbcda963af67f1a1159e3f6c7f5f91",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"devenv_3": {
"inputs": {
"flake-compat": [
"devenv",
"cachix",
"devenv",
"cachix",
"flake-compat"
],
"nix": "nix", "nix": "nix",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix", "poetry2nix": "poetry2nix",
"pre-commit-hooks": [ "pre-commit-hooks": [
"devenv",
"cachix",
"devenv", "devenv",
"cachix", "cachix",
"pre-commit-hooks" "pre-commit-hooks"
@ -79,15 +159,15 @@
}, },
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1712903033, "lastModified": 1729492502,
"narHash": "sha256-KcvsEm0h1mIwBHFAzWFBjGihnbf2fxpAaXOdVbUfAI4=", "narHash": "sha256-d6L4bBlUWr4sHC+eRXo+4acFPEFXKmqHpM/BfQ5gQQw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "c739f83545e625227f4d0af7fe2a71e69931fa4c", "rev": "4002a1ec3486b855f341d2b864ba06b61e73af28",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -128,51 +208,25 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": { "flake-parts": {
"flake": false, "inputs": {
"nixpkgs-lib": [
"devenv",
"nix",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1712014858,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
"owner": "edolstra", "owner": "hercules-ci",
"repo": "flake-compat", "repo": "flake-parts",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "edolstra", "owner": "hercules-ci",
"repo": "flake-compat", "repo": "flake-parts",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github" "type": "github"
} }
}, },
@ -195,33 +249,12 @@
} }
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1667395993,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -231,29 +264,6 @@
} }
}, },
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"devenv",
"cachix",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703887061,
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"devenv", "devenv",
@ -275,10 +285,28 @@
"type": "github" "type": "github"
} }
}, },
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1697646580,
"narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
"type": "github"
},
"original": {
"owner": "libgit2",
"repo": "libgit2",
"type": "github"
}
},
"nix": { "nix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": [ "nixpkgs": [
"devenv",
"cachix",
"devenv", "devenv",
"cachix", "cachix",
"devenv", "devenv",
@ -287,11 +315,11 @@
"nixpkgs-regression": "nixpkgs-regression" "nixpkgs-regression": "nixpkgs-regression"
}, },
"locked": { "locked": {
"lastModified": 1708577783, "lastModified": 1712911606,
"narHash": "sha256-92xq7eXlxIT5zFNccLpjiP7sdQqQI30Gyui2p/PfKZM=", "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=",
"owner": "domenkozar", "owner": "domenkozar",
"repo": "nix", "repo": "nix",
"rev": "ecd0af0c1f56de32cbad14daa1d82a132bf298f8", "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -304,6 +332,8 @@
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"devenv",
"cachix",
"devenv", "devenv",
"cachix", "cachix",
"devenv", "devenv",
@ -327,8 +357,15 @@
}, },
"nix_2": { "nix_2": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": [
"devenv",
"cachix",
"devenv",
"flake-compat"
],
"nixpkgs": [ "nixpkgs": [
"devenv",
"cachix",
"devenv", "devenv",
"nixpkgs" "nixpkgs"
], ],
@ -349,6 +386,34 @@
"type": "github" "type": "github"
} }
}, },
"nix_3": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"flake-parts": "flake-parts",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs_2",
"nixpkgs-23-11": "nixpkgs-23-11",
"nixpkgs-regression": "nixpkgs-regression_3",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1727438425,
"narHash": "sha256-X8ES7I1cfNhR9oKp06F6ir4Np70WGZU5sfCOuNBEwMg=",
"owner": "domenkozar",
"repo": "nix",
"rev": "f6c5ae4c1b2e411e6b1e6a8181cc84363d6a7546",
"type": "github"
},
"original": {
"owner": "domenkozar",
"ref": "devenv-2.24",
"repo": "nix",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1692808169, "lastModified": 1692808169,
@ -365,6 +430,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-23-11": {
"locked": {
"lastModified": 1717159533,
"narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
}
},
"nixpkgs-regression": { "nixpkgs-regression": {
"locked": { "locked": {
"lastModified": 1643052045, "lastModified": 1643052045,
@ -397,45 +478,61 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": { "nixpkgs-regression_3": {
"locked": { "locked": {
"lastModified": 1704874635, "lastModified": 1643052045,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1710695816, "lastModified": 1720386169,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3", "rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1710796454, "lastModified": 1717432640,
"narHash": "sha256-lQlICw60RhH8sHTDD/tJiiJrlAfNn8FDI9c+7G2F0SE=", "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88269ab3044128b7c2f4c7d68448b2fb50456870",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1716977621,
"narHash": "sha256-Q1UQzYcMJH4RscmpTkjlgqQDX5yi1tZL0O345Ri6vXQ=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv-nixpkgs", "repo": "devenv-nixpkgs",
"rev": "06fb0f1c643aee3ae6838dda3b37ef0abc3c763b", "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -445,13 +542,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1712791164, "lastModified": 1729256560,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -461,13 +558,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1712791164, "lastModified": 1729256560,
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -482,6 +579,8 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": [ "nixpkgs": [
"devenv",
"cachix",
"devenv", "devenv",
"cachix", "cachix",
"devenv", "devenv",
@ -503,44 +602,26 @@
} }
}, },
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"nixpkgs": [
"devenv",
"cachix",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1708018599,
"narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks_2": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"devenv", "devenv",
"flake-compat" "nix"
],
"flake-utils": "flake-utils_2",
"gitignore": [
"devenv",
"nix"
], ],
"flake-utils": "flake-utils_3",
"gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"devenv", "devenv",
"nix",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": [
"devenv",
"nix",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1712897695, "lastModified": 1712897695,
@ -556,22 +637,49 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": [
"devenv",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"devenv",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1726745158,
"narHash": "sha256-D5AegvGoEjt4rkKedmxlSEmC+nNLMBPWFxvmYnVLhjk=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "4e743a6920eab45e8ba0fbe49dc459f1423a4b74",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"devenv": "devenv", "devenv": "devenv",
"fenix": "fenix", "fenix": "fenix",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"systems": "systems_4" "systems": "systems_2"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1712818880, "lastModified": 1729454508,
"narHash": "sha256-VDxsvgj/bNypHq48tQWtc3VRbWvzlFjzKf9ZZIVO10Y=", "narHash": "sha256-1W5B/CnLgdC03iIFG0wtawO1+dGDWDpc84PeOHo2ecU=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "657b33b0cb9bd49085202e91ad5b4676532c9140", "rev": "9323b5385863739d1c113f02e4cf3f2777c09977",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -610,36 +718,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",