Open phoenixeliot opened 2 years ago
yes I can indeed reproduce this issue, however, it turns out that this is a known issue within vscode because it does not support case sensitivity for macOS: microsoft/vscode#94307
I know, hard to believe... feel free to add your voice there. I am afraid we won't be able to address this use case until vscode fixes the issue above.
Environment
vscode-jest version
: 4.2.1node -v
: v14.17.5npm -v
oryarn --version
: yarn 1.22.5npm ls jest
ornpm ls react-scripts
(if you haven’t ejected): jest@27.4.4your vscode-jest settings if customized:
But this occurs even without these settings.
Operating system: macOS 11.6.1
Prerequisite
npm run test
ornode_modules/.bin/jest
)jest
Steps to Reproduce
yarn
in the repo foldercolor: "O",
tocolor: "Y",
to make it failRelevant Debug Info
This relates to a piece of VS Code editor state that is saved in the SQLite database at
~/Library/ApplicationSupport/Code/User/<session ID>/state.vscdb
, under the keymemento/workbench.parts.editor
.When this error is occurring, the JSON at that row looks like this (in this case, it's visible with the
Board.test.ts
file, which is how I originally got this problem. The same pattern is visible in the entry forboard.ts
). In particular, note the "resourceJSON" which contains the old capitalization, and "preferredResourceJSON" which has the new capitalization. In this case I had started lowercase and changed it to uppercase.memento/workbench.parts.editor
``` { "editorpart.state": { "serializedGrid": { "root": { "type": "branch", "data": [ { "type": "leaf", "data": { "id": 3, "editors": [ { "id": "workbench.editors.files.fileEditorInput", "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/board.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/board.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/board.ts\",\"scheme\":\"file\"},\"preferredResourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Board.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/Board.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Board.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}" }, { "id": "workbench.editors.files.fileEditorInput", "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Area.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/Area.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Area.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}" }, { "id": "workbench.editors.files.fileEditorInput", "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Cell.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/Cell.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Cell.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}" }, { "id": "workbench.editors.files.fileEditorInput", "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/board.test.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/tests/board.test.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/board.test.ts\",\"scheme\":\"file\"},\"preferredResourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Board.test.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/tests/Board.test.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Board.test.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}" }, { "id": "workbench.editors.files.fileEditorInput", "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Area.test.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/tests/Area.test.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Area.test.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}" }, { "id": "workbench.input.settings2", "value": "" }, { "id": "workbench.editors.files.fileEditorInput", "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Library/Application Support/Code/User/settings.json\",\"external\":\"vscode-userdata:/Users/phoenix/Library/Application%20Support/Code/User/settings.json\",\"path\":\"/Users/phoenix/Library/Application Support/Code/User/settings.json\",\"scheme\":\"vscode-userdata\"},\"encoding\":\"utf8\"}" } ], "mru": [ 3, 6, 5, 4, 0, 1, 2 ] }, "size": 965 } ], "size": 609 }, "orientation": 1, "width": 965, "height": 609 }, "activeGroup": 3, "mostRecentActiveGroups": [ 3 ] } } ```Expected Behavior
The gutter icons should stay in place even after renaming the file with different capitalization.
Actual Behavior
The gutter icons disappear, and the exception is only underlined (not expanded).
Screenshot taken in my original bug case, where I renamed board.test.ts to Board.test.ts:
Workaround
The workaround is to close any affected file tabs, quit VS Code, relaunch, and then reopen the files.