Type-safe deferred references to values not known at evaluation time.
Module URI:
pkl:refcontent_copy
Pkl version:
0.32.0 or higher
Known subtypes in package:
Known usages in package:
All versions:
References are an advanced API design tool that enables library authors to express
domain-specific references to values that may not be known during evaluation.
They are particularly suited for configuring execution systems where tasks have well-typed
inputs and output. These include:
CI pipelines
Build graphs
Workflow tools
WARNING: This module is experimental and not ready for production use.
Returns the relative, descendent directory path between this module and other.
Throws if no such path exists.
For example, if module mod1 has path /dir1/mod1.pkl, and module mod2 has path
/dir1/dir2/dir3/mod2.pkl, then mod1.relativePathTo(mod2) will return
List("dir2", "dir3").
A common use case is to compute the directory path between a template located at the root of a
hierarchy (say rootModule.pkl) and the currently evaluated module (accessible via the
module keyword):
Creates a deferred Reference to a value of type class in the given domain and data.
References may only be constructed for single, non-generic class types.
To create a reference to other types (generic classes, union, nullable, constrained,
typealiases, etc.), use a wrapper class with a property of the desired type.
References are an advanced API design tool that enables library authors to express
domain-specific values, whose actual underlying values are not known to Pkl during evaluation.
Type-safe deferred references to values not known at evaluation time.