Skip to content
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

Cancel a compilation process if a new one needs to be started #24

Open
granicz opened this issue Oct 5, 2023 · 1 comment
Open

Cancel a compilation process if a new one needs to be started #24

granicz opened this issue Oct 5, 2023 · 1 comment
Assignees
Labels
0.1.16 enhancement New feature or request
Projects

Comments

@granicz
Copy link
Member

granicz commented Oct 5, 2023

In watch mode (#22), changing a source file could result in recompilation with the earlier attempt still running. This can arise in two separate situations:

  1. When there is no booster instance for the given project (yet, or deliberately by turning the booster off), and an ordinary dotnet build was triggered from dotnet ws.
  2. When the project is already boosted.

To handle a parallel recompilation request, in the first case, dotnet ws needs to "tag" each dotnet build process that it spawns in a way that can be queried quickly by a new dotnet ws instance to find out if a given project is being compiled or not. If so, the new dotnet ws instance can kill that process first before dispatching a new compilation session(*).

In the second case, the Booster needs to be able to terminate a compilation session if it receives a new message to compile the same project and there is already a compilation session in progress.

(*) It would be lovely to use process groups, but short of messing with OS-specific implementations, we can just use a [ws-{hash}] prefix for the title of the process, where {hash} is the hash of the full-path of the project file behind the project compiled.

@granicz granicz added the enhancement New feature or request label Oct 5, 2023
@granicz granicz added this to v7.0 in Releases Oct 5, 2023
Jooseppi12 added a commit that referenced this issue Oct 6, 2023
@Jooseppi12 Jooseppi12 added 0.1.16 and removed 0.1.5 labels Oct 25, 2023
@Jooseppi12
Copy link
Member

As of 0.1.16 1) is done, but 2) still needs to be implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.1.16 enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants