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

fix: auto-save race condition #26

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

victor-teles
Copy link
Contributor

@victor-teles victor-teles commented Jan 12, 2024

Summary

This PR fixes #21

The problem was happening because the file changes are not written to the disk before executing the next save action.

@victor-teles victor-teles changed the title fix: execution order fix: auto-save race condition Jan 12, 2024
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to swap the actions: first the lint fixes, then the formatting. That's what we do in biome check.

Lint actions might emit code that is not well formatted

@victor-teles
Copy link
Contributor Author

victor-teles commented Jan 13, 2024

@ematipico The current order is: safe fixes -> unsafe fixes -> formatting
The order is set in plugin.xml (line 40 if you want to check)

@victor-teles victor-teles merged commit 7d5742f into biomejs:main Jan 13, 2024
1 check passed
@victor-teles victor-teles deleted the fix/execution-order branch January 13, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combination of "run format on save" and "run safe fixes on save" does not work (race condition)
2 participants