这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions crates/turborepo-lib/src/run/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ impl TaskCache {
pub fn output_writer<W: Write>(&self, writer: W) -> Result<LogWriter<W>, Error> {
let mut log_writer = LogWriter::default();

// We always write a log file even if we do not cache it. This would
// allow users to "stream" specific logs from a single task if the TUI
// was being used.
log_writer.with_log_file(&self.log_file_path)?;
if !self.caching_disabled && !self.run_cache.writes_disabled {
log_writer.with_log_file(&self.log_file_path)?;
}

match self.task_output_logs {
OutputLogsMode::None | OutputLogsMode::HashOnly | OutputLogsMode::ErrorsOnly => {}
Expand Down
15 changes: 3 additions & 12 deletions crates/turborepo-process/src/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

/// Child process stopped.
#[derive(Debug)]
pub struct ShutdownFailed;

Check warning on line 64 in crates/turborepo-process/src/child.rs

View workflow job for this annotation

GitHub Actions / Turborepo Rust testing on windows

struct `ShutdownFailed` is never constructed

Check warning on line 64 in crates/turborepo-process/src/child.rs

View workflow job for this annotation

GitHub Actions / Turborepo Rust testing on windows

struct `ShutdownFailed` is never constructed

impl From<std::io::Error> for ShutdownFailed {
fn from(_: std::io::Error) -> Self {
Expand Down Expand Up @@ -582,18 +582,9 @@

let writer_fut = async {
let mut result = Ok(());
loop {
match tokio::time::timeout(Duration::from_millis(200), byte_rx.recv()).await {
Ok(Some(bytes)) => {
result = stdout_pipe.write_all(&bytes);
}
Ok(None) => break,
Err(_) => {
// Flush the writer periodically if there hasn't been any new output
result = stdout_pipe.flush();
}
}
if result.is_err() {
while let Some(bytes) = byte_rx.recv().await {
if let Err(err) = stdout_pipe.write_all(&bytes) {
result = Err(err);
break;
}
}
Expand Down
4 changes: 1 addition & 3 deletions crates/turborepo-ui/src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ impl<W: Write> LogWriter<W> {
Error::CannotWriteLogs(err)
})?;

// We keep the buffer smaller to ensure the log file does not too far behind the
// displayed logs.
self.log_file = Some(BufWriter::with_capacity(512, log_file));
self.log_file = Some(BufWriter::new(log_file));

Ok(())
}
Expand Down
Loading