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

keymaps: 'Open Keyboard Shortcuts in JSON' command should create file if it does not exist #8301

Closed
vince-fugnitto opened this issue Aug 4, 2020 · 4 comments · Fixed by #8313
Assignees
Labels
filesystem issues related to the filesystem help wanted issues meant to be picked up, require help keybindings issues related to keybindings

Comments

@vince-fugnitto
Copy link
Member

Bug Description:

The command Open Keyboard Shortcuts in JSON should create the keymaps.json file if it does not exist instead of throwing an error:

monaco-editor-provider.js:203 Uncaught (in promise) Error: 'user_storage:/keymaps.json' is invalid
    at MonacoEditorProvider.<anonymous> (monaco-editor-provider.js:203)
    at step (monaco-editor-provider.js:71)
    at Object.next (monaco-editor-provider.js:52)
    at fulfilled (monaco-editor-provider.js:43)

Steps to Reproduce:

  1. make sure that the keymaps.json file does not exist (ex: rm -rf ~/.theia)
  2. open the keyboard shortcuts view, and attempt to open the keymaps.json with the toolbar item ({ })
  3. the error is thrown

bug

@vince-fugnitto vince-fugnitto added help wanted issues meant to be picked up, require help keybindings issues related to keybindings labels Aug 4, 2020
@akosyakov
Copy link
Member

New fs API regression? Could you check how it works before? If it is used to please assign to me.

@vince-fugnitto
Copy link
Member Author

New fs API regression? Could you check how it works before? If it is used to please assign to me.

I also noticed regressions with actually using the widget to write keymaps updates.
I'm rebuilding at the moment to confirm this regression as well.

@vince-fugnitto
Copy link
Member Author

The keymaps.json file is created in v1.4.0, I believe it is a regression.

@akosyakov akosyakov added the filesystem issues related to the filesystem label Aug 4, 2020
@akosyakov akosyakov self-assigned this Aug 4, 2020
@akosyakov
Copy link
Member

We replaced UserStorageResoure with UserStorageFileSystemProvider. There was a bug in UserStorageResource that it won't throw not found exception if file does not exist and clients don't handle it well. With UserStorageFileSystemProvider exception is thrown properly. We have to adjust clients to respect it.

akosyakov added a commit that referenced this issue Aug 5, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Aug 5, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Aug 6, 2020
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filesystem issues related to the filesystem help wanted issues meant to be picked up, require help keybindings issues related to keybindings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants