kaleidawave / ezno

A JavaScript compiler and TypeScript checker written in Rust with a focus on static analysis and runtime performance
https://kaleidawave.github.io/posts/introducing-ezno/
MIT License
2.44k stars 45 forks source link

Multiple files as entry point #81

Closed kaleidawave closed 3 months ago

kaleidawave commented 10 months ago

Update: after #102 have added multiple entry points to the checker. However it is not fully wired up to Ezno's CLI with:

https://github.com/kaleidawave/ezno/blob/1aa77e2aabb9533fb4fe90fa1ac9aaa24136256b/src/cli.rs#L170-L172

The next part (that you can contribute to):

Note I have not checked side-effect edge cases in #102


Currently there is only one entry path. OP wants to check all files in the directory. Note each entry point also type checks its imports, so this isn't necessary for checking imports and exports.

image

Rather than running entry_points.for_each(|path| check_project(path, ...)) this needs to be built into the internal ModuleData. So it should be callable as check_project(vec![...]).

Things to think about

Discussed in https://github.com/kaleidawave/ezno/discussions/80

Originally posted by **o-az** November 11, 2023 How can I run `oxidation-compiler` to typecheck multiple files by passing a glob string / directory path? Works: ```ts npx oxidation-compiler@latest check src/file.tsx ``` None of these commands check all files: ```ts npx oxidation-compiler@latest check src/*.tsx ``` ```ts npx oxidation-compiler@latest check src/ ``` ```ts npx oxidation-compiler@latest check src/* ``` ![CleanShot 2023-11-11 at 10 48 53@2x](https://github.com/kaleidawave/ezno/assets/23618431/be44ae4c-5687-4f07-8af1-32807191aec2)
kaleidawave commented 9 months ago

Half of this is implemented in #102. Have updated issue body if anyone is interested in wiring up the second half ☝️

kaleidawave commented 3 months ago

Implemented in #155