Closed adamkewley closed 5 months ago
Need to check what's the deal with MacOS/Ubuntu
@nickbianco this is ready for review if you're willing!
The function was moved to Component.h
, because I noticed that other component-dependent templated functions for Socket<T>
appear there. A test (for the failing behavior) was also commented out (because it's not longer a strictly failing case, but a slow one).
Hopefully, this relaxation of the connection finalization behavior is acceptable? I think there's some (reasonable) debate over whether it should be allowed (because it may encourage people to skip finalizing connections), but the counterpoint is that any code that (e.g.) calls buildSystem
will be finalized anyway.
Fixes an issue I'm having with
SocketDefinedFrame
s implementation (upcoming PR).Effectively, the bug is that:
finalizeConnections
in order to ensure that the socket pointers are baked into the socket'scomponentPath
propertyfinalizeConnections
on those copiesfinalizeConnections
has very specific semantics that don't work once you have components in the model graph (e.g. custom frames) that depend on components that aren't in the model graph (e.g.Station
s):Model
's socket connections (non-recursive)frame.finalizeConnections(model)
So, in the edge-case that you:
StationDefinedFrame
)SOCKET
s (e.g.Station
s somewhere else in the hierarchy)finalizeConnections
on the component requires pulling information from those dependencies via those sockets (e.g. callingfinalizeConnections
on aStationDefinedFrame
may want to query theStation
s for body-fixed positions, base frame, etc.)The solution is PRed, and it effectively relaxes sockets such that they work fine even if you don't call
finalizeConnection
on them. This effectively downgradesfinalizeConnection
from "hard requirement for using a socket" to "performance-enhancing requirement".Brief summary of changes
Socket::getConnectee
work, even iffinalizeConnection
hasn't been called on it yetTesting I've completed
finalizeConnection
. This test was commented out because that isn't a strictly required behavior (it's a desirable one, for perf reasons, but it isn't a hard requirement)Looking for feedback on...
CHANGELOG.md (choose one)
This change is![Reviewable](https://reviewable.io/review_button.svg)