gulachek / esmakefile

Make based build system in JavaScript
MIT License
0 stars 0 forks source link

post reqs should only track source file changes #24

Closed gulachek closed 1 month ago

gulachek commented 8 months ago

There can be a lot of non local system files automatically tracked in c++ headers, even when using user headers. Consider the trade-off of ignoring non source files given as post reqs in esmakefile vs forcing consumer to do so

gulachek commented 1 month ago

Seems unlikely during development that external files are going to be updated nearly as much as src files. I lean towards the trade off of simpler/faster builds outweighing the occasional manual rebuild when an external file updates.

gulachek commented 1 month ago

I have a better plan for now that's not a breaking change. Do #49 and also cache external files. This never gets invalidated in watch mode, and watch mode only watches the source directory. This way a fresh build process will still go through the work of doing the "most correct" option of checking external dependencies. But it can also be mitigated for watch mode for fewer filesystem calls. It's also closer to canonical make depfile usage where make doesn't care where a file is located.