Update n2 [action required]

Make sure to run tools/install-n2 after updating to this commit.
n2 have merged in some changes we were previously hosting in a fork,
but the parsing of the flags was altered.

(cherry picked from commit 8e13e6bfc1)
This commit is contained in:
Damien Elmes 2025-02-19 10:34:45 +07:00
parent 670c098af2
commit 832a1c2c3e
6 changed files with 14 additions and 14 deletions

View file

@ -125,7 +125,7 @@ impl BuildAction for GenPythonProto {
build.add_outputs("", python_outputs);
}
fn hide_last_line(&self) -> bool {
fn hide_progress(&self) -> bool {
true
}
}

View file

@ -44,7 +44,7 @@ pub trait BuildAction {
true
}
fn hide_last_line(&self) -> bool {
fn hide_progress(&self) -> bool {
false
}

View file

@ -271,14 +271,14 @@ impl BuildStatement<'_> {
stmt.rule_variables.push(("pool".into(), pool.into()));
}
if have_n2 {
stmt.rule_variables.push((
"hide_success".into(),
(action.hide_success() as u8).to_string(),
));
stmt.rule_variables.push((
"hide_last_line".into(),
(action.hide_last_line() as u8).to_string(),
));
if action.hide_success() {
stmt.rule_variables
.push(("hide_success".into(), "1".into()));
}
if action.hide_progress() {
stmt.rule_variables
.push(("hide_progress".into(), "1".into()));
}
}
stmt

View file

@ -252,7 +252,7 @@ impl BuildAction for SvelteCheck {
build.add_output_stamp(format!("tests/svelte-check.{hash}"));
}
fn hide_last_line(&self) -> bool {
fn hide_progress(&self) -> bool {
true
}
}

View file

@ -146,7 +146,7 @@ impl BuildAction for PythonTypecheck {
build.add_output_stamp(format!("tests/python_typecheck.{hash}"));
}
fn hide_last_line(&self) -> bool {
fn hide_progress(&self) -> bool {
true
}
}
@ -259,7 +259,7 @@ impl BuildAction for PythonTest {
build.add_output_stamp(format!("tests/python_pytest.{hash}"));
}
fn hide_last_line(&self) -> bool {
fn hide_progress(&self) -> bool {
true
}
}

View file

@ -1,3 +1,3 @@
#!/bin/bash
cargo install --git https://github.com/ankitects/n2.git --rev 0de7aa35bf90a4764a54a14e76b8098d65eb3a14
cargo install --git https://github.com/evmar/n2.git --rev 53ec691df749277104d1d4201a344fe4243d6d0a