Allow absent inputs to use import contexts
This commit is contained in:
@@ -21,8 +21,9 @@ type Definition[T any] struct {
|
||||
}
|
||||
|
||||
// Options contains the application definition and per-load input selections.
|
||||
// Imports enables explicit import declarations; Overlay selects one fixed overlay;
|
||||
// Overrides contains only values explicitly supplied by an application CLI.
|
||||
// Imports enables traversal of declarations in a selected main document; an
|
||||
// absent source has no main declarations to traverse. Overlay selects one fixed
|
||||
// overlay. Overrides contain only values explicitly supplied by an application CLI.
|
||||
type Options[T any] struct {
|
||||
Definition Definition[T]
|
||||
Imports bool
|
||||
@@ -39,7 +40,9 @@ type Options[T any] struct {
|
||||
importDefaultsValidated bool
|
||||
}
|
||||
|
||||
// FilesystemContext supplies filesystem roots for imports and overlays.
|
||||
// FilesystemContext supplies filesystem roots for imports and overlays. For an
|
||||
// absent host input, Root is required and BaseDir may be omitted to use Root as
|
||||
// the import base. Native contexts still require both BaseDir and Root.
|
||||
type FilesystemContext struct {
|
||||
BaseDir string
|
||||
Root string
|
||||
|
||||
Reference in New Issue
Block a user