Skip to content

Commit

Permalink
build: run cargo update
Browse files Browse the repository at this point in the history
I had to manually downgrade the version of `indicatif`:

```
cargo update -p indicatif --precise '0.17.0-beta.1'
```

Due to this bug: console-rs/indicatif#358

The fix is in console-rs/indicatif#364, which has not yet been released.
  • Loading branch information
arxanas committed Feb 15, 2022
1 parent ec9c6a8 commit 407da0c
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 237 deletions.
455 changes: 231 additions & 224 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ clap = { version = "3.0.0", features = ["derive"] }
color-eyre = "0.5.11"
concolor = { version = "0.0.8", features = ["auto"] }
console = "0.15.0"
cursive = { version = "0.17.0-alpha.0", default-features = false, features = [
cursive = { version = "0.17.0", default-features = false, features = [
"crossterm-backend",
] }
cursive_buffered_backend = "0.6.0-alpha.0"
cursive_buffered_backend = "0.6.0"
eden_dag = { package = "esl01-dag", version = "0.2.1" }
eyre = "0.6.5"
git2 = { version = "0.13.25", default-features = false }
Expand Down Expand Up @@ -83,4 +83,4 @@ skim = "0.9.4"
criterion = { version = "0.3.5", features = ["html_reports"] }
insta = "1.8.0"
portable-pty = "0.7.0"
vt100 = "0.15.0"
vt100 = "0.15.1"
2 changes: 1 addition & 1 deletion src/commands/undo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::sync::mpsc::{channel, Receiver, Sender, TryRecvError};
use std::time::SystemTime;

use cursive::event::Key;
use cursive::traits::Boxable;
use cursive::traits::Resizable;
use cursive::utils::markup::StyledString;
use cursive::views::{Dialog, EditView, LinearLayout, OnEventView, Panel, ScrollView, TextView};
use cursive::{Cursive, CursiveRunnable, CursiveRunner};
Expand Down
1 change: 0 additions & 1 deletion src/core/eventlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1353,7 +1353,6 @@ mod tests {

#[test]
fn test_different_event_transaction_ids() -> eyre::Result<()> {
return Ok(());
let git = make_git()?;

git.init_repo()?;
Expand Down
2 changes: 2 additions & 0 deletions src/tui/cursive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ pub mod testing {
fn set_effect(&self, _effect: cursive::theme::Effect) {}

fn unset_effect(&self, _effect: cursive::theme::Effect) {}

fn set_title(&mut self, _title: String) {}
}

/// Convert the screenshot into a string for assertions, such as for use
Expand Down
2 changes: 1 addition & 1 deletion tests/command/test_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ fn test_main_branch_not_found_error_message() -> eyre::Result<()> {
},
)?;

let location_trace_re = Regex::new(r"[^ .]+\.rs:[0-9]+")?;
let location_trace_re = Regex::new(r"[^ ]+\.rs:[0-9]+")?;
let stderr = trim_lines(stderr);
let stderr = console::strip_ansi_codes(&stderr);
let stderr = location_trace_re.replace_all(&stderr, "some/file/path.rs:123");
Expand Down
16 changes: 13 additions & 3 deletions tests/command/test_navigation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,27 +413,37 @@ fn run_in_pty(git: &Git, args: &[&str], inputs: &[PtyAction]) -> eyre::Result<()

let mut parser = vt100::Parser::new(pty_size.rows, pty_size.cols, 0);
for action in inputs {
match &action {
match action {
PtyAction::WaitUntilContains(value) => {
let mut buffer = [0; 1024];
while !parser.screen().contents().contains(value) {
const BUF_SIZE: usize = 4096;
let mut buffer = [0; BUF_SIZE];
let n = reader.read(&mut buffer)?;
assert!(n < BUF_SIZE, "filled up PTY buffer by reading {} bytes", n);
parser.process(&buffer[..n]);
}
}

PtyAction::Write(value) => {
write!(pty.master, "{}", value)?;
pty.master.flush()?;
}
}
}

thread::spawn(move || {
let read_remainder_of_pty_output_thread = thread::spawn(move || {
let mut buffer = Vec::new();
reader.read_to_end(&mut buffer).expect("finish reading pty");
String::from_utf8(buffer).unwrap()
});

child.wait()?;
let remainder_of_pty_output = read_remainder_of_pty_output_thread.join().unwrap();
assert!(
!remainder_of_pty_output.contains("panic"),
"Panic in PTY thread:\n{}",
console::strip_ansi_codes(&remainder_of_pty_output)
);

Ok(())
}
Expand Down
8 changes: 4 additions & 4 deletions tests/command/test_undo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ fn test_historical_smartlog_visibility() -> eyre::Result<()> {
"###);
} else {
insta::assert_snapshot!(screen_to_string(&screenshot1), @r###"
┌───────────────────────────────────────────────────┤Commit graph ├───────────────────────────────────────────────────┐
┌───────────────────────────────────────────────────┤ Commit graph ├───────────────────────────────────────────────────┐
│: │
│% 62fc20d2 (manually hidden) (master) create test1.txt │
│ │
Expand All @@ -525,14 +525,14 @@ fn test_historical_smartlog_visibility() -> eyre::Result<()> {
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┤Events ├──────────────────────────────────────────────────────┐
┌──────────────────────────────────────────────────────┤ Events ├──────────────────────────────────────────────────────┐
│Repo after transaction 2 (event 2). Press 'h' for help, 'q' to quit. │
│1. Hide commit 62fc20d2 create test1.txt │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
"###);
insta::assert_snapshot!(screen_to_string(&screenshot2), @r###"
┌───────────────────────────────────────────────────┤Commit graph ├───────────────────────────────────────────────────┐
┌───────────────────────────────────────────────────┤ Commit graph ├───────────────────────────────────────────────────┐
│: │
│@ 62fc20d2 (master) create test1.txt │
│ │
Expand All @@ -551,7 +551,7 @@ fn test_historical_smartlog_visibility() -> eyre::Result<()> {
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┤Events ├──────────────────────────────────────────────────────┐
┌──────────────────────────────────────────────────────┤ Events ├──────────────────────────────────────────────────────┐
│Repo after transaction 1 (event 1). Press 'h' for help, 'q' to quit. │
│1. Commit 62fc20d2 create test1.txt │
│ │
Expand Down

0 comments on commit 407da0c

Please sign in to comment.