-
Notifications
You must be signed in to change notification settings - Fork 40
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
Misplaced standardized annotations #3638
Comments
I had always assumed annotations were only valid where defined, and thus I don't see why we cannot clarify this by adding it overnight. Dymola does detect it, since quite some time, - and no-one has complained that they don't want warnings for misplaced annotations. I have already used the implication in a PR that we should avoid having the same name for slightly different annotations (obviously annotations with the same meaning can and should have the same name), in order to be able to detect mistakes such as the one above. I don't see why language version is particularly important for this issue. If people are using a newer version there might, of course, be both new annotations, new functions, and even grammatical constructs. |
Interesting. From System Modeler's point of view, I'd also be ready to make them errors according to the specification overnight. The reason is that when implemented in System Modeler, there would still be a grace period before we follow the specification strictly by making them hard errors.
My point was that it isn't important. Language version would matter if we wanted to also reject unrecognized annotations (where vendor-specific annotations would of course not be considered unrecognized in this sense). |
As far as I understand, this is a perfectly legal use of annotations:
Instead of running into a linking error, an error telling me that the
Include
isn't allowed in the class annotation would have been fantastic, but of course we can't make something like this illegal over night. Short of that, wouldn't it be great if the specification generally deprecated the presence of standardized annotations in places where they don't have a meaning?Note that this is specifically about the standardized annotations. To do something similar to help the user with misspelled annotations is much harder, since we don't know the set of valid annotations without knowing the language version in use. This would be one of the applications of MCP-0015.
The text was updated successfully, but these errors were encountered: