-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
collab: Fix project sharing between Windows and Unix #23680
base: main
Are you sure you want to change the base?
Conversation
ee0a32b
to
4db70da
Compare
49e888e
to
5acb628
Compare
78ecf89
to
2119a7c
Compare
|
This is so strange. When I run Zed manually by setting the It's |
This seems very strange, ZED_STATELESS should only affect the sqlite db we use to save your application state. Any theories for why it's messing up the host? |
I have no clue about why setting |
I can reproduce this with both A and B are on the same mac. In a new terminal, set the following for A: export ZED_IMPERSONATE="as-cii"
export ZED_SERVER_URL="http://127.0.0.1:3000"
export ZED_RPC_URL="http://127.0.0.1:8080/rpc"
export ZED_ADMIN_API_TOKEN="secret"
export ZED_CLIENT_CHECKSUM_SEED="development-checksum-seed"
export ZED_STATELESS="1" // Key setting Then In a new terminal: export ZED_IMPERSONATE="nathansobo"
export ZED_SERVER_URL="http://127.0.0.1:3000"
export ZED_RPC_URL="http://127.0.0.1:8080/rpc"
export ZED_ADMIN_API_TOKEN="secret"
export ZED_CLIENT_CHECKSUM_SEED="development-checksum-seed"
export ZED_STATELESS="" // Dose not matter Then
|
crates/collab/src/db.rs
Outdated
@@ -688,6 +688,9 @@ impl RejoinedProject { | |||
#[derive(Debug)] | |||
pub struct RejoinedWorktree { | |||
pub id: u64, | |||
/// NOTE: | |||
/// Use PathBuf::to_proto() and PathBuf::from_proto() to convert between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these comments are a good idea, but I don't think they provide much benefit in the end. Let's remove everything with NOTE:
, and similar comments, in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As well as all of the // path
, and other such comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed all the comments, but I'm not sure how we can ensure that other developers use the relevant functions correctly. After all, Zed is an open-source project, and some contributors may not be aware of this, potentially leading them to mistakenly use to_string_lossy().to_string()
, which could result in hard-to-detect bugs.
Also, it would be nice to figure out why |
Actually, my thinking is that this setup works quite well as it is. Currently, the Windows path |
f3ef8c8
to
828b1d6
Compare
Closes #14258
Windows user(host) sharing a project to a guest(using macOS), and host follows guest:
Screen.Recording.2025-02-07.004405.mp4
macOS user(host) sharing a project to a guest(using Windows), and host follows guest:
2025-02-07.00.46.55.mov
macOS user edits files in a windows project through collab:
2025-02-07.00.57.36.mov
Release Notes: