Skip to content
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

[DYN-2870] Increase the code coverage: DynamoCore/Graph Folder #10860

Merged

Conversation

Astul-Betizagasti
Copy link
Contributor

Purpose

Remove unused code in the Workspaces sub folder

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.

Reviewers

Aaron Tang (@QilongTang )
Michael Kirschner (@mjkkirschner )

FYIs

Aldredo Pozo (@alfredo-pozo )

@QilongTang
Copy link
Contributor

@DynamoDS/dynamo any comments? I think this is safe to remove since we are no longer serializing the whole workspace using XML. We still preserve the node serialization logic using XML for undo/redo which is un touched.

@mjkkirschner
Copy link
Member

mjkkirschner commented Jul 7, 2020

unfortunately ... removing a protected member from a public class probably constitutes an API change? Maybe not a break... - If some client inherited from this class, and used that method, it will now call the base class right and behavior will be significantly different?

@mjkkirschner
Copy link
Member

always good to read this again:
https://github.com/dotnet/runtime/blob/master/docs/coding-guidelines/breaking-change-rules.md

I don't see protected members called out specifically...

@QilongTang
Copy link
Contributor

QilongTang commented Jul 7, 2020

How about this

❌ DISALLOWED: Reducing the visibility of a member

This includes reducing the visibility of a protected member when there are accessible (public or protected) constructors and the type is not sealed. If this is not the case, reducing the visibility of a protected member is allowed.

Increasing the visibility of a member is allowed.

From https://docs.microsoft.com/en-us/dotnet/core/compatibility/. I guess removing is part of reducing visibility of protected member? I really would like to remove it :(

@mjkkirschner
Copy link
Member

well... does removing it count as lowering its visibility 😉 ?
I think the API will still be callable, an exception will not be thrown at compile or runtime - but behavior will potentially change. For example, I could imagine Dynamo Player uses this API.

@QilongTang
Copy link
Contributor

@mjkkirschner So obsoletion then?

@mjkkirschner
Copy link
Member

that would be the safe bet.

@QilongTang
Copy link
Contributor

@Astul-Betizagasti Can you obsolete these methods then, their should be plenty example in the code base about obsolete messaging. Sorry about the back and forth.

@Astul-Betizagasti
Copy link
Contributor Author

Astul-Betizagasti commented Jul 7, 2020

Ok, no problem I'll change it. Should I add a message on the Obsolete attribute or there is no need?

Edit: my browser had not refreshed and I didn't see you previous message

@QilongTang
Copy link
Contributor

@Astul-Betizagasti Yes

[Obsolete("Method will be deprecated in Dynamo 3.0.")]

I dont think there is a replacement on workspace model.. We can append use ToJson() or Save() but they are not the same in all ways.

@@ -1499,6 +1499,7 @@ internal bool containsInvalidInputSymbols()
return this.Nodes.OfType<Nodes.CustomNodes.Symbol>().Any(node => !node.Parameter.NameIsValid);
}

[Obsolete("Method will be deprecated in Dynamo 3.0.")]
private void SerializeElementResolver(XmlDocument xmlDoc)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why can't we remove this right away?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Astul-Betizagasti For private functions we should be able to remove any time. unlike protected and public ones

@QilongTang QilongTang merged commit 96bb7ef into DynamoDS:master Jul 8, 2020
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