Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Replace token can incorrectly detect recursion cycle #308

Closed
chad-smith opened this issue May 23, 2023 · 2 comments · Fixed by #309
Closed

Replace token can incorrectly detect recursion cycle #308

chad-smith opened this issue May 23, 2023 · 2 comments · Fixed by #309

Comments

@chad-smith
Copy link
Contributor

chad-smith commented May 23, 2023

Our team recently started receiving an error when transforming config such as:

##[error]recursion cycle with token 'EnableConsole'.

Renaming the token caused the issue to go away. Narrowing it down within the code, it seems that in rare cicumstances this causes an issue because the code is accidentally looking for the token name within a string representation of all existing tokens.

This means (as was the case in our setup) that it would find an existing usage of EnableConsole within a usage of a variable called AlwaysEnableConsoleWarnings.

I'm not sure how you'd like to accept contributions or where we might stand with versioning, but I am raising a pull request now as a means to demonstrate where in the code the issue occurs.

@chad-smith chad-smith changed the title Replace token can incorrectly detect recursion cycle in Replace token can incorrectly detect recursion cycle May 24, 2023
@Malgefor
Copy link

When can we expect the PR to be merged and a new version of the task to be released @qetza ? Running into the same issue as @chad-smith

@qetza
Copy link
Owner

qetza commented Aug 8, 2023

Hi @chad-smith, @Malgefor,
A new version of the task is released and contains the fix for variable recursion detection. Thanks again @chad-smith for the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants