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
48.03k stars 2.84k forks source link

Renaming of root folder has no effect #7923

Open Moshyfawn opened 7 months ago

Moshyfawn commented 7 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

There is an option to rename the root workspace folder, but submitting doesn't have any effect on the name. I'm not sure if it's supposed to work, or if there just shouldn't be an option.

Environment

Zed: v0.123.1 (Zed Preview) OS: macOS 14.2.1 Memory: 16 GiB Architecture: aarch64

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

https://github.com/zed-industries/zed/assets/16290753/0ac7f15c-d014-4f21-89bc-2dedf038dab2

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

2024-02-16T13:31:10-05:00 [ERROR] crates/project_panel/src/project_panel.rs:577: Invalid argument (os error 22)
valentinegb commented 7 months ago

It may be because the path property for the root directory's Entry in the rename function here:

https://github.com/zed-industries/zed/blob/1c361ac579b435cbe9d3d90734cf32d30af94d5d/crates/project_panel/src/project_panel.rs#L752

is empty. Maybe it should be "." or "../{dir_name}" instead?

Just did a little bit of debugging on this, I'm not sure where the code that sets the path property is currently.

JeetChhatrala commented 7 months ago

version: Zed 0.122.2 (Stable) Macbook Pro M2 Pro 16GB

Facing a similar issue when renaming a folder (does not matter root or not). When i try to make first character of folder name as capital or small (different from currently saved). it just does not update it.

https://github.com/zed-industries/zed/assets/75415216/d0f36a60-943f-4c42-848e-9290c502557b

And when i try to rename it via finder, it create two copy of preview in Zed. Which goes away if i just restart Zed.

https://github.com/zed-industries/zed/assets/75415216/d0708833-46a2-48ed-a478-eb050cd51052

commenting here because i think the module and domain are same here. please tell me if new issue creation is required.

github-actions[bot] commented 1 week ago

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. Are you able to reproduce this issue in the latest version of Zed? If so, please let us know by commenting on this issue and we will keep it open; otherwise, we'll close it in a week. Feel free to open a new issue if you're seeing this message after the issue has been closed. Thanks for your help!

JosephTLyons commented 1 week ago

Still valid - only now - the error is surfaced in the toast:

SCR-20240926-nxwp
axoking commented 1 week ago

For me, the same error happens when renaming the root project

Bildschirmfoto 2024-09-28 um 16 54 27

Also it seems like Zed is not trying to rename the root folder, but to create a new folder in the root folder

So instead of moving /Users/tom/test/hallo to /Users/tom/test/hello, it moves to /Users/tom/test/hallo/hello.

I'm using the latest version of Zed