Move initialization from Master.onSync()#1099
Move initialization from Master.onSync()#1099radl97 wants to merge 1 commit intoboardgameio:mainfrom
Conversation
|
Hi, I converted this PR to Draft until you finish having the tests passing. This is in order for us to keep it organized, I want to make sure all PRs that are ready to be reviewed to be done so quickly :). |
|
Hi! As I've mentioned, tests failing is not an issue (I could delete them, so it is visible :D ). Tests depend on an (I think) internal feature. I wanted to ask how should I go about fianalizing the PR. Which tests functionality with external visibility? There are many-many tests broken like this, but some of them only because the tests in the setup phase do not get initialized. Can you help me with this issue? |
|
Sorry, we dont delete tests, it is expected that you figure out the tests for any change you make. If you want to ask more specific questions about a specific functionality, I am happy to help, but I don't have the time to debug everything for you. |
NOTE: Tests fail. This could be an issue, but the "attached" code might help understand an issue.
I have tried to complete a TODO, basically extract this code:
However:
onSynccall, and I have failed to extract it fromonSyncto callers, asTransportshould not know much about the game logic.Why
boardgame.io/servercode (aroundcreateMatch), which broke theboardgame.io/mastercode (due to this code sample), which broke client-only functionalities (Local bot games). This propagation is silly, hence I wanted to move out server dependencies.I think that this dependency cycle is unhealthy. I tried fixing the issue (removing server code from the client), but this is only a work-around. Any question, help or feedback is appreciated.