TastyVersionCompatibility
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
Members list
Value members
Concrete methods
This method implements a binary relation (<:<
) between two TASTy versions.
This method implements a binary relation (<:<
) between two TASTy versions.
Given the TASTy version of a file
and the TASTy version of the compiler
,
if file <:< compiler
then the TASTy file is valid to be read.
A TASTy version, e.g. v := 28.0-3
is composed of three fields:
- v.major == 28
- v.minor == 0
- v.experimental == 3
TASTy versions have a partial order, for example,
a <:< b
and b <:< a
are both false if
a
andb
have differentmajor
fields.a
andb
have the samemajor
&minor
fields, but different, non-zero,experimental
fields.
A TASTy version with a zero value for its experimental
field
is considered to be stable. Files with a stable TASTy version
can be read by a compiler with an unstable TASTy version,
(where the compiler's TASTy version has a higher minor
field).
A compiler with a stable TASTy version can never read a file with an unstable TASTy version.
We follow the given algorithm:
file match
case (MajorVersion, MinorVersion, ExperimentalVersion) => true // full equality
case (MajorVersion, minor, 0) if minor < MinorVersion => true // stable backwards compatibility
case _ => false