Skip to content

Commit

Permalink
Don't print cli args in bxl action in superconsole
Browse files Browse the repository at this point in the history
Summary: Don't print cli args, they can get super long and eat up memory.

Reviewed By: krallin

Differential Revision: D44347920

fbshipit-source-id: 777161a599d7df51529e940324317b3cb6f00dd5
  • Loading branch information
wendy728 authored and facebook-github-bot committed Mar 24, 2023
1 parent 7cdf5f1 commit a4dc3ea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
5 changes: 0 additions & 5 deletions app/buck2_build_api/src/bxl/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,6 @@ impl ToProtoMessage for BxlKey {
fn as_proto(&self) -> Self::Message {
buck2_data::BxlFunctionKey {
label: Some(self.label().as_proto()),
args: self
.cli_args()
.iter()
.map(|(k, v)| format!("--{} {}", k, v))
.collect(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/buck2_data/data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1171,8 +1171,8 @@ message AnonTarget {

// A bxl function key, which is a bxl function and its args
message BxlFunctionKey {
reserved 2;
BxlFunctionLabel label = 1;
repeated string args = 2;
}

// A bxl function label, which is its defining file and the function name
Expand Down
1 change: 0 additions & 1 deletion app/buck2_event_observer/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rust_library(
"fbsource//third-party/rust:clap-3",
"fbsource//third-party/rust:derivative",
"fbsource//third-party/rust:derive_more",
"fbsource//third-party/rust:itertools",
"fbsource//third-party/rust:linked-hash-map",
"fbsource//third-party/rust:shlex",
"fbsource//third-party/rust:thiserror",
Expand Down
4 changes: 1 addition & 3 deletions app/buck2_event_observer/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ use buck2_data::TargetLabel;
use buck2_events::BuckEvent;
use buck2_test_api::data::TestStatus;
use dupe::Dupe;
use itertools::Itertools;
use superconsole::content::lines_from_multiline_string;
use superconsole::style::Stylize;
use superconsole::Line;
Expand Down Expand Up @@ -112,10 +111,9 @@ pub fn display_analysis_target(
pub fn display_bxl_key(ctl: &BxlFunctionKey) -> anyhow::Result<String> {
if let BxlFunctionKey {
label: Some(BxlFunctionLabel { bxl_path, name }),
args,
} = ctl
{
Ok(format!("{}:{}({})", bxl_path, name, args.iter().join(",")))
Ok(format!("{}:{}", bxl_path, name))
} else {
Err(ParseEventError::MissingBxlFunctionLabel.into())
}
Expand Down

0 comments on commit a4dc3ea

Please sign in to comment.