You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to build Panda without networking code. However, this causes a bunch of classes to go missing from panda3d.core, causing various imports within direct to stop working. It's not at all obvious to figure out which code depends on net classes and which code doesn't.
I think the networking code should be in a separate panda3d.net module so that it's obvious when something relies on net code, and results in less cryptic import errors. This additional modularity would mean that it can be trivially detected whether net code is used and it can be easily removed at deployment if it is not used.
This would unfortunately be a breaking change. But it is a fairly easy one to work around.
I would suggest 1.11 to be a transition release where the classes are defined in both panda3d.net and panda3d.core, and removing them from panda3d.core in the release after that.
For what it's worth, I ran into this when building for web, where the networking code is compiled out entirely (since raw sockets aren't available on the web). In other situations we tend to create stub versions of classes that do nothing but this would be impractical for the networking classes.
The text was updated successfully, but these errors were encountered:
Yes, any projects that use the ConnectionReader/Writer, NetDatagram, socket etc classes will ultimately need to import those from panda3d.net instead of panda3d.core, though not yet in 1.11, possibly 1.12 or 2.0.
If you think the code or docs for the classes inside the net/nativenet directories are unusable, please file separate issues detailing your complaints with them.
See panda3d#1466 - these classes are still part of panda3d.core as of 1.11, but they should really be imported from panda3d.net (they can be imported from either place in 1.11). A future release will remove them from panda3d.core entirely.
See #1466 - these classes are still part of panda3d.core as of 1.11, but they should really be imported from panda3d.net (they can be imported from either place in 1.11). A future release will remove them from panda3d.core entirely.
It's possible to build Panda without networking code. However, this causes a bunch of classes to go missing from panda3d.core, causing various imports within direct to stop working. It's not at all obvious to figure out which code depends on net classes and which code doesn't.
I think the networking code should be in a separate panda3d.net module so that it's obvious when something relies on net code, and results in less cryptic import errors. This additional modularity would mean that it can be trivially detected whether net code is used and it can be easily removed at deployment if it is not used.
This would unfortunately be a breaking change. But it is a fairly easy one to work around.
I would suggest 1.11 to be a transition release where the classes are defined in both panda3d.net and panda3d.core, and removing them from panda3d.core in the release after that.
For what it's worth, I ran into this when building for web, where the networking code is compiled out entirely (since raw sockets aren't available on the web). In other situations we tend to create stub versions of classes that do nothing but this would be impractical for the networking classes.
The text was updated successfully, but these errors were encountered: