You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lukasjarosch
changed the title
feat: initial version of improved undefined-value detection
feat: improve undefined-value detection in templates
Nov 30, 2022
@lukasjaroschThese changes do not seem to resolve the problem we discussed. Trying to reference a class that goes by the same name as the yaml key still throws the same error, just less helpful this time 😄
Previous:
jandary@mbp doratheexplorer % go run main.go
reference to invalid variable '${flags:sandbox}': unexpected node type string at index 1
With skipper on feat/improve-template-undefined-value-handling:
jandary@mbp doratheexplorer % go run main.go
unexpected node type string at index 1
I have reviewed your demo and it did indeed not behave as expected. The recursion detection was not working properly.
I've now improved the error messages and fixed up the recursion detection.
With your example you should now receive:
cannot load target data for variable ${features:sandbox}: GetPath: undefined path: [features sandbox]
This is now indeed what a user would expect at this point, don't you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.