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
47.67k stars 2.79k forks source link

local tasks are lost after restart when `.zed/` in `.gitignore` #9747

Open ZombieHarvester opened 6 months ago

ZombieHarvester commented 6 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

when .zed/ is in .gitignore:

  1. Local tasks are not accessible after restart via hot keys even though .zed/tasks.json still has tasks info.
  2. .zed/tasks.json becomes empty after running zed: open local tasks after restart.

Steps to reproduce:

  1. create local tasks
  2. add .zed/ to .gitignore
  3. check that tasks.json is not empty
> cat .zed/tasks.json
[
  {
    "label": "All tests",
    "command": "rspec",
    ...
  1. shit-option-t opens list of local tasks
  2. close tasks.json tab
  3. reload zed
  4. shit-option-t now opens empty list
  5. but cat .zed/tasks.json still shows tasks
  6. run zed: open local tasks
  7. see tab with default task blueprint
// Static tasks configuration.
//
// Example:
[
  {
    "label": "Example task",
    ...
  1. check that tasks.json is now empty
> cat .zed/tasks.json
>

If you keep tasks.json file open in a tab or when .zed/ is removed from .gitignore, then tasks.json doesn't get erased after restart.

Environment

Zed: v0.128.1 (Zed Preview) OS: macOS 12.7.4 Memory: 16 GiB Architecture: x86_64

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

No response

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

No response

osiewicz commented 6 months ago

This most likely applies to other zed files like settings and keymaps too.

github-actions[bot] commented 5 days 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!