zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.12k stars 3.07k forks source link

A setting to turn off atomic save #12464

Open LoganDark opened 5 months ago

LoganDark commented 5 months ago

Check for existing issues

Describe the feature

Parcel HMR doesn't support atomic writes

Writing to any file in the project causes the entire app to rebuild from scratch and then reload the entire page

IntelliJ doesn't cause this problem

If applicable, add mockups / screenshots to help present your vision of the feature

No response

LoganDark commented 5 months ago

actually, it looks like regular writes are what are being used here

https://github.com/zed-industries/zed/blob/be2df79d5caf8db7252d8843b83ad218b616b63f/crates/editor/src/items.rs#L718

https://github.com/zed-industries/zed/blob/be2df79d5caf8db7252d8843b83ad218b616b63f/crates/worktree/src/worktree.rs#L1225

https://github.com/zed-industries/zed/blob/be2df79d5caf8db7252d8843b83ad218b616b63f/crates/worktree/src/worktree.rs#L1371

https://github.com/zed-industries/zed/blob/be2df79d5caf8db7252d8843b83ad218b616b63f/crates/fs/src/fs.rs#L333-L338

not sure what is going on here, then