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.
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 fromdotnet ws
. 2) When the project is already boosted.To handle a parallel recompilation request, in the first case,
dotnet ws
needs to "tag" eachdotnet build
process that it spawns in a way that can be queried quickly by a newdotnet ws
instance to find out if a given project is being compiled or not. If so, the newdotnet 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.