Skip to content
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

Running Task commands, will delete comments from tasks.json file #105885

Closed
elahehrashedi opened this issue Sep 1, 2020 · 5 comments
Closed

Running Task commands, will delete comments from tasks.json file #105885

elahehrashedi opened this issue Sep 1, 2020 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@elahehrashedi
Copy link

elahehrashedi commented Sep 1, 2020

  • VSCode Version: 1.48.2 and 1.49.0-insider
  • OS Version: Win64

Steps to Reproduce:

  1. configure a few tasks in tasks.json file.
  2. add some comments to the tasks.json file.
  3. Run "Tasks: Configure default build task"
  4. Change the default task
  5. Now you will see that the comments are removed from tasks.json file.

The same issue will happen when running any Tasks command that needs to modify the tasks.json file (e.g. "Task: configure task", ...)

@sean-mcmanus
Copy link
Contributor

Looks like a duplicate of #29453

@elahehrashedi
Copy link
Author

@sean-mcmanus Should I close this?

We solved this issue in C/C++ extension by using the comment-json library.

@sean-mcmanus
Copy link
Contributor

Yeah, you could close it. I think the VS Code team would close it as a duplicate.

@alexr00
Copy link
Member

alexr00 commented Sep 2, 2020

@sean-mcmanus thanks for pointing out the duplicate. It is indeed a duplicate of #29453.

@alexr00 alexr00 closed this as completed Sep 2, 2020
@alexr00 alexr00 added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants