-
Notifications
You must be signed in to change notification settings - Fork 81
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
fix: inconsistent evaluation of tm_try() #432
Conversation
Codecov Report
@@ Coverage Diff @@
## main #432 +/- ##
==========================================
- Coverage 69.70% 69.67% -0.04%
==========================================
Files 42 42
Lines 7745 7736 -9
==========================================
- Hits 5399 5390 -9
Misses 2094 2094
Partials 252 252
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
want: map[string]*hclwrite.Block{ | ||
"/stack": globals( | ||
str("a", "value"), | ||
str("b", "value"), | ||
str("c", "value"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
{ | ||
path: "/stack", | ||
add: globals( | ||
str("a_interpolated", "${global.undefined}-something"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
this should not be a breaking change afaiu?
it's a change in behavior but stuff that worked before is still the same result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
@@ -111,18 +111,15 @@ func (ge *globalsExpr) eval(rootdir string, meta Metadata) (Globals, error) { | |||
// This is relative only to root since meta.Path will look | |||
// like: /some/path/relative/project/root | |||
logger := log.With(). | |||
Str("action", "eval()"). | |||
Str("action", "globals.eval()"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
The action
metadata is currently very inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is, I tried to check if the logger had some easy way to get method/function names but I didn't find anything at the time (wanted to remove actions in general), only a way to always log filename + line etc. The problem with using things like just "eval" is that we have a bunch of eval related stuff..so it can get confusing to understand the logs, would be cool to be consistent in a way to provide more context on the actions.
It should not be a breaking change, the only change in behavior is that code that used to fail before will now work, if you are pedantic it could be considered a breaking change, because maybe some people depended on the breaking/failing behavior, but I don't think we need to be that pedantic at this point =P |
No description provided.