Skip to content

Commit ab38af5

Browse files
committed
Reproducer doesn't work
Recently I thought a failing pre-processor would cause this issue, but it looks like that doesn't work: ``` ghci> :reload src/MyModule.hs:1:1: error: `false' failed in phase `Haskell pre-processor'. (Exit code: 1) | 1 | {-# OPTIONS_GHC -F -pgmF false #-} | ^ Failed, no modules to be reloaded. ```
1 parent cc9f4ab commit ab38af5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

tests/all_good.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,18 @@ async fn can_detect_compilation_failure() {
5050
#[test]
5151
async fn can_detect_exception() {
5252
let mut session = GhciWatchBuilder::new("tests/data/simple")
53-
.with_args(["--after-reload-ghci", r#"error "oopsie daisy!""#])
5453
.start()
5554
.await
5655
.expect("ghciwatch starts");
57-
let module_path = session.path("src/MyModule.hs");
58-
5956
session.wait_until_ready().await.expect("ghciwatch loads");
6057

61-
session.fs().append(&module_path, "\n").await.unwrap();
58+
let module_path = session.path("src/MyModule.hs");
59+
60+
session
61+
.fs()
62+
.prepend(&module_path, "{-# OPTIONS_GHC -F -pgmF false #-}\n")
63+
.await
64+
.unwrap();
6265

6366
session
6467
.wait_for_log(BaseMatcher::compilation_failed())

tests/data/simple/src/MyModule.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{-# OPTIONS_GHC -F -pgmF false #-}
2+
13
module MyModule (example) where
24

35
example :: String

0 commit comments

Comments
 (0)