microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
184 stars 55 forks source link

How to completely disable --dry-run popup? #547

Closed tandav closed 2 months ago

tandav commented 6 months ago

This popup is very annoying. If I click Yes (don't show again) it still appears after reboot.

image
louis222220 commented 6 months ago

I face the same issue and also have no idea about it. It have happened for about 1~2 weeks and won't happen when switched to the versions 0.7.

I hope the following information are helpful.

My system version:

MacOS: 13.4.1

Makefile Tools: 0.8.22

VSCode:
  Version: 1.85.1
  Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2
  Date: 2023-12-13T09:48:16.874Z
  Electron: 25.9.7
  ElectronBuildId: 25551756
  Chromium: 114.0.5735.289
  Node.js: 18.15.0
  V8: 11.4.183.29-electron.0
  OS: Darwin arm64 22.5.0

These log was printed in the output window:

No current configuration is defined in the workspace state. Assuming 'Default'.
No target defined in the workspace state. Assuming 'Default'.
Dropping various extension output files at /Users/louis/Library/Application Support/Code/User/workspaceStorage/cb0c9a491211cdcff9f78f177e655e26/ms-vscode.makefile-tools
Logging level: Normal
Configurations cached at /Users/louis/Library/Application Support/Code/User/workspaceStorage/cb0c9a491211cdcff9f78f177e655e26/ms-vscode.makefile-tools/configurationCache.log
No path to the makefile is defined in the settings file.
No folder path to the makefile is defined in the settings file.
Always pre-configure: false
Always post-configure: false
Dry-run switches: '--always-make', '--keep-going', '--print-directory'
No current launch configuration is set in the workspace state.
Default launch configuration: MIMode = undefined,
                    miDebuggerPath = undefined,
                    stopAtEntry = undefined,
                    symbolSearchPath = undefined
Configure on open: true
Configure on edit: true
Configure after command: true
Only .PHONY targets: false
Save before build or configure: true
Build before launch: true
Clear output before build: true
Ignore directory commands: true
compile_commands.json path: null
Deduced command 'make ' for configuration "Default"
The Makefile Tools extension process of configuring your project is about to run 'make --dry-run' in order to parse the output for useful information. This is needed to calculate accurate IntelliSense and targets information. Although in general 'make --dry-run' only lists (without executing) the operations 'make' would do in the current context, it is still possible some code to be executed, like $(shell) syntax in the makefile or recursive invocations of the $(MAKE) variable.
If you don't feel comfortable allowing this configure process and 'make --dry-run' to be invoked by the extension, you can chose a recent full, clean, verbose and up-to-date build log as an alternative, via the setting 'makefile.buildLog'. 
gcampbell-msft commented 6 months ago

This popup is expected, however, it is not expected for it to continually appear in the same workspace upon reboots. I'll mark this as a bug and make sure we prioritize it.

Thanks for letting us know!

gcampbell-msft commented 6 months ago

Following up, I have attempted to repro following your steps, basically clicking Yes (don't show again), and then rebooting, and then opening the same workspace again, and I wasn't able to reproduce the issue on either Windows or a Mac.

Is it possible there is something else at play that I should try to set in my Makefile project in order for it to repro?

Thanks.

dannyskoog commented 5 months ago

I'm also seeing the same on macOS 14

Moulick commented 5 months ago

@gcampbell-msft I do not use workspaces in vscode, instead opening folders directly via command line, this pops up every time. Please add a global setting to disable this popup irrespective of workspace/folder

gcampbell-msft commented 5 months ago

@Moulick Are you also on Mac? To my understanding, VS Code treats any folder being opened as a "workspace" when it comes to this feature, so it shouldn't matter how you open VS Code. I'm beginning to wonder if there is a bug with how we're persisting the information that's only occurring on Mac.

Thanks.

Moulick commented 5 months ago

@gcampbell-msft yes I am on mac. Though, I go out of my way to not save a folder I open as a "workspace". I wish vscode had a way to disable this workspace idea altogether 😄

Moulick commented 5 months ago

Maybe store the config in the user settings.json as a extension setting? That also has the benefit of being synced across devices

gcampbell-msft commented 4 months ago

@Moulick To follow up on this, it may be that I need to follow up with some questions to VSCode itself. Based on this documentation here: https://code.visualstudio.com/docs/editor/workspaces, even if you only open folders in VSCode, they are treated as the "workspace" you opened. Therefore, I believe what we're doing should be working.

Do you notice this specifically in any certain scenarios? Perhaps a minimal repro project?

Moulick commented 4 months ago

One way I can reproduce it is,

  1. Open vscode
  2. Close all workspaces, clicking "Close workspace"
image
  1. After closing all workspace, you will still be left with a window.
  2. In your terminal, go to a folder that has a makefile
  3. Run code . --add which adds the folder to an open window. This I suppose triggers creation of a new untitled workspace.
  4. This will trigger makefile tools to give the mentioned error.

Vs code with a recent release has now the option to automatically throw away untitled workspaces "window.confirmSaveUntitledWorkspace": false. I have it enabled, but it does not affect the bug, I have checked with both true/false. It probably only makes it occur more often.

Moulick commented 4 months ago

What I want to happen is the dry run to happen, without that prompt and log window opening. I am not an expert in makefiles but is there any risk to running a dry run anyways?

DoctorHayes commented 4 months ago

I have the same issue. I am running it within Ubuntu in the Windows Subsystem for Linux (WSL).

gcampbell-msft commented 4 months ago

Just giving a quick update here:

We are investigating ways to improve this experience and ways to improve the annoyance that you all are experiencing. We hope to implement a fix and/or better solution in the near future.

@Moulick For your issue, I would expect that this is actually expected, because if you are adding a new folder that you haven't opened before to your workspace, then our extension will treat this as a new folder that hasn't had that pop-up yet. However, if it's happening for folders that have already done that, then yes, this is a bug.

Thanks everyone for your understanding.

Moulick commented 4 months ago

Thank you @gcampbell-msft. Yes, even if I add the same folder, this pops up. Also maybe this extension can instead of having it's own trust setup, rely on VSCodes workspace trust https://code.visualstudio.com/docs/editor/workspace-trust ? Using these settings the user can control how the extension can behave.

image
Yingzi1234 commented 3 months ago

@Moulick Thank you for your answer! Do you mean re-cloning an identical folder or re-extracting a folder? If so, the appearance of the trust prompt box should be expected. If you don't want the trust box to appear you can reset it in VS Code as described below(based on https://code.visualstudio.com/docs/editor/workspace-trust), thanks! image

Moulick commented 3 months ago

@Yingzi1234 I mean simply re-opening the exact same folder again in vscode triggers the popup. I have disabled the workspace trust and set it to trust all folder. VS code itself does not prompt me for trust anymore, Only the VSCode makefile extension.

gcampbell-msft commented 3 months ago

@Moulick Thanks for the confirmation, we are looking into this, I appreciate your patience.

sinemakinci1 commented 3 months ago

Just wanted to update the thread here that we are redesigning the initial configure experience, and proposing removing the dry-run popup for ease of use for users and so popups do not persist.

If you would like to add any additional comments on this effort, please see our issue #572

mobynet1 commented 3 months ago

This happens over and over and over and over - Yes (don't show again - but I will just to annoy you) and over and over and over... I think you get it. The pop-up is EXTREMELY annoying. I am using Visual Studio Code v1.87.2 on Windows. It would really be great if I said - No! Please don't again! and then it should never see the light of my screen ever again...

Or, if there was a flag that could turn it off, that would be great. I did set a makefile.dryrunSwitches flag, "--dry-run" to no avail. Bottom line is if the user says "never show this notification ever, ever, ever again" the program should honor that request!!

gcampbell-msft commented 3 months ago

@mobynet1 Thanks for your input. We are in the midst of removing this pop-up in favor of a much better experience. #572.

Thanks for your patience.

gcampbell-msft commented 3 months ago

@mobynet1 @tandav @Moulick We have merged #573, and it will be available in pre-release in the next couple of hours.

Moulick commented 3 months ago

Thank you guys for all your efforts. Running version v0.10.2 (pre-release), I do not get any prompt at all, not even once. Aren't I supposed to get the prompt at-least once to allow dry run?

gcampbell-msft commented 3 months ago

@Moulick No. We are following VS Code's support of the idea of Workspace Trust. If you have "trusted" your workspace, we respect that and allow for configuring with "dry-run" to happen. However, if you don't enable workspace trust, we don't enable the extension, therefore ensuring that nothing from our extension happens.

Moulick commented 3 months ago

That sounds fantastic. This fixes the problem. Thanks!

Yingzi1234 commented 2 months ago

Happy to see your issue has been resolved, thanks for contributing to Developer Community.