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:
@@ -19,7 +19,7 @@ pub enum Error {
|
||||
#[label("invalid validator's boundary")]
|
||||
location: Span,
|
||||
#[source_code]
|
||||
source_code: NamedSource,
|
||||
source_code: NamedSource<String>,
|
||||
},
|
||||
|
||||
#[error("Invalid or missing project's blueprint file.")]
|
||||
|
||||
@@ -20,5 +20,6 @@ Schema {
|
||||
source_code: NamedSource {
|
||||
name: "",
|
||||
source: "<redacted>",
|
||||
language: None,
|
||||
,
|
||||
}
|
||||
|
||||
@@ -20,5 +20,6 @@ Schema {
|
||||
source_code: NamedSource {
|
||||
name: "",
|
||||
source: "<redacted>",
|
||||
language: None,
|
||||
,
|
||||
}
|
||||
|
||||
@@ -51,5 +51,6 @@ Schema {
|
||||
source_code: NamedSource {
|
||||
name: "",
|
||||
source: "<redacted>",
|
||||
language: None,
|
||||
,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user