mirror of
https://github.com/go-task/task.git
synced 2026-05-18 21:26:37 +02:00
Compare commits
2 Commits
fix/failfa
...
fix/list-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e639dfae32 | ||
|
|
bc85be2c47 |
@@ -10,6 +10,9 @@
|
||||
@vmaerten).
|
||||
- Use only the relevant checker (timestamp or checksum) to improve performance
|
||||
(#2029, #2031 by @vmaerten).
|
||||
- Print warnings when attempting to enable an inactive experiment or an active
|
||||
experiment with an invalid value (#1979, #2049 by @pd93).
|
||||
- Refactored the experiments package and added tests (#2049 by @pd93).
|
||||
|
||||
## v3.41.0 - 2025-01-18
|
||||
|
||||
|
||||
2
task.go
2
task.go
@@ -527,7 +527,7 @@ func (e *Executor) GetTaskList(filters ...FilterFunc) ([]*ast.Task, error) {
|
||||
// Compile the list of tasks
|
||||
for i := range tasks {
|
||||
g.Go(func() error {
|
||||
compiledTask, err := e.FastCompiledTask(&ast.Call{Task: tasks[i].Task})
|
||||
compiledTask, err := e.CompiledTaskForTaskList(&ast.Call{Task: tasks[i].Task})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
45
variables.go
45
variables.go
@@ -27,6 +27,51 @@ func (e *Executor) FastCompiledTask(call *ast.Call) (*ast.Task, error) {
|
||||
return e.compiledTask(call, false)
|
||||
}
|
||||
|
||||
func (e *Executor) CompiledTaskForTaskList(call *ast.Call) (*ast.Task, error) {
|
||||
origTask, err := e.GetTask(call)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
vars, err := e.Compiler.FastGetVariables(origTask, call)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cache := &templater.Cache{Vars: vars}
|
||||
|
||||
return &ast.Task{
|
||||
Task: origTask.Task,
|
||||
Label: templater.Replace(origTask.Label, cache),
|
||||
Desc: templater.Replace(origTask.Desc, cache),
|
||||
Prompt: templater.Replace(origTask.Prompt, cache),
|
||||
Summary: templater.Replace(origTask.Summary, cache),
|
||||
Aliases: origTask.Aliases,
|
||||
Sources: origTask.Sources,
|
||||
Generates: origTask.Generates,
|
||||
Dir: origTask.Dir,
|
||||
Set: origTask.Set,
|
||||
Shopt: origTask.Shopt,
|
||||
Vars: vars,
|
||||
Env: nil,
|
||||
Dotenv: origTask.Dotenv,
|
||||
Silent: origTask.Silent,
|
||||
Interactive: origTask.Interactive,
|
||||
Internal: origTask.Internal,
|
||||
Method: origTask.Method,
|
||||
Prefix: origTask.Prefix,
|
||||
IgnoreError: origTask.IgnoreError,
|
||||
Run: origTask.Run,
|
||||
IncludeVars: origTask.IncludeVars,
|
||||
IncludedTaskfileVars: origTask.IncludedTaskfileVars,
|
||||
Platforms: origTask.Platforms,
|
||||
Location: origTask.Location,
|
||||
Requires: origTask.Requires,
|
||||
Watch: origTask.Watch,
|
||||
Namespace: origTask.Namespace,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (e *Executor) compiledTask(call *ast.Call, evaluateShVars bool) (*ast.Task, error) {
|
||||
origTask, err := e.GetTask(call)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user