Skip to content

updateFromXMLNode(): Connector/Socket updates can occur out of order #1588

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

Open
chrisdembia opened this issue Mar 15, 2017 · 3 comments
Open
Labels
Milestone

Comments

@chrisdembia
Copy link
Member

XML versions 30508 and 30510 updated the XML format for connectors/sockets by implementing Component::updateFromXMLNode(). This code should be copied into base classes that had sockets before 30508/30510. The reason is made clear by what happened in #1577: update code for 30514 had to assume pre-30508 syntax because Joint doesn't have 30508 update code.

@chrisdembia
Copy link
Member Author

Tom said in #1577:

Yeah, that was a source of confusion. I think the current design might be better than duplicating the code. Better still might be splitting up the code so that the model file is completely updated one version at a time. We might also then permit updates from an old version to a version that isn't current, which could help test backwards compatibility.

As a result, I am updating the name of this issue.

@chrisdembia chrisdembia changed the title Component::updateFromXMLNode() should be copied to base classes updateFromXMLNode(): Connector/Socket updates can occur out of order Mar 15, 2017
@chrisdembia
Copy link
Member Author

Similar behavior could occur with other abstract classes that implement updateFromXMLNode, such as AbstractPathPoint (see #1595).

@jenhicks jenhicks added this to the Next Release milestone Mar 23, 2017
@tkuchida
Copy link
Member

Potential issues caused by completely updating a derived class before Super::updateFromXMLNode() is called could be avoided if we complete the conversion from A to B before starting the conversion from B to C. We could do this by also passing the target version to updateFromXMLNode(). We would then be able to update to any desired version, which could also help test backwards compatibility with old models more rigorously. See #206.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants