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

xtask: fix interplay between fmt-on-save and xsync #925

Merged

Conversation

daprilik
Copy link
Contributor

@daprilik daprilik commented Feb 27, 2025

Fixing the underlying issue from #914

This PR does a few things:

  1. The xtask-path logic has been fixed to always drop the file under target/xtask-path, regardless of whether a --custom-root is being used or not.
  2. A new --run-on-save parameter has been added to xtask, which can be used to skip certain expensive checks when running xtask in response to a file save event. It is not currently being used by the open-source xtask, but plays an important role in the internal repo's xtask fmt implementation.
  3. Updates the Guide to make it more clear why one may or may not want to opt into this functionality.

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...

@daprilik daprilik requested a review from a team as a code owner February 27, 2025 22:37
@github-actions github-actions bot added the Guide label Feb 27, 2025
@jstarks
Copy link
Member

jstarks commented Feb 27, 2025

Thanks for the fixes and particularly for the guide clarifications.

@daprilik daprilik merged commit da10c76 into microsoft:main Feb 27, 2025
26 checks passed
@daprilik daprilik deleted the user/daprilik/xtask-fmt-on-save-fixups branch February 28, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants