diff --git a/crates/json-pawarser/src/grammar.rs b/crates/json-pawarser/src/grammar.rs index 3ececd8..466f22c 100644 --- a/crates/json-pawarser/src/grammar.rs +++ b/crates/json-pawarser/src/grammar.rs @@ -4,8 +4,8 @@ use crate::{syntax_error::SyntaxError, syntax_kind::SyntaxKind}; use self::object::object; -type Parser<'src, 'toks> = pawarser::Parser<'src, 'toks, SyntaxKind, SyntaxError>; -type CompletedMarker = pawarser::CompletedMarker; +pub(crate) type Parser<'src> = pawarser::Parser<'src, SyntaxKind, SyntaxError>; +pub(crate) type CompletedMarker = pawarser::CompletedMarker; const BASIC_VALUE_TOKENS: EnumSet = enum_set!(SyntaxKind::BOOL | SyntaxKind::NULL | SyntaxKind::NUMBER | SyntaxKind::STRING); @@ -27,12 +27,15 @@ mod object { pub(super) fn object(p: &mut Parser) -> Option { let obj_start = p.start("object"); - if !p.at(SyntaxKind::BRACE_OPEN) { + if !p.eat(SyntaxKind::BRACE_OPEN) { obj_start.abandon(p); return None; } - todo!() + member(p); + + p.eat(SyntaxKind::BRACE_CLOSE); + Some(obj_start.complete(p, SyntaxKind::OBJECT)) } fn member(p: &mut Parser) -> Option { @@ -46,7 +49,7 @@ mod object { p.eat(SyntaxKind::STRING); member_name_start.complete(p, SyntaxKind::MEMBER_NAME); } else { - return todo!("handle other tokens"); + return todo!("handle other tokens: {:?}", p.current()); } if !p.eat(SyntaxKind::COLON) { diff --git a/crates/json-pawarser/src/lib.rs b/crates/json-pawarser/src/lib.rs index 89160be..05c529e 100644 --- a/crates/json-pawarser/src/lib.rs +++ b/crates/json-pawarser/src/lib.rs @@ -1,3 +1,29 @@ mod grammar; mod syntax_error; 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)) + } +} diff --git a/crates/json-pawarser/src/syntax_error.rs b/crates/json-pawarser/src/syntax_error.rs index 6ff9067..45bb5bd 100644 --- a/crates/json-pawarser/src/syntax_error.rs +++ b/crates/json-pawarser/src/syntax_error.rs @@ -1,6 +1,6 @@ use crate::syntax_kind::SyntaxKind; -#[derive(Clone)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum SyntaxError { DisallowedKeyType(SyntaxKind), MemberMissingValue, diff --git a/crates/json-pawarser/src/syntax_kind.rs b/crates/json-pawarser/src/syntax_kind.rs index 9d3dc2c..dfaab13 100644 --- a/crates/json-pawarser/src/syntax_kind.rs +++ b/crates/json-pawarser/src/syntax_kind.rs @@ -16,14 +16,6 @@ pub fn lex(src: &str) -> Vec<(SyntaxKind, &str)> { #[enumset(no_super_impls)] #[allow(non_camel_case_types)] pub enum SyntaxKind { - // Error SyntaxKinds - LEX_ERR, - PARSE_ERR, - - // Meta SyntaxKinds - TOMBSTONE, - EOF, - OBJECT, MEMBER, MEMBER_NAME, @@ -61,6 +53,13 @@ pub enum SyntaxKind { WHITESPACE, #[token("\n")] NEWLINE, + + // Error SyntaxKinds + LEX_ERR, + PARSE_ERR, + + // Meta SyntaxKinds + EOF, } impl pawarser::parser::SyntaxElement for SyntaxKind { @@ -75,6 +74,16 @@ impl From for rowan::SyntaxKind { } } +impl From 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::(raw.0) + } + } +} + #[cfg(test)] mod tests { use crate::syntax_kind::{lex, SyntaxKind}; diff --git a/crates/pawarser/src/parser.rs b/crates/pawarser/src/parser.rs index 09b1bf4..2a666bf 100644 --- a/crates/pawarser/src/parser.rs +++ b/crates/pawarser/src/parser.rs @@ -1,19 +1,29 @@ -use std::cell::Cell; +use std::{cell::Cell, fmt, marker::PhantomData, mem}; use enumset::{EnumSet, EnumSetType}; +use rowan::{GreenNode, GreenNodeBuilder}; + +use crate::parser::event::NodeKind; use self::{event::Event, input::Input, marker::Marker}; -pub use error::SyntaxError; +pub use {error::SyntaxError, output::ParserOutput}; pub mod error; mod event; mod input; pub mod marker; +pub mod output; /// this is used to define some required SyntaxKinds like an EOF token or an error token pub trait SyntaxElement where - Self: EnumSetType + Into + Clone, + Self: EnumSetType + + Into + + From + + fmt::Debug + + Clone + + PartialEq + + Eq, { /// EOF value. This will be used by the rest of the parser library to represent an EOF. const EOF: Self; @@ -21,8 +31,8 @@ where const ERROR: Self; } -pub struct Parser<'src, 'toks, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> { - input: Input<'src, 'toks, SyntaxKind>, +pub struct Parser<'src, SyntaxKind: SyntaxElement, SyntaxErr: SyntaxError> { + input: Input<'src, SyntaxKind>, pos: usize, events: Vec>, step_limit: u32, @@ -30,7 +40,7 @@ pub struct Parser<'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. 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."); self.steps.set(steps + 1); } + + pub fn finish(self) -> ParserOutput { + 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 = 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::, + } + } } pub struct ParserBuilder< 'src, - 'toks, SyntaxKind: SyntaxElement, // SyntaxErr: SyntaxError, > { - raw_toks: &'toks Vec<(SyntaxKind, &'src str)>, + raw_toks: Vec<(SyntaxKind, &'src str)>, meaningless_token_kinds: EnumSet, step_limit: u32, } -impl<'src, 'toks, SyntaxKind: SyntaxElement> ParserBuilder<'src, 'toks, SyntaxKind> { - pub fn new(raw_toks: &'toks Vec<(SyntaxKind, &'src str)>) -> Self { +impl<'src, SyntaxKind: SyntaxElement> ParserBuilder<'src, SyntaxKind> { + pub fn new(raw_toks: Vec<(SyntaxKind, &'src str)>) -> Self { Self { raw_toks, meaningless_token_kinds: EnumSet::new(), @@ -133,7 +229,7 @@ impl<'src, 'toks, SyntaxKind: SyntaxElement> ParserBuilder<'src, 'toks, SyntaxKi self } - pub fn build(self) -> Parser<'src, 'toks, SyntaxKind, SyntaxErr> { + pub fn build(self) -> Parser<'src, SyntaxKind, SyntaxErr> { let Self { raw_toks, meaningless_token_kinds, diff --git a/crates/pawarser/src/parser/error.rs b/crates/pawarser/src/parser/error.rs index ba52ff0..9c9d893 100644 --- a/crates/pawarser/src/parser/error.rs +++ b/crates/pawarser/src/parser/error.rs @@ -1,7 +1,9 @@ +use std::fmt; + /// A marker trait... for now! // TODO: constrain that conversion to `NodeKind::Error` is enforced to be possible pub trait SyntaxError where - Self: Clone, + Self: fmt::Debug + Clone + PartialEq + Eq, { } diff --git a/crates/pawarser/src/parser/event.rs b/crates/pawarser/src/parser/event.rs index 3cd0ef5..1b71d8e 100644 --- a/crates/pawarser/src/parser/event.rs +++ b/crates/pawarser/src/parser/event.rs @@ -22,7 +22,7 @@ impl Event { Tombstone, Syntax(SyntaxKind), diff --git a/crates/pawarser/src/parser/input.rs b/crates/pawarser/src/parser/input.rs index ec2a243..a20d73d 100644 --- a/crates/pawarser/src/parser/input.rs +++ b/crates/pawarser/src/parser/input.rs @@ -2,17 +2,17 @@ use enumset::{EnumSet, EnumSetType}; use super::SyntaxElement; -pub struct Input<'src, 'toks, SyntaxKind: SyntaxElement> { - raw: &'toks Vec<(SyntaxKind, &'src str)>, +pub struct Input<'src, SyntaxKind: SyntaxElement> { + raw: Vec<(SyntaxKind, &'src str)>, // enumset of meaningless tokens semantically_meaningless: EnumSet, // indices of non-meaningless tokens meaningful_toks: Vec, } -impl<'src, 'toks, SyntaxKind: SyntaxElement> Input<'src, 'toks, SyntaxKind> { +impl<'src, SyntaxKind: SyntaxElement> Input<'src, SyntaxKind> { pub fn new( - raw_toks: &'toks Vec<(SyntaxKind, &'src str)>, + raw_toks: Vec<(SyntaxKind, &'src str)>, meaningless: Option>, ) -> Self { 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 { self.raw.len() - (self.meaningful_toks.last().unwrap() + 1) } + + pub fn dissolve(self) -> (Vec<(SyntaxKind, &'src str)>, EnumSet) { + let Self { + raw, + semantically_meaningless, + .. + } = self; + (raw, semantically_meaningless) + } } diff --git a/crates/pawarser/src/parser/marker.rs b/crates/pawarser/src/parser/marker.rs index 2d3fc5a..d03e358 100644 --- a/crates/pawarser/src/parser/marker.rs +++ b/crates/pawarser/src/parser/marker.rs @@ -69,6 +69,17 @@ pub struct CompletedMarker { impl CompletedMarker { pub fn precede(self, p: &mut Parser, 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 } } diff --git a/crates/pawarser/src/parser/output.rs b/crates/pawarser/src/parser/output.rs new file mode 100644 index 0000000..bea13e8 --- /dev/null +++ b/crates/pawarser/src/parser/output.rs @@ -0,0 +1,67 @@ +use std::{fmt, marker::PhantomData}; + +use rowan::{GreenNode, GreenNodeData, GreenTokenData, NodeOrToken}; + +use crate::{SyntaxElement, SyntaxError}; + +pub struct ParserOutput { + pub green_node: GreenNode, + pub errors: Vec, + pub(super) _syntax_kind: PhantomData, +} + +impl std::fmt::Debug + for ParserOutput +{ + 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::( + NodeOrToken::Node(&self.green_node), + f, + 0, + &mut errs, + ) + } +} + +fn debug_print_output( + 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::(c, f, lvl + 1, errs)?; + } + for _ in 0..lvl { + f.write_str(" ")?; + } + f.write_str("}\n") + } + NodeOrToken::Token(t) => { + writeln!( + f, + "{:?} {:?};", + Into::::into(t.kind()), + t.text() + ) + } + } +} diff --git a/flake.lock b/flake.lock index 9719001..0d61b34 100644 --- a/flake.lock +++ b/flake.lock @@ -3,12 +3,54 @@ "cachix": { "inputs": { "devenv": "devenv_2", - "flake-compat": "flake-compat_2", + "flake-compat": [ + "devenv", + "flake-compat" + ], + "git-hooks": [ + "devenv", + "pre-commit-hooks" + ], "nixpkgs": [ "devenv", "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": { "lastModified": 1712055811, @@ -27,17 +69,17 @@ "devenv": { "inputs": { "cachix": "cachix", - "flake-compat": "flake-compat_4", - "nix": "nix_2", - "nixpkgs": "nixpkgs_2", + "flake-compat": "flake-compat_2", + "nix": "nix_3", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1712925466, - "narHash": "sha256-MJ6VxGNu/ftbn8SErJjBz80FUNXkZfcObHg/JP7wwAc=", + "lastModified": 1729445229, + "narHash": "sha256-3vhSEs2ufSvv2Oct8G9CWEPFI57c4NAZ2wR2accHELM=", "owner": "cachix", "repo": "devenv", - "rev": "1af93652caf48bfeef6ba7d1cf59fc66e506e5c2", + "rev": "006016cf4191c34c17cfdb6669e0690e24302ac0", "type": "github" }, "original": { @@ -48,15 +90,53 @@ }, "devenv_2": { "inputs": { + "cachix": "cachix_2", "flake-compat": [ "devenv", "cachix", "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", "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix", "pre-commit-hooks": [ + "devenv", + "cachix", "devenv", "cachix", "pre-commit-hooks" @@ -79,15 +159,15 @@ }, "fenix": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1712903033, - "narHash": "sha256-KcvsEm0h1mIwBHFAzWFBjGihnbf2fxpAaXOdVbUfAI4=", + "lastModified": 1729492502, + "narHash": "sha256-d6L4bBlUWr4sHC+eRXo+4acFPEFXKmqHpM/BfQ5gQQw=", "owner": "nix-community", "repo": "fenix", - "rev": "c739f83545e625227f4d0af7fe2a71e69931fa4c", + "rev": "4002a1ec3486b855f341d2b864ba06b61e73af28", "type": "github" }, "original": { @@ -128,51 +208,25 @@ "type": "github" } }, - "flake-compat_3": { - "flake": false, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "devenv", + "nix", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "type": "github" }, "original": { - "owner": "edolstra", - "repo": "flake-compat", - "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", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, @@ -195,33 +249,12 @@ } }, "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "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", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -231,29 +264,6 @@ } }, "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": { "nixpkgs": [ "devenv", @@ -275,10 +285,28 @@ "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": { "inputs": { "flake-compat": "flake-compat", "nixpkgs": [ + "devenv", + "cachix", "devenv", "cachix", "devenv", @@ -287,11 +315,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1708577783, - "narHash": "sha256-92xq7eXlxIT5zFNccLpjiP7sdQqQI30Gyui2p/PfKZM=", + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", "owner": "domenkozar", "repo": "nix", - "rev": "ecd0af0c1f56de32cbad14daa1d82a132bf298f8", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", "type": "github" }, "original": { @@ -304,6 +332,8 @@ "nix-github-actions": { "inputs": { "nixpkgs": [ + "devenv", + "cachix", "devenv", "cachix", "devenv", @@ -327,8 +357,15 @@ }, "nix_2": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": [ + "devenv", + "cachix", + "devenv", + "flake-compat" + ], "nixpkgs": [ + "devenv", + "cachix", "devenv", "nixpkgs" ], @@ -349,6 +386,34 @@ "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": { "locked": { "lastModified": 1692808169, @@ -365,6 +430,22 @@ "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": { "locked": { "lastModified": 1643052045, @@ -397,45 +478,61 @@ "type": "github" } }, - "nixpkgs-stable": { + "nixpkgs-regression_3": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" } }, - "nixpkgs-stable_2": { + "nixpkgs-stable": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1710796454, - "narHash": "sha256-lQlICw60RhH8sHTDD/tJiiJrlAfNn8FDI9c+7G2F0SE=", + "lastModified": 1717432640, + "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", "repo": "devenv-nixpkgs", - "rev": "06fb0f1c643aee3ae6838dda3b37ef0abc3c763b", + "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", "type": "github" }, "original": { @@ -445,13 +542,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1712791164, - "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", + "lastModified": 1729256560, + "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "type": "github" }, "original": { @@ -461,13 +558,13 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { - "lastModified": 1712791164, - "narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=", + "lastModified": 1729256560, + "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5", + "rev": "4c2fcb090b1f3e5b47eaa7bd33913b574a11e0a0", "type": "github" }, "original": { @@ -482,6 +579,8 @@ "flake-utils": "flake-utils", "nix-github-actions": "nix-github-actions", "nixpkgs": [ + "devenv", + "cachix", "devenv", "cachix", "devenv", @@ -503,44 +602,26 @@ } }, "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": { "flake-compat": [ "devenv", - "flake-compat" + "nix" + ], + "flake-utils": "flake-utils_2", + "gitignore": [ + "devenv", + "nix" ], - "flake-utils": "flake-utils_3", - "gitignore": "gitignore_2", "nixpkgs": [ "devenv", + "nix", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": [ + "devenv", + "nix", + "nixpkgs" + ] }, "locked": { "lastModified": 1712897695, @@ -556,22 +637,49 @@ "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": { "inputs": { "devenv": "devenv", "fenix": "fenix", - "nixpkgs": "nixpkgs_4", - "systems": "systems_4" + "nixpkgs": "nixpkgs_5", + "systems": "systems_2" } }, "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1712818880, - "narHash": "sha256-VDxsvgj/bNypHq48tQWtc3VRbWvzlFjzKf9ZZIVO10Y=", + "lastModified": 1729454508, + "narHash": "sha256-1W5B/CnLgdC03iIFG0wtawO1+dGDWDpc84PeOHo2ecU=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "657b33b0cb9bd49085202e91ad5b4676532c9140", + "rev": "9323b5385863739d1c113f02e4cf3f2777c09977", "type": "github" }, "original": { @@ -610,36 +718,6 @@ "repo": "default", "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",