-
Notifications
You must be signed in to change notification settings - Fork 636
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
Namespace Collisions with 3rd Party Packages (e.g. Rhynamo) #3208
Comments
Thanks for reporting this issue. We are aware of this problem and working on user story MAGN-5380 to resolve this. |
After doing some digging, in this case I believe the issue actually stems from Dynamo getting confused by the OpenNURBS library (Rhino3dmIO.dll) dependency and is introducing conflicting types. This is very odd because OpenNURBS is being referenced by Rhynamo and should not be referenced by Dynamo directly. I agree that a third party DLL should NOT impact Dynamo core functionality in this manner... but it appears that it does. At the most basic level, Rhynamo converts between Rhino types and Dynamo types (ProtoCore). When coding Rhynamo, the type "Point" or "NurbsSurface" or "Curve" are all ambiguous and I need to be explicit within my own code... For example Autodesk.DesignScript.Geometry.Point vs. Rhino.Geometry.Point Again... I have no idea why Dynamo, itself, would get confused since OpenNURBS is a Rhynamo dependency and should not be referenced by Dynamo. |
@archinate I see that Rhynamo has nodes that convert between types such as |
The same seems to happen with the Document type when DynaWorks is installed. |
The fix for this issue is still pending design review and is not completely implemented yet. However on importing a new library that has namespace conflicts with classes used in existing code block nodes, you will now see these nodes emit warnings saying the classes used in them now have conflicts. For example, if you import Rhynamo, you will see an existing CBN using 'Point' class now emit a warning saying: Agree that the release notes are not quite accurate in this case. |
Then how about listing this as a known issue for 0.7.5 - assuming this fix will not make it into the 0.7.5 release? |
@andydandy74 thanks for pointing out this discrepancy. The first auto-complete list where all the conflicting namespaces are displayed on typing Secondly if autocomplete displays multiple options for |
Also conflicting namespaces are now shortened into shortest names that can be uniquely resolved. For example, |
From a user perspective (or you might as well call it my personal bias) I would say that it would make a lot of sense to find a solution where Dynamo's own library always takes precedence. Imagine what would happen if somebody made a package for, lets say geometry conversion to another software / file format that had a lot of commands with names of generic geometric entities like |
Yes that's right, resolution of the engine issue will no longer execute the statement "Person A uses code blocks in custom nodes without explicitly calling ... this issue has already been taken care of: #3255 You can try it out just as you said: |
@aparajit-pratap - thanks for clearing that up. One less thing to worry about. :-) |
I noticed this when wanting to create points. Autocomplete behaviour before installing Rhynamo:
And after:
So
Point
now needs to be called asAutodesk.DesignScript.Geometry.Point
. Which is not good at all because it means existing scripts won't execute:I find it odd (and actually a bit disconcerting) that third party DLLs can have that kind of effect on Dynamo core functionality.
CC @archinate
The text was updated successfully, but these errors were encountered: