keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
381 stars 106 forks source link

refactor(developer): eliminate `CompilerCallbacks.fs` and `CompilerCallbacks.path` #10205

Open mcdurdin opened 6 months ago

mcdurdin commented 6 months ago

The CompilerCallbacks.fs and CompilerCallbacks.path members were added as a stepping stone patch to make it easy to get the compilers completed. Now that the compilers are functionally complete, we should go back and remove these, and implement the required functions as top-level callback functions.

fs

The fs members used are:

These two are used only in KeymanDeveloperProject.populateFiles():

path

The path members used are:

Suggested resolution for path is a reimplementation (or copy) of the required functions, because they are relatively straightforward, possibly starting with https://github.com/browserify/path-browserify/blob/master/index.js and https://github.com/nodejs/node/blob/main/lib/path.js, and where possible (e.g. extname) just using regex as we do elsewhere.

mcdurdin commented 6 months ago

Blocks #10207.

mcdurdin commented 6 months ago

Relates to #9473