Provide better errors on unknown type in cyclic definitions.

Let's consider the following case:

  ```
  type Var =
    Integer

  type Vars =
    List<Var>
  ```

  This incorrectly reports an infinite cycle; due to the inability to
  properly type-check `Var` which is also a dependent var of `Vars`. Yet
  the real issue here being that `Integer` is an unknown type.

  This commit also upgrades miette to 7.2.0, so that we can also display
  a better error output when the problem is actually a cycle.
This commit is contained in:
KtorZ
2024-08-06 11:45:42 +02:00
parent 1ae6640cd0
commit 91e0e2493a
17 changed files with 119 additions and 128 deletions

View File

@@ -15,7 +15,7 @@ indoc = "2.0.1"
itertools = "0.10.5"
lsp-server = "0.7.0"
lsp-types = "0.94.0"
miette = "5.5.0"
miette.workspace = true
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
serde = "1.0.152"
serde_json = "1.0.94"