-
Notifications
You must be signed in to change notification settings - Fork 5
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
[GAIAPLAT-794] Variable hides tag should cause an error #894
Conversation
{ | ||
// https://gaiaplatform.atlassian.net/browse/GAIAPLAT-1178 | ||
// TODO: this works and does not produce any warning. | ||
int i = 0; |
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.
It could require some time to make an error here.... If we consider it important for preview I can try to do it.
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.
Does this give a warning?
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.
Nope.
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.
Let's just add a jira item for V1 and press on.
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.
It's right above :) (GAIAPLAT-1178)
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, but I'm not the expert in this area.
@@ -9619,6 +9619,9 @@ def err_parameter_names_numbers_different_from_parameter: Error< | |||
def err_table_not_found : Error< | |||
"Table '%0' was not found in the catalog. " | |||
"Ensure that the table you are referencing in your rule exists in the database.">; | |||
def err_tag_hidden : Error< |
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.
What about warn_field_hidden
and warn_table_hidden
? Should we also promote these to errors instead of warnings? I do think, however, that warn_able_referenced_not_in_table_attribute
is an appropriate warning.
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.
Good catch, I haven't noticed them. Let me try to understand what they do.
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.
Ok, it seems they should stay warnings (waiting for your approval though). These are examples that trigger the warnings. Basically, they hide things in the catalog that you can access either way using the explicit syntax (sensor->incubator, sensor.value).
ruleset test
{
on_insert(sensor)
{
int incubator = 5; // warn_table_hidden
}
}
ruleset test
{
on_update(sensor)
{
if (sensor.value == 5)
{
int value = 5; // warn_field_hidden
}
}
}
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.
Okay - I'm fine keeping these as warnings. Thanks for looking into it.
No description provided.