Skip to content

Commit

Permalink
Revert "Remove ureq dependency in xtask to get rid of ring dependency"
Browse files Browse the repository at this point in the history
This reverts commit 5549634.
  • Loading branch information
DavisVaughan committed Jan 26, 2025
1 parent c1bf06c commit 31c75b6
Show file tree
Hide file tree
Showing 5 changed files with 318 additions and 2 deletions.
122 changes: 122 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions xtask/codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bpaf = { version = "0.9.15", features = ["derive"] }
git2 = { version = "0.19.0", default-features = false }
proc-macro2 = { workspace = true, features = ["span-locations"] }
quote = "1.0.37"
ureq = "2.10.1"
walkdir = "2.5.0"
xtask = { path = '../', version = "0.0" }

Expand Down
5 changes: 5 additions & 0 deletions xtask/codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ mod kind_src;
mod language_kind;
mod parser_tests;
mod termcolorful;
mod unicode;

use bpaf::Bpaf;
use std::path::Path;
Expand All @@ -33,6 +34,7 @@ pub use self::ast::generate_ast;
pub use self::formatter::generate_formatters;
pub use self::generate_crate::generate_crate;
pub use self::parser_tests::generate_parser_tests;
pub use self::unicode::generate_tables;

pub enum UpdateResult {
NotUpdated,
Expand Down Expand Up @@ -83,6 +85,9 @@ pub enum TaskCommand {
/// Extracts parser inline comments into test files
#[bpaf(command)]
Test,
/// Generates unicode table inside lexer
#[bpaf(command)]
Unicode,
/// Runs ALL the codegen
#[bpaf(command)]
All,
Expand Down
8 changes: 6 additions & 2 deletions xtask/codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use xtask::{project_root, pushd, Result};

use xtask::Mode::Overwrite;
use xtask_codegen::{
generate_ast, generate_crate, generate_formatters, generate_parser_tests, task_command,
TaskCommand,
generate_ast, generate_crate, generate_formatters, generate_parser_tests, generate_tables,
task_command, TaskCommand,
};

fn main() -> Result<()> {
Expand All @@ -20,7 +20,11 @@ fn main() -> Result<()> {
TaskCommand::Test => {
generate_parser_tests(Overwrite)?;
}
TaskCommand::Unicode => {
generate_tables()?;
}
TaskCommand::All => {
generate_tables()?;
generate_ast(Overwrite, vec![])?;
generate_parser_tests(Overwrite)?;
generate_formatters();
Expand Down
Loading

0 comments on commit 31c75b6

Please sign in to comment.