Simplify Dynamo Model initialization about HostName#12869
Merged
QilongTang merged 1 commit intomasterfrom May 13, 2022
Merged
Conversation
QilongTang
commented
May 11, 2022
|
|
||
| var hostUpdateManager = config.UpdateManager; | ||
|
|
||
| if (hostUpdateManager != null) |
Contributor
Author
There was a problem hiding this comment.
UpdateManager will exist either way from above code so we can just check it and set the value directly, no need to consider else case
| @@ -628,18 +628,11 @@ protected DynamoModel(IStartConfiguration config) | |||
|
|
|||
| UpdateManager = config.UpdateManager ?? new DefaultUpdateManager(null); | |||
Member
There was a problem hiding this comment.
any reason to still even construct this object?
Contributor
Author
There was a problem hiding this comment.
@mjkkirschner I think just a chain of code depending on this object to exist but currently it is not guaranteed. e,g, Dynamo for C3D does not initialize it and that is causing some bugs
Contributor
Author
|
@pinzart90 What do you think of this change? The reported regression is not real |
pinzart90
approved these changes
May 13, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please Note:
DynamoRevitrepo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after aLGTMlabel is added to the PR.Purpose
As pointed by Starlee, we have a bug during DynamoModel initialization that as long as
UpdateManagerfromstartupConfigis null,HostNamewill not be set byHostAnalyticsInfoobjectDeclarations
Check these if you believe they are true
*.resxfilesRelease Notes
Bug fixing
Reviewers
@DynamoDS/dynamo
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of