-
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
DerivedSymbol implementation #1194
DerivedSymbol implementation #1194
Conversation
…nsofrm of another symbol value
if (parameters.TryGetParameterDefinition(config.VariableName, out ITemplateParameter existingParam)) | ||
{ // Derived parameters already have a definition, but need value form processing. | ||
// When the param already exists, use its definition. | ||
p = (Parameter)existingParam; |
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 set IsVariable = true
on the existing parameter for consistency (even though it's never used right now) and make all of the other macros behave this way too.
We should probably make this comment a little more clear as well (since we're in the value forms macro) that the existing parameter must be reused to allow the processing of value forms declared on the derived symbol type later in the thing that deals with value forms for parameter type symbols.
We should also make sure that the processing of the value forms macro for the derived symbol happens before value forms for parameters/derived symbols happen
@@ -571,6 +577,14 @@ private IGlobalRunConfig ProduceOperationSetup(SpecialOperationConfigParams defa | |||
} | |||
} | |||
} | |||
|
|||
if (symbol.Value is DerivedSymbol derivedSymbol) |
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.
This one should move to above the replaces check (to set up the map between the value of the source symbol and the value of the derived symbol), then the block for handling the value forms of parameter symbols should be made to handle BaseSomethingSymbol
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.
There have been 142 0 days since the last freakout about not reading all defaults from config
…rwrite existing symbols if they exist
symbol whose value is a value-form transform of another symbol value