Skip to content

Big refactor to use coroutines across the codebase#106

Merged
ryan-rushton merged 3 commits intomainfrom
2025-updates-remove-background-task-queue
Jun 28, 2025
Merged

Big refactor to use coroutines across the codebase#106
ryan-rushton merged 3 commits intomainfrom
2025-updates-remove-background-task-queue

Conversation

@ryan-rushton
Copy link
Copy Markdown
Collaborator

@ryan-rushton ryan-rushton commented May 11, 2025

Overview

This is a big refactor to simplify the codebase and utilise coroutines opposed to threads, processes, futures and callbacks.

It also adds a lot of tests that were previously missing.

@ryan-rushton ryan-rushton force-pushed the 2025-updates-remove-background-task-queue branch from fd6013e to b6bb5c5 Compare June 21, 2025 01:17
@ryan-rushton ryan-rushton changed the title Update deps now 2025 is out and remove deprecated class usage. Big refactor to use coroutines across the codebase + dependency update Jun 21, 2025
Comment on lines +252 to +300
if (isInitialized.get() || isRestarting.get()) {
return // Already initialized or in progress
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Probably don't want this. The queue should ensure that duplicated tasks are not queued. I need to review this manually.

@ryan-rushton ryan-rushton force-pushed the 2025-updates-remove-background-task-queue branch 2 times, most recently from 5ff5300 to 6b50c93 Compare June 26, 2025 12:23
Comment on lines +153 to +155
// In most cases for typical code files, byte offset == character index
// But for files with multi-byte characters, we need proper conversion
return minOf(byteOffset, text.length)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This isn't correct

@ryan-rushton ryan-rushton force-pushed the 2025-updates-remove-background-task-queue branch from fa2ebe5 to d5033e8 Compare June 26, 2025 13:39
Add progress

Actually make it work with claude

fmt

Update docs and clenaup unused methods

Add tests and some other updates

More updates

fmt

Update lowst IJ version

Update listeners to coroutines

More cleanup and fix issue with tasks not being removed from the queue

Add tests for success cleanup

Move to coroutines for the process

Method rename

Logging

Set beta version

Cleanup formatter service.

Replace pending messages with message channel

Cleanup

Remove formatter service callbacks

Clean up future usage in formatting task

Cleanup error name

fmt

Set up persisted state abstraction

Split up editor service

Apply suggestions from code review

fix

Move null service handling to manager

Some cleanup

Formatting

Fix issue with cache prime failing due to inistialisation not being finished yet.

Fix buffer issue

version bump

Fix some cache timing issues

Simplify

Apply suggestions from code review

Cleanup dprint service a bit

doc changes

Update CHANGELOG.md

Update CHANGELOG.md

Bump beta version

Remove range formatting

More range cleanup

Add back range stuff

More reimplmenting the range buisness

Some error handling

Fix up git ignore

Cleanup verbose errors

Cleanup incorrect conversion

Improve config file discovery

Add reset settings button

Update i18n

Add lifecycle manager

Add tool window icons
@ryan-rushton ryan-rushton force-pushed the 2025-updates-remove-background-task-queue branch from 507dca8 to 0e9bdc5 Compare June 28, 2025 12:17
@ryan-rushton ryan-rushton changed the title Big refactor to use coroutines across the codebase + dependency update Big refactor to use coroutines across the codebase Jun 28, 2025
@ryan-rushton ryan-rushton merged commit 1a218e0 into main Jun 28, 2025
4 checks passed
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.

1 participant