Skip to content
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

Is missingInnerMessage restricted to a literal string? #2334

Closed
svorkoetter opened this issue Mar 21, 2019 · 3 comments
Closed

Is missingInnerMessage restricted to a literal string? #2334

svorkoetter opened this issue Mar 21, 2019 · 3 comments
Labels
decided A decision has been made (label added before the spec is changed)

Comments

@svorkoetter
Copy link
Collaborator

Is the value of the missingInnerMessage annotation restricted to a literal string, or may one write something like:

annotation (missingInnerMessage =
    "there is no inner declaration corresponding to" + getInstanceName());
@svorkoetter svorkoetter added this to the Design99 milestone Mar 21, 2019
@svorkoetter
Copy link
Collaborator Author

By the way, my guess is that the answer is "no" (the spec only gives an example, which is a literal string, and I suspect no tool implements more than that). In that case, I would suggest that, analogous to Text annotations, one can embed "%name" in the message to achieve the above.

@HansOlsson
Copy link
Collaborator

HansOlsson commented Mar 21, 2019

I agree with the analysis that it is not currently intended.
I would prefer not to have that, but let tools automatically handle that (=instance name as part of diagnostics) when needed.

The reason is that there are sometimes multiple outer components referring to the same missing inner components, and in that case having "there is no inner declaration corresponding to comp1.world", "there is no inner declaration corresponding to comp2.world", "there is no inner declaration corresponding to comp2.a[1].world", etc. would be annoying.
A tool can in a better way collect them.

@HansOlsson HansOlsson added the decided A decision has been made (label added before the spec is changed) label May 13, 2019
@HansOlsson HansOlsson modified the milestones: Design99, ModelicaSpec3.5 May 13, 2019
@HansOlsson
Copy link
Collaborator

Language group:

Clarify that tool is expected to give context for the error message, thus there is no problem with restricting missingInnerMessage to a literal string.

Agreement by acclamation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decided A decision has been made (label added before the spec is changed)
Projects
None yet
Development

No branches or pull requests

2 participants