-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to have multiple tsc jobs running / watching for mono rep… #46
add ability to have multiple tsc jobs running / watching for mono rep… #46
Conversation
…o setups Author: Ben Feldberg Collins <[email protected]>
Does this have any impact on users who don't enable the |
Behaviour will not change for non watch users. It will still find the closest tsconfig when :TSC is run. I like the idea of having this able to find all tsconfig files. As it could then run the job for each file found. Would you want this to work for watch and non watch? So run :TSC in the root of a monorepo it should run for all tsconfigs no matter whether the watch flag is passed? |
Yeah I think that would be desirable behavior, maybe we use a |
Unfortunately tsc cli doesn't handle mono repos natively, suggested and rejected a few years ago. I do have a solution in the works, I'll get this working then make sure it can be put behind a flag. It will automatically find your tsconfigs and run a process per. I need to do some benchmarking on larger codebases to validate this not being too heavy but as they run in separate processes I don't think it will be much more overhead than running one. I'll get it committed as soon as I can. |
Thanks @benfc1993, super appreciate your thought, time, and contributions 💜🙏 |
Okay so old behaviour is completely maintained, the new mono repo behaviour is behind the
Let me know 👍 |
Will take a look tonight or first thing tomorrow morning! Thanks for the being so thorough and detailed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you so much @benfc1993 - can I buy you a coffee (venmo or something similar?0
I already have the best benefit of this great plugin. Thank you for all your work on making it to begin with. |
This allows for multiple watch processes to be running simultaniously.
It will only run one per tsconfig project. This will allow for mono repo projects to use watch across all sub repos. This does not change any existing functionality.
running TSC in an open buffer will find the nearest tsconfig file upwards. and if there is no process currently running against that project it will start one and log the job id. This can then be checked against on subsequent attempts to run tsc if it is in watch modAe.
I have also added a :TSCStop usrcmd to allow stopping all watching processes.