-
Notifications
You must be signed in to change notification settings - Fork 373
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
Value forms for name are less special, can be overridden #867
Value forms for name are less special, can be overridden #867
Conversation
@dotnet-bot test CentOS7.1 x64 Debug Build please |
Is this good to go? We haven't talked about this one in a while. I seem to recall that there's a behavior change in here, let's talk through it again tomorrow - at this point, I think we'd want to keep the behavior with what's currently out there the same. |
…m default handling
The second commit deals with the issues of breaking behavior from the first commit:
Notable change: Note: in the examples below, "global" is used. But we'll be extending this to allow
If the symbol doesn't include an "identity" form and the addIdentity flag isn't false, This setup allows for backwards compatibility with existing configuration processing prior to this change. |
@@ -925,7 +925,12 @@ private static ISymbolModel SetupDefaultNameSymbol(string sourceName) | |||
""description"": ""The default name symbol"", | |||
""datatype"": ""string"", | |||
""forms"": { | |||
""global"": [ ""identity"", ""safe_name"", ""lower_safe_name"", ""safe_namespace"", ""lower_safe_namespace""] | |||
""global"": [ """ + IdentityValueForm.FormName |
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.
I think interpolation would be cleaner here, the brace doubling everywhere else might make it not be though
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.
I went back & forth on how to best format this too. Offline we decided to keep as is.
throw new InvalidCastException("templateDefinedName is not a ParameterSymbol"); | ||
} | ||
|
||
if (!(defaultDefinedName is ParameterSymbol defaultSymbol)) |
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 looks like this is the only place defaultDefinedName is used?
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.
Yes, but what it's cast to is used later in the method.
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.
Ah, didn't see the symbol after the is, oops
""description"": ""The default name symbol"", | ||
""datatype"": ""string"", | ||
""forms"": { | ||
""global"": [ """ + IdentityValueForm.FormName |
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.
Possible good place for interpolation
Should we make the fix for #381 as part of this or in a subsequent PR? |
I think it'd be best to work on #381 in a separate PR, so this doesn't get too big. |
Primary changes:
Ancillary changes: