Skip to content

Commit

Permalink
codegen: better errors if schemas not found during schema construction (
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson authored Oct 31, 2024
1 parent 6b31453 commit db523d8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ object SchemaGenerator {
res ++= nextLayers.toSeq.sortBy(_.head._1)
acquired ++= nextLayers.flatMap(_.map(_._1)).toSet
if (initialSet.nonEmpty && nextLayers.isEmpty)
throw new IllegalStateException("Cannot order layers until mutually-recursive references have been resolved.")
throw new IllegalStateException(
s"Cannot order layers until mutually-recursive references have been resolved. Unable to find all dependencies for ${initialSet.flatMap(_.map(_._1))}"
)
}

res.map(_.map { case (k, v, _) => k -> v })
Expand Down

0 comments on commit db523d8

Please sign in to comment.