Skip to content

Commit

Permalink
build(revset): build parser as part of build.rs
Browse files Browse the repository at this point in the history
Usually, I avoid using `build.rs` since it potentially makes the build slower and harder to analyze statically. But I've forgotten to manually run `lalrpop` enough that it's easier to add the generation to the build script.
  • Loading branch information
arxanas committed Jul 31, 2022
1 parent 0f06699 commit 4f7a368
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 2,637 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ root = true
end_of_line = lf
trim_trailing_whitespace = true

[*.rs]
[*.{rs,lalrpop}]
indent_style = space
indent_size = 4
146 changes: 146 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions git-branchless/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ insta = "1.16.0"
portable-pty = "0.7.0"
vt100 = "0.15.1"

[build-dependencies]
lalrpop = "0.19.8"

[package.metadata.release]
pre-release-replacements = [
{ file = "../CHANGELOG.md", search = "Unreleased", replace = "{{version}}", min = 1 },
Expand Down
3 changes: 3 additions & 0 deletions git-branchless/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
lalrpop::process_root().unwrap();
}
Loading

0 comments on commit 4f7a368

Please sign in to comment.