pokemon-showdown-client icon indicating copy to clipboard operation
pokemon-showdown-client copied to clipboard

Improve the build process to make iterative development easier

Open scheibo opened this issue 6 years ago • 5 comments

You can make and test client changes simply by building after each change

I think there is room to improve the client build process to make it a little faster/more ergonomic. I don't think we can/should switch the client from babel to sucrase like the server because the client depends on a number of plugins which sucrase by design will not support, but I think restructuring our build process to support some sort of '--watch' mode (to at least support interactive edits to src/) and highlighting it in our README.md would make things easier for new developers.

scheibo avatar Mar 14 '19 16:03 scheibo

Typescript incremental builds in 3.4 might help with this.

Also, node build full seems broken, as reported in chat:

C:\Users\feeds\Desktop\Pokemon-Showdown-Client>node build full
Cloning into 'Pokemon-Showdown'...
Checking out files: 100% (391/391), done.
Syncing data from Git repository... DONE
internal/modules/cjs/loader.js:582
    throw err;
    ^

Error: Cannot find module '../data/Pokemon-Showdown/.sim-dist/dex'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\feeds\Desktop\Pokemon-Showdown-Client\build-tools\build-indexes:21:13)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
child_process.js:651
    throw err;
    ^

Error: Command failed: node ./build-tools/build-indexes
    at checkExecSyncError (child_process.js:611:11)
    at execSync (child_process.js:648:13)
    at Object.<anonymous> (C:\Users\feeds\Desktop\Pokemon-Showdown-Client\build:36:2)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)

scheibo avatar Mar 18 '19 20:03 scheibo

Yes, it's not wired up to the new sim build system yet. Feel free to fix or I'll get around to it eventually.

Zarel avatar Mar 19 '19 02:03 Zarel

I filed this bug because it came up in PMs/chat and I wanted to track it as a known issue to point people to. I don't have plans to fix it myself currently, but if I start developing on the client eventually and it starts bugging me in the future I'd look into it.

scheibo avatar Mar 19 '19 16:03 scheibo

--watch seems incompatible with the custom things we do post-build...

Zarel avatar Mar 19 '19 16:03 Zarel

for the node build full issue: https://github.com/Zarel/Pokemon-Showdown-Client/pull/1262

yuzeh avatar Apr 02 '19 13:04 yuzeh