Skip to content

Commit

Permalink
Parameterized goals #115 README
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Feb 14, 2023
1 parent c7d8f3e commit 672ee23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
21 changes: 3 additions & 18 deletions docs/parameterized_goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]]
Expand Down Expand Up @@ -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

0 comments on commit 672ee23

Please sign in to comment.