-
Notifications
You must be signed in to change notification settings - Fork 479
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
Inconsistent behavior when tracing messages within a failing validator (version 1.21.0.0) #5949
Comments
Thanks to @nhenin I managed to fix this. To my understanding, it turns out that this was not a bug but a feature where default optimizations would in fact remove some of the tracing. By using |
Hi @mmontin, I see that you've already discovered the There is also another compiler option called As for the |
I wrote a few tests to verify that @mmontin please check them out and let me know if you believe there is a way to reproduce the problem with Feel free to close the issue if you confirm that original problem is solved. |
Summary
I have witnessed an inconsistent behavior when using trace functions within validation code. In some cases, the message actually appears in the final result, and in others, it does not.
Here is a vanilla example. Consider the following validator:
When called, this validator produces the following validation error:
Before, in version 1.0.0.0, we used to get:
I have conducted some further testing with various variations of this validator.
The validator with a boolean and a string as parameter. We get a trace of either the given string, or the statical one, depending on the value of the boolean:
The validator with a boolean as parameter:
The validator with a String as parameter:
The validator with two conditions, both tracing a message:
Encompass the string in a let binding:
Encompass the whole expression in a let binding:
I have no idea where these discrepancies come from. Everything used to be printed properly in v1.0.0.0.
Steps to reproduce the behavior
Create the following dummy validator:
Run it by consuming one of its outputs.
Actual Result
Evaluation error [ PT5 ]
Expected Result
Evaluation error [ this is false, PT5 ]
Describe the approach you would take to fix this
No response
System info
Ubuntu.
Library version 1.21.0.0
The text was updated successfully, but these errors were encountered: