You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Proposed syntax would make def-tasks look more like normal defs:
def-task bundle-dist [--no-man, --opt-level: string] {
if not $no_man {
# ...
}
# ...
}
These arguments should be available in both the declaration and the run closures, and are set through depends invocations (e.g. depends bundle-dist --no-man) and quake calls (e.g. quake bundle-dist --no-man).
This would be the first first-class "configuration" feature added to the language. Since these arguments are strongly typed and made easily accessible via the command-line, this seems like an easy win.
Implementation details
The quake Engine::run would have an additional arguments field (probably just the raw list of arguments? or maybe something better typed) which it would apply to the target task.
This probably introduces some nushell parsing problems, but I think we can sidestep those we a few clever hacks. This might include some sort of syntactical pre-processor step, which could have rather complex implications (especially when trying to preserve source spans). In general though, we really want to keep the amount of "magic" happening low, so features like a post-eval REPL (see #9) are maximally useful.
We would also need to rethink how we keep track of tasks globally, since tasks called with different arguments may have different sources/artifacts, dependencies, and effective run implementations. This means internally we should keep track of tasks both as high-level constructs and as individual invocations. When exposing internal data to the user (e.g. via quake inspect or task names in logs), we should refer to task invocations, except in the case of quake inspect --list.
The text was updated successfully, but these errors were encountered:
Proposals
Proposed syntax would make
def-task
s look more like normaldef
s:These arguments should be available in both the declaration and the run closures, and are set through
depends
invocations (e.g.depends bundle-dist --no-man
) and quake calls (e.g.quake bundle-dist --no-man
).This would be the first first-class "configuration" feature added to the language. Since these arguments are strongly typed and made easily accessible via the command-line, this seems like an easy win.
Implementation details
The quake
Engine::run
would have an additional arguments field (probably just the raw list of arguments? or maybe something better typed) which it would apply to the target task.This probably introduces some nushell parsing problems, but I think we can sidestep those we a few clever hacks. This might include some sort of syntactical pre-processor step, which could have rather complex implications (especially when trying to preserve source spans). In general though, we really want to keep the amount of "magic" happening low, so features like a post-eval REPL (see #9) are maximally useful.
We would also need to rethink how we keep track of tasks globally, since tasks called with different arguments may have different sources/artifacts, dependencies, and effective run implementations. This means internally we should keep track of tasks both as high-level constructs and as individual invocations. When exposing internal data to the user (e.g. via
quake inspect
or task names in logs), we should refer to task invocations, except in the case ofquake inspect --list
.The text was updated successfully, but these errors were encountered: