trait CompilerModel extends AnyRef
The stable ABI, because flix.jar does not have one.
Flix's internals carry no compatibility promise: Bootstrap, TypedAst and
everything under them may be reorganised in any release, and have been. A plugin that spreads
knowledge of those types through its own code inherits that instability everywhere, and every
new compiler becomes an edit in a dozen places.
So the instability is confined instead. This interface is the only thing the rest of the
plugin knows about a compiler, and it is Java, and versionless on purpose: everything
crossing it is a string, a number or a boolean. One implementation per Flix generation sits
behind it, written against that generation's AST, and nothing outside those implementations
imports ca.uwaterloo.flix.
Per declaration, not aggregate. An earlier version returned totals, which was enough to print a summary and useless for anything else: a finding has to name a file and a line, a ranking has to compare definitions to each other, and "the worst three" cannot be recovered from a sum. Returning records costs nothing in coupling — none of them mention a compiler type — and is what lets every smell, format and ranking live outside the adapter.
Implementing one
Implementations must be instantiable with a public no-argument constructor and named in
Adapters. They are loaded reflectively by name, which is what keeps them off the
class path of the phase that has no compiler: an adapter is only ever loaded in a JVM that
already has the compiler it was written for.
- Alphabetic
- By Inheritance
- CompilerModel
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def measure(projectRoot: Path): Model
Measures one project, or throws.
Measures one project, or throws.
- projectRoot
the root flixw resolved; only declarations under it are described, since a typed root also holds the standard library and every dependency
- Exceptions thrown
ModelFailurewhen the project cannot be typed, which is a fact about the project and not about this adapter
- abstract def targets(): String
What this adapter was written against, for a diagnostic rather than for dispatch.
What this adapter was written against, for a diagnostic rather than for dispatch.
Selection is by whether the adapter links, not by comparing this string: a fork reporting an unfamiliar version may still have the AST the adapter needs, and a compiler reporting a familiar one may not.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)