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

ScalafmtRunner: use separate execution contexts #4824

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

kitbellew
Copy link
Collaborator

@kitbellew kitbellew commented Feb 17, 2025

  • in both core and dynamic runners, reading and writing is done the same way, with the only difference being formatting; hence, let's move I/O to shared runner
  • to avoid reading all files first and only then formatting and writing them, let's create separate input and output execution contexts and use the former for reading and formatting, and the latter for writing
  • finally, let's define parasitic execution context (one which executes immediately, without putting the task in a queue), for short tasks such as triggering .onComplete or updating task progress

- in both core and dynamic runners, reading and writing is done the same
  way, with the only difference being formatting; hence, let's move I/O
  to shared runner
- to avoid reading all files first and only then formatting and writing
  them, let's create separate input and output execution contexts and
  use the former for reading and formatting, and the latter for writing
- finally, let's define parasitic execution context (one which executes
  immediately, without putting the task in a queue), for short tasks
  such as triggering `.onComplete` or updating task progress
@kitbellew kitbellew merged commit c2e993d into scalameta:main Feb 18, 2025
32 checks passed
@kitbellew kitbellew deleted the 4824 branch February 18, 2025 12:29
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.

2 participants