ErrorMessages

zio.blocks.scope.internal.ErrorMessages
object 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
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object Colors

Attributes

Source
ErrorMessages.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Colors.type
final case class DepNode(name: String, status: DepStatus, children: List[DepNode] = ...)

A node in the dependency tree for visualization.

A node in the dependency tree for visualization.

Attributes

Source
ErrorMessages.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DepStatus

Attributes

Companion
trait
Source
ErrorMessages.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
DepStatus.type
sealed trait DepStatus

Status of a dependency in the graph.

Status of a dependency in the graph.

Attributes

Companion
object
Source
ErrorMessages.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Found
object Missing
object Pending
final case class ProviderInfo(label: String, location: Option[String])

Information about a wire provider for duplicate detection.

Information about a wire provider for duplicate detection.

Attributes

Source
ErrorMessages.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def renderAbstractType(typeName: String, requiredByChain: List[String], color: Boolean): String

E8: Abstract type cannot be auto-created.

E8: Abstract type cannot be auto-created.

Attributes

Source
ErrorMessages.scala
def renderAllocateOnClosedScope(scopeClass: String, color: Boolean): String

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
def renderCannotExtractWireTypes(wireType: String, color: Boolean): String

E6: Cannot extract wire types.

E6: Cannot extract wire types.

Attributes

Source
ErrorMessages.scala
def renderDependencyCycle(cyclePath: List[String], color: Boolean): String

E10: Dependency cycle detected.

E10: Dependency cycle detected.

Renders an ASCII cycle diagram showing the circular dependency.

Attributes

Source
ErrorMessages.scala
def renderDuplicateParamType(typeName: String, paramType: String, color: Boolean): String

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
def renderDuplicateProvider(typeName: String, providers: List[ProviderInfo], color: Boolean): String

E11: Duplicate provider - multiple wires provide the same type.

E11: Duplicate provider - multiple wires provide the same type.

Attributes

Source
ErrorMessages.scala
def renderHasDependencies(typeName: String, dependencies: List[String], color: Boolean): String

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
def renderInvalidVarargs(actualType: String, color: Boolean): String

E13: Invalid varargs - expected varargs of Wire expressions.

E13: Invalid varargs - expected varargs of Wire expressions.

Attributes

Source
ErrorMessages.scala
def renderLeakWarning(sourceCode: String, scopeName: String, color: Boolean): String

W1: Leak warning - value being leaked from scope.

W1: Leak warning - value being leaked from scope.

Attributes

Source
ErrorMessages.scala
def renderMissingDependency(requiredBy: String, missing: List[String], found: List[String], stack: List[String], dependencyTree: Option[DepNode], color: Boolean): String

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
def renderNoCtorForAutoCreate(typeName: String, requiredByChain: List[String], color: Boolean): String

E9: No constructor for auto-create.

E9: No constructor for auto-create.

Attributes

Source
ErrorMessages.scala
def renderNoPrimaryCtor(typeName: String, color: Boolean): String

E2: No primary constructor.

E2: No primary constructor.

Attributes

Source
ErrorMessages.scala
def renderNoPrimaryCtorForUnscoped(typeName: String, color: Boolean): String

E17: No primary constructor found during Unscoped derivation.

E17: No primary constructor found during Unscoped derivation.

Attributes

Source
ErrorMessages.scala
def renderNoUnscopedInstance(topLevelType: String, problemType: String, context: String, color: Boolean): String

E16: No Unscoped instance found for type.

E16: No Unscoped instance found for type.

Attributes

Source
ErrorMessages.scala
def renderNotAClass(typeName: String, color: Boolean): String

E1: Not a class - type is trait, abstract, primitive, etc.

E1: Not a class - type is trait, abstract, primitive, etc.

Attributes

Source
ErrorMessages.scala
def renderOpenOnClosedScope(scopeClass: String, color: Boolean): String

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
def renderSealedNoSubclasses(typeName: String, color: Boolean): String

E15: Sealed type has no known subclasses.

E15: Sealed type has no known subclasses.

Attributes

Source
ErrorMessages.scala
def renderSubtypeConflict(typeName: String, subtype: String, supertype: String, color: Boolean): String

E3: Subtype conflict - two dependencies have subtype relationship.

E3: Subtype conflict - two dependencies have subtype relationship.

Attributes

Source
ErrorMessages.scala
def renderTypeParamNotDeducible(typeParam: String, childType: String, parentType: String, color: Boolean): String

E14: Type parameter not deducible from parent type arguments.

E14: Type parameter not deducible from parent type arguments.

Attributes

Source
ErrorMessages.scala
def renderUnmakeableType(typeName: String, requiredByChain: List[String], color: Boolean): String

E7: Unmakeable type - primitives, collections, functions cannot be auto-created.

E7: Unmakeable type - primitives, collections, functions cannot be auto-created.

Attributes

Source
ErrorMessages.scala
def renderUnsupportedImplicitParam(typeName: String, paramType: String, color: Boolean): String

E5: Unsupported implicit parameter type.

E5: Unsupported implicit parameter type.

Attributes

Source
ErrorMessages.scala
def renderUseOnClosedScope(scopeClass: String, color: Boolean): String

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