ErrorMessages
Shared error and warning message rendering for Scope macros.
This object provides beautiful, consistent, cross-platform error messages with ASCII diagrams, color support, and actionable hints.
All macro error messages in both Scala 2 and Scala 3 should use this renderer to ensure consistent user experience.
Attributes
- Source
- ErrorMessages.scala
- Graph
-
- Supertypes
- Self type
-
ErrorMessages.type
Members list
Type members
Classlikes
Attributes
- Source
- ErrorMessages.scala
- Supertypes
- Self type
-
Colors.type
A node in the dependency tree for visualization.
Attributes
- Companion
- trait
- Source
- ErrorMessages.scala
- Supertypes
- Self type
-
DepStatus.type
Information about a wire provider for duplicate detection.
Information about a wire provider for duplicate detection.
Attributes
- Source
- ErrorMessages.scala
- Supertypes
Value members
Concrete methods
E8: Abstract type cannot be auto-created.
RE1: allocate called on a closed scope.
RE1: allocate called on a closed scope.
Value parameters
- scopeClass
-
the runtime class name of the scope (e.g. "Scope.Child" or "Scope.global")
Attributes
- Source
- ErrorMessages.scala
E6: Cannot extract wire types.
E10: Dependency cycle detected.
E10: Dependency cycle detected.
Renders an ASCII cycle diagram showing the circular dependency.
Attributes
- Source
- ErrorMessages.scala
E12: Duplicate parameter type - constructor has multiple params of same type.
E12: Duplicate parameter type - constructor has multiple params of same type.
Attributes
- Source
- ErrorMessages.scala
E11: Duplicate provider - multiple wires provide the same type.
E11: Duplicate provider - multiple wires provide the same type.
Attributes
- Source
- ErrorMessages.scala
E4: Has dependencies - Resource.from[T] used but T has dependencies.
E4: Has dependencies - Resource.from[T] used but T has dependencies.
Attributes
- Source
- ErrorMessages.scala
E13: Invalid varargs - expected varargs of Wire expressions.
W1: Leak warning - value being leaked from scope.
Render a missing dependency error with full dependency tree visualization.
Render a missing dependency error with full dependency tree visualization.
This is the most complex error, showing:
- Which dependency is missing
- The resolution stack (how we got here)
- A tree view of all dependencies with their status
- Actionable hints
Attributes
- Source
- ErrorMessages.scala
E9: No constructor for auto-create.
E2: No primary constructor.
E17: No primary constructor found during Unscoped derivation.
E16: No Unscoped instance found for type.
E1: Not a class - type is trait, abstract, primitive, etc.
RE2: open() called on a closed scope.
RE2: open() called on a closed scope.
Value parameters
- scopeClass
-
the runtime class name of the scope
Attributes
- Source
- ErrorMessages.scala
E15: Sealed type has no known subclasses.
E3: Subtype conflict - two dependencies have subtype relationship.
E3: Subtype conflict - two dependencies have subtype relationship.
Attributes
- Source
- ErrorMessages.scala
E14: Type parameter not deducible from parent type arguments.
E7: Unmakeable type - primitives, collections, functions cannot be auto-created.
E7: Unmakeable type - primitives, collections, functions cannot be auto-created.
Attributes
- Source
- ErrorMessages.scala
E5: Unsupported implicit parameter type.
RE3: $ called on a closed scope.
RE3: $ called on a closed scope.
Value parameters
- scopeClass
-
the runtime class name of the scope
Attributes
- Source
- ErrorMessages.scala