Commit graph

7 commits

Author SHA1 Message Date
Skyler Hawthorne
83b6042b97 fix(write): do not set new path on document until write succeeds
If a document is written with a new path, currently, in the event that
the write fails, the document still gets its path changed. This fixes
it so that the path is not updated unless the write succeeds.
2022-10-18 22:31:38 -04:00
Skyler Hawthorne
d706194597 chore(write): serialize write operations within a Document
The way that document writes are handled are by submitting them to the
async job pool, which are all executed opportunistically out of order. It
was discovered that this can lead to write inconsistencies when there
are multiple writes to the same file in quick succession.

This seeks to fix this problem by removing document writes from the
general pool of jobs and into its own specialized event. Now when a
user submits a write with one of the write commands, a request is simply
queued up in a new mpsc channel that each Document makes to handle its own
writes. This way, if multiple writes are submitted on the same document,
they are executed in order, while still allowing concurrent writes for
different documents.
2022-10-18 22:31:38 -04:00
Skyler Hawthorne
5f7c247430 replace phrase in tests 2022-06-19 00:00:31 -04:00
Skyler Hawthorne
665286c199 factor new Application with file arg to function 2022-06-19 00:00:31 -04:00
Skyler Hawthorne
fac36bc5ea add test for write-quit happy path 2022-06-18 23:57:47 -04:00
Skyler Hawthorne
374724f5ac ignore failing write path tests until fixes are merged 2022-06-18 23:57:47 -04:00
Skyler Hawthorne
8d8d389536 rename top level module to satisfy cargo fmt 2022-06-18 23:57:47 -04:00
Renamed from helix-term/tests/integration/write.rs (Browse further)