struct Novika::Resolver::Resolution
- Novika::Resolver::Resolution
- Struct
- Value
- Object
Overview
Obtaining a set of resolution objects from an initial list of queries is the central goal of the resolver.
A resolution object points to a script and lists its dependencies.
Furthermore, a resolution object also stores its so-called
runnable sources, which are RunnableScript
objects that it
was derived from.
Defined in:
novika/resolver.crConstructors
-
.new(script : RunnableScript, deps : Set(Dependency))
Initializes a runnable resolution for the given runnable script and a set of resolution dependency objects deps.
Instance Method Summary
-
#==(other : self)
Two resolutions are considered equal when they point to the same script on the disk.
-
#abspath : Path
Returns the absolute path to this resolution.
-
#dump!(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)
Appends the dependencies of this resolution to deps, source scripts of this resolution to sources.
-
#each_dependency(& : Dependency -> )
Yields dependencies of this resolution.
-
#each_source_group(& : RunnableGroup -> )
Yields all
RunnableGroup
s from the ancestry of source scripts of this resolution. -
#hash(hasher)
Two resolutions are considered equal when they point to the same script on the disk.
-
#merge!(other : Resolution) : self
Mutably merges this and other resolutions.
-
#run(engine : Engine, script_block : Block) : Block
Opens an instance of script block (aka file block) with engine.
- #to_s(io)
Constructor Detail
Initializes a runnable resolution for the given runnable script and a set of resolution dependency objects deps.
Instance Method Detail
Two resolutions are considered equal when they point to the same script on the disk.
Appends the dependencies of this resolution to deps, source scripts of this resolution to sources.
Yields all RunnableGroup
s from the ancestry of source scripts of
this resolution. Does not yield the same group twice (sameness is
determined with #==
/hash).
Two resolutions are considered equal when they point to the same script on the disk.
Opens an instance of script block (aka file block) with engine.
Extends script block itself with __path__
, __file__
; therefore,
mutates script block.
Returns the script block instance after evaluation.