Classes in shared depend upon server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MUGLE |
Fix Released
|
Critical
|
Prageeth Silva |
Bug Description
In the data-wrapper branch, the client-side build is not compiling, because some classes in 'shared' are depending upon classes in 'server'.
(On the command-line build, note that it doesn't come up if you write "ant javac" -- that is, compiling the server-side code only -- it's only an error if you run "ant" -- compile both the client and server-side code -- or actually run the dev server.)
mugle.shared cannot import anything from mugle.server, because when you compile the client code, you only compile mugle.client and mugle.shared.
That DevTeamExists is in mugle.shared implies that the exception can be constructed on either the client or server side, which is impossible for the client to do since it doesn't have access to the DevTeam class.
It looks like DevTeamExists only uses the DevTeam to get the urlname out. Therefore, an easy fix would be to modify DevTeamExists to accept a urlname rather than a whole DevTeam object:
public DevTeamExists(
}
But before making that change, we need to ask: Does DevTeamExists need to be in 'shared', or is it just a server-side thing? I suppose the point is that only the server will construct this exception object, but it can propagate up to the client, and therefore it has to be in shared? In which case, I would recommend the above fix. I assume all the other exceptions can have similar fixes.
Changed in mugle: | |
status: | Fix Committed → Fix Released |
De-assigning myself. If anyone else gets to it first, do so.