Anyone know how I broke cli_tests::known_type_error
? My PR does enable a cli_test
, but this failure is in an unrelated test.
https://github.com/roc-lang/roc/pull/7369
test cli_tests::known_type_error ... FAILED
failures:
---- cli_tests::known_type_error stdout ----
━━━━━━━━━━━━━━━━━━━━ Snapshot Summary ━━━━━━━━━━━━━━━━━━━━━
Snapshot file: crates/cli/tests/snapshots/cli_tests__cli_tests__known_type_error.snap
Snapshot: known_type_error
Source: crates/cli/tests/cli_tests.rs:1317
───────────────────────────────────────────────────────────
Expression: cli_check_out.normalize_stdout_and_stderr()
───────────────────────────────────────────────────────────
-old snapshot
+new results
────────────┬──────────────────────────────────────────────
0 │-␊
1 │-── TYPE MISMATCH in tests/test-projects/known_bad/TypeError.roc ────────────────␊
2 │-␊
3 │-Something is off with the body of the main definition:␊
4 │-␊
5 │-3│ main : Str -> Task {} []␊
6 │-4│ main = \_ ->␊
7 │-5│ "this is a string, not a Task {} [] function like the platform expects."␊
8 │- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^␊
9 │-␊
10 │-The body is a string of type:␊
11 │-␊
12 │- Str␊
13 │-␊
14 │-But the type annotation on main says it should be:␊
15 │-␊
16 │- Task {} []␊
17 │-␊
18 │-Tip: Add type annotations to functions or values to help you figure␊
19 │-this out.␊
20 │-␊
21 │-────────────────────────────────────────────────────────────────────────────────␊
22 │-␊
23 │-1 error and 0 warning found in <ignored for test> ms
0 │+An internal compiler expectation was broken.␊
1 │+This is definitely a compiler bug.␊
2 │+Please file an issue here: <https://github.com/roc-lang/roc/issues/new/choose>␊
3 │+ident_string's IdentIds did not contain an entry for 1 in module 17␊
4 │+Location: crates/compiler/module/src/symbol.rs:151:17␊
────────────┴──────────────────────────────────────────────
To update snapshots run `cargo insta review`
Stopped on the first failure. Run `cargo insta test` to run all snapshots.
thread 'cli_tests::known_type_error' panicked at /Users/bren077s/.cargo/registry/src/index.crates.io-6f17d22bba15001f/insta-1.34.0/src/runtime.rs:563:9:
snapshot assertion for 'known_type_error' failed in line 1317
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Is this a case of a test that is already broken but somehow cached on main or otherwise not running?
https://github.com/roc-lang/roc/issues/7022#issuecomment-2307944622
Interesting. I didn't even change the compiler or TypeError.roc
.
So very surprising to start hitting it in that test now
It seems to be hit consistently
Should I disable that test for now with a todo for the issue?
Yeah :+1:
Last updated: Jul 06 2025 at 12:14 UTC