Skip to content

Conversation

jasonstratton
Copy link
Contributor

Removed methods marked with [NodeObsolete] in v2.19.5
This should remove all the obsolete nodes before the 3.0 release
Still need to update the wiki

Purpose

DYN-9286 - Remove Dynamo nodes marked for deprecation in Dynamo 2.x
The purpose being to reduce the size of the codebase by removing deprecated code

Declarations

Check these if you believe they are true

Release Notes

Removed code for the following nodes:


Class Name Method Name Line Number File
Excel Read 308 src/Libraries/DSOffice/Excel.cs
FileSystem ReadImage 343 src/Libraries/CoreNodes/FileSystem.cs
FileSystem LoadImageFromPath 354 src/Libraries/CoreNodes/FileSystem.cs
FileSystem ReadText 360 src/Libraries/CoreNodes/FileSystem.cs
FileSystem WriteImage 369 src/Libraries/CoreNodes/FileSystem.cs
FileSystem ExportToCSV 377 src/Libraries/CoreNodes/FileSystem.cs
String FromObject 18 src/Libraries/CoreNodes/String.cs
SurfaceData Surface 20 src/Libraries/Analysis/SurfaceData.cs
SurfaceData ValueLocations 26 src/Libraries/Analysis/SurfaceData.cs
SurfaceData Values 32 src/Libraries/Analysis/SurfaceData.cs
SurfaceData BySurfaceAndPoints 50 src/Libraries/Analysis/SurfaceData.cs
SurfaceData BySurfacePointsAndValues 77 src/Libraries/Analysis/SurfaceData.cs
VectorData ValueLocations 21 src/Libraries/Analysis/VectorData.cs
VectorData Values 27 src/Libraries/Analysis/VectorData.cs
VectorData ByPointsAndValues 41 src/Libraries/Analysis/VectorData.cs
PointData ValueLocations 19 src/Libraries/Analysis/PointData.cs
PointData Values 25 src/Libraries/Analysis/PointData.cs
PointData ByPointsAndValues 40 src/Libraries/Analysis/PointData.cs

Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

This should remove all the obsolete nodes before the 3.0 release
@Copilot Copilot AI review requested due to automatic review settings October 9, 2025 21:45
@github-actions github-actions bot changed the title DYN-9286 - Remove Dynamo nodes marked for deprecation in Dynamo 2.x 9386: DYN-9286 - Remove Dynamo nodes marked for deprecation in Dynamo 2.x Oct 9, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9386

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes deprecated Dynamo nodes that were marked with [NodeObsolete] in version 2.19.5 to clean up the codebase before the 3.0 release. The removal includes obsolete methods from Excel, FileSystem, String, and Analysis libraries along with their associated test files and documentation.

  • Removed 17 deprecated methods across Excel, FileSystem, String, and Analysis classes
  • Deleted entire obsolete Analysis data classes (SurfaceData, PointData, VectorData)
  • Removed corresponding test files and XML documentation entries

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Libraries/DSOffice/Excel.cs Removed obsolete Read method
src/Libraries/CoreNodes/String.cs Removed obsolete FromObject method
src/Libraries/CoreNodes/FileSystem.cs Removed 5 obsolete file operation methods
src/Libraries/Analysis/SurfaceData.cs Completely removed obsolete SurfaceData class
src/Libraries/Analysis/PointData.cs Completely removed obsolete PointData class
src/Libraries/Analysis/VectorData.cs Completely removed obsolete VectorData class
test/Libraries/AnalysisTests/SurfaceDataTests.cs Removed test file for deleted SurfaceData class
test/Libraries/AnalysisTests/AnalysisTests.cs Removed test file for deleted Analysis data classes
doc/distrib/xml/en-US/Analysis.xml Removed XML documentation for deleted Analysis classes

@QilongTang QilongTang requested a review from a team October 10, 2025 14:08
@QilongTang
Copy link
Contributor

@jasonstratton Some regressions to fix(remove) as well

ToDo: update the file under test with the replacements for the obsolete nodes
Dynamo\test\core\WorkflowTestFiles\File Migration\File.dyn
ToDo: create a new graph for testing, replacing the ReadText, ReadImage nodes, and load image code in the CBN
}

[Test]
[Ignore("Temp: DYN-9386 - Remove obsolete nodes in 2.x -> ToDo: create new test .dyn file")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you finding that this is just flaky? Or does it fail locally as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It did fail locally. I marked it as [Ignore] in order to get the tests to pass and address the test shortly. I was not sure about how to replace the .dyn file right off. The test appears to expect an obsolete node and expects to see a popup. Maybe it is just as simple to replace the node in the graph with another that is still deprecated.

[SupportedOSPlatform("windows")]
#endif
[NodeObsolete("ReadImageObsolete", typeof(Properties.Resources))]
public static Color[] ReadImage(string path, int xSamples, int ySamples)
Copy link
Member

@mjkkirschner mjkkirschner Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I think that in addition to removing these methods it's probably good to:

  1. as you've already done clean up the migration tests, I think you can just remove the old nodes from the graph - they're just not going to be migrated anymore. If we had the time it might make sense to see if we could migrate to something else - for example in this case there is the Image class - but it's not clear if auto migrating will be useful, it wasn't done when the node was obsoleted so maybe it doesn't make sense to do now with limited context for each node.
  2. cleanup the migrations.xml files. If you search for the name of the node you'll find them - for example: https://github.com/DynamoDS/Dynamo/blob/master/src/Libraries/CoreNodes/DSCoreNodes.Migrations.xml#L13

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Not sure. The resource string does say "Use File.FromPath -> Image.ReadFromFile -> Image.Pixels nodes instead" we could try to add a migration that does that
    a. That reminds me to remove the obsolete resource strings
  2. Thank you for that. I was unaware of the migrations.xml file

/// A class for storing structure point analysis data.
/// </summary>
[IsVisibleInDynamoLibrary(false)]
public class PointData : IStructuredData<Point, double> //, IGraphicItem
Copy link
Member

@mjkkirschner mjkkirschner Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so to be pedantic... this class and the other analysis classes were not actually marked obsolete... someone could still be using them without using the nodes ( I have no idea who that person would be or why)... the SAFEST thing to do is to keep the classes around and mark them obsolete. I will let you make that judgement call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did consider that and thought the original intent was so that the node would not be used, which was equivalent to being made obsolete. But I guess if it was in a graph, the user would not see an obsolete message and take and action.

If I were to restore it and mark it as obsolete, would you happen to know what the action the graph author should take?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what I meant, if it was not clear, is that the methods were marked obsolete, but the class was not. Someone could be using the class from c# or python because it was public.

If you just restore the class, not the methods and mark it as obsolete it should not be visible. I don't think theres any action anyone needs to take.

I do see that this class implements an interface and maybe it's not possible to remove the methods without removing the class anyhow because of compiler errors - in that case - I would not worry about it.

I do think it's worth being careful when differentiating between classes and members being marked obsolete.

/// </summary>
public static class String
{
// It has been moved to String.FromObject UI node, which is compiled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any idea what this comment was intending and if it was done?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know the intention or whether it was done. I guess I should not have assumed. I will research.

"Name": "",
"Description": "Value of expression at line 1",
"Name": "list",
"Description": "[DSCore.Object.Type(DSCore.Data.ParseJSON(\"false\")), DSCore.Object.Type(DesignScript.Builtin.Get.ValueAtIndex(DSCore.Data.ParseJSON(\"[false]\"), 0)), DSCore.Object.Type(DSCore.Data.ParseJSON(\"{\"foo\": false}\")), DSCore.Object.Type(DSCore.Data.ParseJSON(\"\"another test\"\")), DSCore.Object.Type(DSCore.Data.ParseJSON(\"12\")), DSCore.Object.Type(DSCore.Data.ParseJSON(\"\"2009-02-15T00:00:00Z\"\")), DSCore.Object.Type(DSCore.Data.ParseJSON(\"1e10\")), DSCore.Object.Type(DSCore.Data.ParseJSON(\"{\"foo\": [1,{},3...",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh man... I don't think this change comes from your PR ... this seems to have something to do with recent changes to codeblock UI...

@zeusongit is this intentional that such large amounts of DS code ends up duplicated in the description like this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm...seems weird, and not intentional, to have this move to description, where do you think the change is coming from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's interesting. I just updated the graph so the test would pass, but I did not look into the contents of the .dyn file.

I followed the ReadTextObsolete resource string instructions and replaced FileSystem.ReadText with File.FromPath -> File.ReadText nodes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's coming from the changes to codeblock that set the output name based on the variable name / value.

@mjkkirschner
Copy link
Member

mjkkirschner commented Oct 15, 2025

I think there are other resource strings (like the node obsolete messages) that need to be cleaned up, and since they are now stored in the repo (no comment on this) - I think that should all be cleaned up now as well for all languages, not just en-us.

@jasonstratton
Copy link
Contributor Author

Yeah, I noted the resource strings in an earlier comment and made a note to remove them. I did not think about removing from the other languages. So I'll make a not eof that as well.

@mjkkirschner
Copy link
Member

mjkkirschner commented Oct 15, 2025

Yeah, I noted the resource strings in an earlier comment and made a note to remove them. I did not think about removing from the other languages. So I'll make a not eof that as well.

I might be wrong about that. @zeusongit can you fill us in on the proper way to update resource strings these days?

@zeusongit
Copy link
Contributor

Yeah, I noted the resource strings in an earlier comment and made a note to remove them. I did not think about removing from the other languages. So I'll make a not eof that as well.

I might be wrong about that. @zeusongit can you fill us in on the proper way to update resource strings these days?

We just need to remove/update resource strings for en-US and the localization job should take care of the rest of the locale(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants