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

"Edit Cmake Cache UI" not working #1591

Closed
deimi opened this issue Dec 10, 2020 · 9 comments
Closed

"Edit Cmake Cache UI" not working #1591

deimi opened this issue Dec 10, 2020 · 9 comments
Labels
Feature: configure Feature: UI more info needed More info is needed from the community for us to properly triage and investigate. stale to use with the close-stale-issues bot

Comments

@deimi
Copy link

deimi commented Dec 10, 2020

Brief Issue Summary

Changes made with the Cmake Cache UI editor don't get saved.

Expected:

  1. Press F1
  2. Cmake: Edit Cmake Cache UI
  3. Change anything
  4. Press save
  5. Close cache editor
  6. The cmake cache file should now contain the changed values

Apparent Behavior:

  1. Press F1
  2. Cmake: Edit Cmake Cache UI
  3. Change anything
  4. Press save
  5. the star in the "file name" remains and indicates unsaved changes
    image
  6. Close cache editor
  7. A popup appears which tells that there are unsaved changes
    image
  8. Press Yes
  9. The cmake cache file don't contain any changes made in the UI

CMake Tools Log

Nothing

Developer Tools Log

Nothing

Platform and Versions

  • Operating System: Linux Mint 19
  • CMake Version: 3.16.3
  • VSCode Version: 1.51.1 snap version
    e5a624b788d92b8d34d1392e4c4d9789406efe8f
    x64
  • CMake Tools Extension Version: v1.5.3
  • Compiler/Toolchain:

Other Notes/Information

@andreeis
Copy link
Contributor

I am not able to reproduce as you describe. Everything gets saved properly in all scenarios.
I do see the setting getting lost if the project is reconfigured, but that is expected, right?
Let's figure out what's different on your side...
When you press SAVE, do you see any bottom right popups? One that's temporary "Configuring project" and one that stays "CMake options have been saved". You mention you see nothing in the log. It almost looks like the button is not really pressed. Set cmake.loggingLevel to debug and try again.

@andreeis andreeis added Feature: configure Feature: UI more info needed More info is needed from the community for us to properly triage and investigate. labels Dec 15, 2020
@deimi
Copy link
Author

deimi commented Dec 17, 2020

No popups appear when I press the Save button.
Yes of course the settings should get lost if you do a reconfigure. But I don't do this. I do a configure and afterwards I try to edit the Cache via UI, but those edits won't get saved.

Here are the cmake logs:

  • When opening the Cache UI
[extension] [3674] cmake.openConfiguration started
[cache] Reading CMake cache file /home/user/projects/asdf/_build/CMakeCache.txt
[cache] Parsing CMake cache string
[extension] [3674] cmake.openConfiguration finished (returned 0)
  • When pressing the Save button
[cache] Reading CMake cache file /home/user/projects/asdf/_build/CMakeCache.txt
[cache] Parsing CMake cache string
  • After closing the UI and answering the popup question "Do you want to save the latest cache edits?" with yes
[cache] Reading CMake cache file /home/user/projects/asdf/_build/CMakeCache.txt
[cache] Parsing CMake cache string

@andreeis
Copy link
Contributor

This is still very mysterious because when I press SAVE I see lots more in the output channel.
A short in the dark, what exact setting you are modifying? Does it happen for all of them? Some are string, some are boolean...
I am running out of ideas to give you to try on your side. Can you make a small isolated repro for us?

@andrewmcdonald-oxb
Copy link

I have the same issue. The cache editor appears not to work at all. As described here, the * remains in the editor tab after pressing Save. The popup then asks if I'd like to save again. Subsequently running a configure doesn't include any of the changes.

@aemseemann
Copy link
Contributor

@andrewmcdonald-oxb It sounds like the SAVE button is not connected to any handler. You can verify this using the developer tools. While the cache editor is open, please run Developer: Open Webview Developer Tools from the command palette. Then select the SAVE button and have a look at the "Event Listeners" tab. There should be one entry as in the image below. If it is empty, this would explain your observed behavior.
image

Furthermore, can you please check if there are any errors logged to the "Console" tab?

@deimi
Copy link
Author

deimi commented May 3, 2021

Yes, there is an event listener registered:

image

Clicking on the button doesn't log anything in the console tab

@SpriteOvO
Copy link

SpriteOvO commented Jul 18, 2021

Same problem. It seems that only some of the string options do not work. Here are errors given by Webview Developer Tools console when I clicked "Edit CMake Cache (UI)", save without any errors:

mainThreadExtensionService.ts:63 [[object Object]]Cannot read property 'document' of undefined
$onExtensionRuntimeError @ mainThreadExtensionService.ts:63
_doInvokeHandler @ rpcProtocol.ts:418
_invokeHandler @ rpcProtocol.ts:403
_receiveRequest @ rpcProtocol.ts:319
_receiveOneMessage @ rpcProtocol.ts:246
(anonymous) @ rpcProtocol.ts:111
fire @ event.ts:583
fire @ ipc.net.ts:513
_receiveMessage @ ipc.net.ts:866
(anonymous) @ ipc.net.ts:705
fire @ event.ts:583
acceptChunk @ ipc.net.ts:286
(anonymous) @ ipc.net.ts:247
T @ ipc.net.ts:50
emit @ events.js:315
addChunk @ internal/streams/readable.js:309
readableAddChunk @ internal/streams/readable.js:284
Readable.push @ internal/streams/readable.js:223
onStreamRead @ internal/stream_base_commons.js:188
mainThreadExtensionService.ts:64 TypeError: Cannot read property 'document' of undefined
	at c:\Users\<UserName>\.vscode\extensions\docsmsft.docs-markdown-0.2.95\dist\extension.js:2:361238
	at d.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)
	at d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:85:56700
	at d.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)
	at b.acceptDocumentsAndEditorsDelta (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:161009)
	at b.$acceptDocumentsAndEditorsDelta (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:159110)
	at c._doInvokeHandler (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:12743)
	at c._invokeHandler (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:12435)
	at c._receiveRequest (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:11097)
	at c._receiveOneMessage (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:9900)
	at d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:88:8004
	at d.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)
	at h.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15777)
	at d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:29836
	at d.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)
	at h.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:15777)
	at r._receiveMessage (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:21035)
	at d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:17921
	at d.fire (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:57:1726)
	at u.acceptChunk (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:13138)
	at d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:65:12486
	at Socket._ (d:\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:103:13107)
	at Socket.emit (events.js:315:20)
	at addChunk (internal/streams/readable.js:309:12)
	at readableAddChunk (internal/streams/readable.js:284:9)
	at Socket.Readable.push (internal/streams/readable.js:223:10)
	at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
$onExtensionRuntimeError @ mainThreadExtensionService.ts:64
_doInvokeHandler @ rpcProtocol.ts:418
_invokeHandler @ rpcProtocol.ts:403
_receiveRequest @ rpcProtocol.ts:319
_receiveOneMessage @ rpcProtocol.ts:246
(anonymous) @ rpcProtocol.ts:111
fire @ event.ts:583
fire @ ipc.net.ts:513
_receiveMessage @ ipc.net.ts:866
(anonymous) @ ipc.net.ts:705
fire @ event.ts:583
acceptChunk @ ipc.net.ts:286
(anonymous) @ ipc.net.ts:247
T @ ipc.net.ts:50
emit @ events.js:315
addChunk @ internal/streams/readable.js:309
readableAddChunk @ internal/streams/readable.js:284
Readable.push @ internal/streams/readable.js:223
onStreamRead @ internal/stream_base_commons.js:188
main.js:701 Blocked autofocusing on a <input> element in a cross-origin subframe.
(anonymous) @ main.js:701
setTimeout (async)
L @ main.js:699
(anonymous) @ main.js:730
​ [[object Object]]Circular symlink detected: "C:\Users\<UserName>\AppData\Local\Application Data" points to "C:\Users\<UserName>\AppData\Local"
$onExtensionRuntimeError @ workbench.desktop.main.js:2350
_doInvokeHandler @ workbench.desktop.main.js:1704
_invokeHandler @ workbench.desktop.main.js:1704
_receiveRequest @ workbench.desktop.main.js:1704
_receiveOneMessage @ workbench.desktop.main.js:1704
(anonymous) @ workbench.desktop.main.js:1704
fire @ workbench.desktop.main.js:60
fire @ workbench.desktop.main.js:76
_receiveMessage @ workbench.desktop.main.js:76
(anonymous) @ workbench.desktop.main.js:76
fire @ workbench.desktop.main.js:60
acceptChunk @ workbench.desktop.main.js:76
(anonymous) @ workbench.desktop.main.js:76
T @ workbench.desktop.main.js:2844
emit @ events.js:315
addChunk @ internal/streams/readable.js:309
readableAddChunk @ internal/streams/readable.js:284
Readable.push @ internal/streams/readable.js:223
onStreamRead @ internal/stream_base_commons.js:188
​ Error: Circular symlink detected: "C:\Users\<UserName>\AppData\Local\Application Data" points to "C:\Users\<UserName>\AppData\Local"
	at ReaddirpStream._getEntryType (c:\Users\<UserName>\.vscode\extensions\ms-vscode.cmake-tools-1.7.3\dist\main.js:34267:34)
	at async ReaddirpStream._read (c:\Users\<UserName>\.vscode\extensions\ms-vscode.cmake-tools-1.7.3\dist\main.js:34178:31)
$onExtensionRuntimeError @ workbench.desktop.main.js:2350
_doInvokeHandler @ workbench.desktop.main.js:1704
_invokeHandler @ workbench.desktop.main.js:1704
_receiveRequest @ workbench.desktop.main.js:1704
_receiveOneMessage @ workbench.desktop.main.js:1704
(anonymous) @ workbench.desktop.main.js:1704
fire @ workbench.desktop.main.js:60
fire @ workbench.desktop.main.js:76
_receiveMessage @ workbench.desktop.main.js:76
(anonymous) @ workbench.desktop.main.js:76
fire @ workbench.desktop.main.js:60
acceptChunk @ workbench.desktop.main.js:76
(anonymous) @ workbench.desktop.main.js:76
T @ workbench.desktop.main.js:2844
emit @ events.js:315
addChunk @ internal/streams/readable.js:309
readableAddChunk @ internal/streams/readable.js:284
Readable.push @ internal/streams/readable.js:223
onStreamRead @ internal/stream_base_commons.js:188

@github-actions
Copy link

This issue is now marked as 'stale' due to there being no activity on it for the past 30 days and being labelled 'more info needed'. Unless the 'stale' label is removed or the issue is commented on, this will be closed in 7 days. If you would like to make this issue exempt from getting stale, please remove the 'more info needed' and 'stale' labels or add the 'stale-exempt' label

@github-actions github-actions bot added the stale to use with the close-stale-issues bot label Oct 18, 2023
@github-actions
Copy link

This issue is now closed due to there being no activity on it for the past 7 days since being marked as 'stale'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: configure Feature: UI more info needed More info is needed from the community for us to properly triage and investigate. stale to use with the close-stale-issues bot
Projects
None yet
Development

No branches or pull requests

5 participants