You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
If there's a package A that depends on package B, and A does not come bundled with B, package B needs to be installed (from the PM) or loaded into Dynamo (imported in the VM) before A for A to be loaded successfully. If not, only B is loaded.
If B is already installed but not imported before A, resolve the dependencies from B that are required while importing A by searching for them in the package paths.
If package B is not already installed there is not much that can be done unless the user installs B manually. Once B is loaded/installed, we need to restart Dynamo in order to reload A.
If package A depends on B and also contains B's assembly, then A is imported successfully. In this case B will not be installed (nor imported). If B is installed from the PM separately, it will fail as the VM will throw a class redefinition error.
Still making sure that B is installed properly.
Now if B is labelled as "node library" in pkg.json manifest file it will load along with A.
Package load failures should now show up in notifications manager as shown:
Performance profiling results for loading 6 packages totaling 15,000 nodes during Dynamo startup (savings of ~10sec out of overall time of ~66sec): Before:
aparajit-pratap
changed the title
[WIP] Address loading of packages with inter-dependencies
Address loading of packages with inter-dependencies
Jun 13, 2019
The reason will be displayed to describe this comment to others. Learn more.
The following code shows the methods defined in the 3 test packages. DependentPackage has a dependency on Package and AnotherPackage has a dependency on the first two:
The reason will be displayed to describe this comment to others. Learn more.
These tests specifically check for the "Custom Rounding" test package that earlier happened to be the first package in the list. This order changed in this PR after I added new test packages, which is why I'm specifically searching for the "Custom Rounding" package from now on.
* refactor package loading
* change method name
* refactor import packages during install
* add import library step into VM after ImportLibrary is called
* fixes in library services resolve assembly
* try sending failure messages to notification view extension
* surface package load exception to notifications view extension
* clear notifications from logger after adding them to notifications extension
* surface more library load failed exceptions to notification view extension
* address review comments
* revert unchanged file
* obsolete public API's no longer used and to be removed in 3.0
* remove ReadyParams property
* cleanup
* correct for importing library from assembly info in old xml formatted DYN files
* more cleanup
* refactor LibraryServices methods
* code cleanup, documentation
* add reasons for obsoleting methods
* add test for loading interdependent packages
* cleanup
* update failing tests from self-serve
* revert unchanged file
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.
Purpose
This PR addresses the following issues (JIRA Link: https://jira.autodesk.com/browse/DYN-1863):
If B is already installed but not imported before A, resolve the dependencies from B that are required while importing A by searching for them in the package paths.
If package B is not already installed there is not much that can be done unless the user installs B manually. Once B is loaded/installed, we need to restart Dynamo in order to reload A.
Still making sure that B is installed properly.
Now if B is labelled as "node library" in pkg.json manifest file it will load along with A.
Performance profiling results for loading 6 packages totaling 15,000 nodes during Dynamo startup (savings of ~10sec out of overall time of ~66sec):

Before:
After:

Declarations
Check these if you believe they are true
*.resx
filesReviewers
@mjkkirschner
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of