From 672ee233a8dfe83441a02ad150b8822fc1a86722 Mon Sep 17 00:00:00 2001 From: xonix Date: Tue, 14 Feb 2023 15:23:54 +0200 Subject: [PATCH] Parameterized goals #115 README --- README.md | 2 ++ docs/parameterized_goals.md | 21 +++------------------ 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e59e83d..d2be778 100644 --- a/README.md +++ b/README.md @@ -390,6 +390,8 @@ Processing file2... You can take a look at an example from a real project here TODO. +For more technical consideration regarding this feature see [parameterized_goals.md](docs/parameterized_goals.md). + ### @doc Only valid: inside `@goal`. diff --git a/docs/parameterized_goals.md b/docs/parameterized_goals.md index 6455d3e..cd3edad 100644 --- a/docs/parameterized_goals.md +++ b/docs/parameterized_goals.md @@ -7,10 +7,10 @@ This should allow [such rewrite](https://github.com/xonixx/awk_lab/compare/e6443 Related to [this](https://github.com/xonixx/makesure#omitted-features). Obviously this is being revised. ```shell @goal files_created @params A B -@depends_on file_created @args $A -@depends_on file_created @args $B +@depends_on file_created @args A +@depends_on file_created @args B @depends_on file_created @args '/tmp/file' -@depends_on goal_3_args @args $A '/tmp/file' $B +@depends_on goal_3_args @args A '/tmp/file' B @goal file_created @params F @reached_if [[ -f "$F" ]] @@ -110,18 +110,3 @@ Should work as expected. PG vars should be accessible in `@reached_if` code. ### PG + @doc Should work as expected. `@doc` should just copy to instantiated goals. - - -# TODOS -- [x] check loop -- [x] -l in presence of loop hangs -- [x] check unknown parameterized dep call `@depends_on c @args S` -- [x] all errors at once -- [x] TODOS -- [x] validate param name (regex) -- [x] handle + test w/ `@private` -- [x] test w/ `@lib` -- [x] test w/ `@doc` -- [x] handle + test w/ `@reached_if` -- [ ] test w/ `@glob` (should be covered by `@params` at pos 3 check) -- [ ] README.md