xtask: fix interplay between fmt-on-save and xsync #925
+48
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing the underlying issue from #914
This PR does a few things:
xtask-path
logic has been fixed to always drop the file undertarget/xtask-path
, regardless of whether a--custom-root
is being used or not.--run-on-save
parameter has been added toxtask
, which can be used to skip certain expensive checks when runningxtask
in response to a file save event. It is not currently being used by the open-sourcextask
, but plays an important role in the internal repo'sxtask fmt
implementation.These changes are not particularly interesting in isolation, but make more sense when reviewed alongside the changes being made in the internal repo.
The fact we have this sort of coupling between the oss xtask and the closed-source xtask is unfortunate, and something we should try and move away from in the future...