Future.Tasks
The tasks module defines attributes and unions for describing runnable tasks
in Cavefiles, moved under future/tasks as part of the ZE-002 proposal work.
Values
const ZE_002
const ZE_002 = "https://zirric.knabel.dev/proposals/ze-002-the-cavefile/"
ZE-002: The Cavefile.
Attributes
attr Exec
@Proposal(ZE_002)
attr Exec {
file: String
}
Indicates that this task is implemented in an external file.
Fields:
file: String— The file that contains the implementation of the task.
attr Call
@Proposal(ZE_002)
attr Call {
function: Function
}
Indicates that this task is implemented by a function.
Fields:
function: Function— The function to run for the task.
attr Import
@Proposal(ZE_002)
attr Import {
module: Module
}
Indicates that this task uses a module for its implementation. Must be declared
on the field of a data declaration with @Dependencies.
Fields:
module: Module— The module to use for the task.
attr Name
@Proposal(ZE_002)
attr Name {
name: String
}
Renames the task, flag or argument.
Fields:
name: String— The new name.
attr Alias
@Proposal(ZE_002)
attr Alias {
alias: Array
}
Provides alternative names for the task, flag or argument.
Fields:
alias: Array— Alternative names.
attr Short
@Proposal(ZE_002)
attr Short {
short: Char
}
Provides a short name for the flag. Not applicable to arguments.
Fields:
short: Char— The short name of the flag.
attr Help
@Proposal(ZE_002)
attr Help {
help: String
}
A short help text for the task, flag or argument.
Fields:
help: String— A short help text.
attr Flag
@Proposal(ZE_002)
attr Flag {}
Marks this field as a commandline flag.
attr Arg
@Proposal(ZE_002)
attr Arg {}
Marks this field as a positional commandline argument.
Union
union Task
@Proposal(ZE_002)
union Task
Marks a data declaration as a task. The task can be executed from the command
line. Exactly one of these two attributes are required: @RunFile, @Run or
@Import.
Members:
ExecCallImport