Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support interpolation including parameterized goal params #153

Closed
xonixx opened this issue Jan 1, 2024 · 0 comments
Closed

Support interpolation including parameterized goal params #153

xonixx opened this issue Jan 1, 2024 · 0 comments
Assignees
Milestone

Comments

@xonixx
Copy link
Owner

xonixx commented Jan 1, 2024

We need to be able to do this:

@define H 'hello'

@goal g
@depends_on pg @args 'world'

@goal pg @params W
@depends_on pg1 @args "$H $W" # now doesn't work, because here W is not interpolated properly, thus is empty

@goal pg1 @params V
  echo "$V"

So this outputs hello instead of the desired hello world.

This happens because we apply interpolation as we parse, but parameterized goals (PG) processing happens at the end, after all lines parsed.

Thus the solution would be to defer those @depends_on pg1 @args "$H $W" re-parsing by moving it into the PG instantiation logic.

@xonixx xonixx self-assigned this Jan 1, 2024
xonixx added a commit that referenced this issue Jan 3, 2024
…his covers #152 so let's revert those changes we did for it
@xonixx xonixx added this to the PLANNED milestone Jan 3, 2024
@xonixx xonixx closed this as completed Jan 3, 2024
@xonixx xonixx modified the milestones: PLANNED, 0.9.22 Jan 3, 2024
xonixx added a commit that referenced this issue Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant