-
Notifications
You must be signed in to change notification settings - Fork 635
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
Address loading of packages with inter-dependencies #9736
Address loading of packages with inter-dependencies #9736
Conversation
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")); |
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.
@@ -47,7 +47,7 @@ public void SetsErrorState() | |||
//open a dyf file and modify it | |||
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"))); |
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.
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.
LGTM! |
* 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
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