opcua-asyncio
opcua-asyncio copied to clipboard
Call get_python_classes while there are codes failing
Call get_python_classes while there are codes failing (most likely due to dependency order)
please stop adding all these merge commit. It is much cleaner to rebase your changes on top of master git pull -r origin master
for example
Is there any ambition to get this PR merged? As far as I can see the current master still have the same issue while loading data type definitions. If there are plans to get this fix merged I will pull from master once again.
Also generally, this send to be a quote ugly hack. Exceptions should only be raised and catched in case of errors. Here you are using exceptions to avoid sorting the XML objects
Also generally, this send to be a quote ugly hack. Exceptions should only be raised and catched in case of errors. Here you are using exceptions to avoid sorting the XML objects
Well, I agree with you. But I feel that sorting the DataType nodes so all dependencies are resolved may be a much bigger change. It is necessary to consider that a Custom Structured DataType may have members that are other DataTypes defined on that namespace; so this would always require to make some parsing to the XML objects of the DataTypes looking to its members types and determining dependencies and check if all of them are already met, and based on that calculate its position on a list.
Obviously it is a solvable problem, I can try to approach the problem in that way. @oroulet do you suggest to reject this approach (even as an intermediary fix) and wait for a solution where the XML objects are sorted? I personally would like to have the feature working ASAP and tackle "a nicer implementation" afterwards, but I totally understand if you don't want this code on the project.
We can leave that PR open, but I would rather not merge that. It make understanding code even more complicated. Also I am surprised I never got that issue. I suppose the xml usually come ordered. you must have encountered some special case to have that issue, maybe even a buggy xml
also this is fixingan older version of protocl, newer versions do not use these xml nodes, they use the DataTypeDefiniont attributes
We can leave that PR open, but I would rather not merge that. It make understanding code even more complicated. Also I am surprised I never got that issue. I suppose the xml usually come ordered. you must have encountered some special case to have that issue, maybe even a buggy xml
I use UAModeler to create the models I use. I think it really is a matter of alphabetic order. When I look on the generated .xml file from UAModeler the DataTypes are somewhat sorted alphabetically.
also this is fixingan older version of protocl, newer versions do not use these xml nodes, they use the DataTypeDefiniont attributes
Yeah, fair enough. I think the load_data_type_definitions
is currently working correctly.