![]() ![]() If package A's dependency is B, the OHASH of B from its.ctsc.hash file is inserted into the output, containing the OHASH - a hash computed from all the outout. When ctsc is used to build the package B for the first time, a.ctsc calculates two types of hash: input files hash IHASH, and output (type) hash, OHASH.Tests, etc) so we believe these limitations are ok. Most monorepo projects already specify an outDir as build and include directories (e.g. This limitation mayĪlso be removable in the future if we decide to add a filter on the files to use when calculating it requires the include setting, so it can more easily read all the inputs.Limitation may be removable in the future if we decide to add a filter of the files to copy, as wellĪs use a better copying solution such as rsync or cpx (slow) it requires the outDir setting, so it can more easily cache the output directory properly.This means it cannot be used to speed up compilation in CI by having a shared cache directory containing most of the unchanged modules, precompiled.Ĭtsc has a different set of limitations, which are somewhat less restrictive: it only reuses files found in the local directory.it requires you to specify the dependant projects, even though they can be read from package.json.This means that the toplevel application packages cannot easily be included in the project mode and have to be compiled separately. it requires that all modules compile with declarations.With the introduction of project mode, local caching was added, however, it has 3 significant restrictions: The next time the compiler is invoked for a particular module, the cached output will be re-used if all the inputs are the same (checked with git hash-object, sha1). ![]() It will store the compiled files in a cache directory at $CTSC_CACHE_DIR (default to /tmp/ctsc). This acts as a drop-in replacement for TypeScript's own tsc. Alternatively, use turborepo which has pretty good caching for any sort of command: ctscĮxperimental caching TypeScript compiler suitable for monorepos and CI. Please use tsc project mode - it should now be mature enough to work well in most situations. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |