Address loading of packages with inter-dependencies #9736
Merged
aparajit-pratap merged 24 commits intoDynamoDS:masterfrom Jun 14, 2019
Merged
Address loading of packages with inter-dependencies #9736aparajit-pratap merged 24 commits intoDynamoDS:masterfrom
aparajit-pratap merged 24 commits intoDynamoDS:masterfrom
Conversation
aparajit-pratap
commented
May 30, 2019
mjkkirschner
reviewed
Jun 6, 2019
mjkkirschner
reviewed
Jun 6, 2019
mjkkirschner
reviewed
Jun 6, 2019
mjkkirschner
reviewed
Jun 6, 2019
mjkkirschner
reviewed
Jun 6, 2019
aparajit-pratap
commented
Jun 13, 2019
| var entries = CurrentDynamoModel.SearchModel.SearchEntries.ToList(); | ||
| Assert.IsTrue(entries.Any(x => x.FullName == "AnotherPackage.AnotherPackage.AnotherPackage.HelloAnotherWorld")); | ||
| Assert.IsTrue(entries.Any(x => x.FullName == "DependentPackage.DependentPackage.DependentPackage.HelloWorld")); | ||
| Assert.IsTrue(entries.Any(x => x.FullName == "Package.Package.Package.Hello")); |
Contributor
Author
aparajit-pratap
commented
Jun 14, 2019
| string packagedirectory = Path.Combine(TestDirectory, "pkgs"); | ||
| var packages = Directory.EnumerateDirectories(packagedirectory); | ||
| var first = Path.GetFullPath(packages.First()); | ||
| var first = Path.GetFullPath(packages.FirstOrDefault(x => Path.GetFileName(x).Equals("Custom Rounding"))); |
Contributor
Author
There was a problem hiding this comment.
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.
Member
|
LGTM! |
7 tasks
mjkkirschner
pushed a commit
that referenced
this pull request
Aug 3, 2019
* 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
7 tasks
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.

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
*.resxfilesReviewers
@mjkkirschner
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of