Conversation
There was a problem hiding this comment.
Looks pretty good! I'd like a couple small changes, and I think we should add two tests:
-
If we start ghciwatch with
ghciwatch --experimental-features asdlfkjaslkdgjsthen it errors immediately instead of starting.Something like
assert!(GhciWatchBuilder::new("tests/data/simple").with_args(["--experimental-features", "asdflkj"]).start().await.is_err());, but you can look at the other tests for examples. -
If we start ghciwatch with
ghciwatch --experimental-features tuiwe get a warning that it's experimental.Similar, with something like
session.wait_for_log("literal text of the log message here").await.unwrap(). There's a fancier log matching DSL available as well; I don't think you'll need it, but you can do something like"literal log message".into_matcher().but_not(BaseMatcher::ghci_started()).
I think that'll be pretty easy, but let me know if you have trouble.
| /// Runs ghciwatch directly (not via `GhciWatchBuilder`) because TUI mode | ||
| /// crashes without a terminal, exiting before the test harness can connect. |
There was a problem hiding this comment.
Oh man, that's frustrating!! Maybe we can replace this with a test for your feature when we get that merged lol
There was a problem hiding this comment.
Lol yes! That was the main issue I ran into trying to get the tests running.
Add a new experimental-features flag:
cargo run -- --experimental-features tui --command 'ghci'It's hidden from the help text as well but will report if the flags don't match:
Based on:
#380 (review)
patch,minor, ormajorto request a version bump when it's merged.docs/.tests/.