microsoft / vscode-makefile-tools

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

Makefile-tools setting in "folder" level not taking effect #488

Closed gaodingpan closed 7 months ago

gaodingpan commented 11 months ago

Another related problem, if I change the setting of the extension in "Folder", it will not take effect in the extension's actual run: image image

vscode version: Version: 1.80.0 (system setup) Commit: 660393deaaa6d1996740ff4880f1bad43768c814 Date: 2023-07-04T15:06:02.407Z Electron: 22.3.14 ElectronBuildId: 21893604 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.19045

makefile-tools version: v0.8.1

### Tasks
gcampbell-msft commented 10 months ago

@gaodingpan Does it work if you modify the setting in the workspace instead of the folder?

gaodingpan commented 10 months ago

@gaodingpan Does it work if you modify the setting in the workspace instead of the folder?

@gcampbell-msft It works, it might have to do with me having a multi-root workspace, do we have a timeline on when makefiletool will support multi-root workspace ${workspaceFolder:subfolder} expansion?

gaodingpan commented 8 months ago

@gaodingpan Does it work if you modify the setting in the workspace instead of the folder? @gcampbell-msft I did some more testing with the VS-Code environment: Version: 1.83.1 (system setup) Commit: f1b07bd25dfad64b0167beb15359ae573aecd2cc Date: 2023-10-10T23:48:05.904Z Electron: 25.8.4 ElectronBuildId: 24154031 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045 Makefiletool V0.8.10

If I put my "makefile.configurations" for makefiletool in folders level, it will not be shown in makefile view: image However, if I put it in workspace configuration json, it will: image Any idea?

andreeis commented 8 months ago

@gaodingpan , this doesn't work because we did not implement work item multi-root support. I am exploring a cheaper alternative to alleviate the lack of multi root support in the Makefile Tools extension, until we will have full resources for this feature. Do you have your project (or a smaller version of it) available on GitHub or if not open source, could you send us an archived attachment?

gaodingpan commented 8 months ago

@gaodingpan , this doesn't work because we did not implement work item multi-root support. I am exploring a cheaper alternative to alleviate the lack of multi root support in the Makefile Tools extension, until we will have full resources for this feature. Do you have your project (or a smaller version of it) available on GitHub or if not open source, could you send us an archived attachment?

@andreeis There are 2 parts of the workspace, one of them is Opensource but the other is proprietary, I am afraid I am not at liberty to put it up to GitHub or send it to you by archives. Do you need a dummy project for debugging?

gaodingpan commented 8 months ago

By the way, I notice that makefiletools Configurations selection does not work under remote development mode.

For example, when I connect workspace with remote connect to WSL(or remote linux servers), "Configurations" in Makefiletool view is not configurable: image but with the same workspace when opened in windows local mode, it can be configured: image

Not sure if the issue is connected or not.

gaodingpan commented 8 months ago

Figured this one out, we have to have a working Makefile configured before we can change configuration: image

andreeis commented 8 months ago

@gaodingpan , the first half of this ticket I will consider closed since we have the work item that covers multi-root. I was asking for a repro just in case you may have some interesting different than the usual situation about how you setup the various folders or how you define the settings. But we'll see then when we deliver the feature and you test it.

Now, I only want to make sure I understand what you mentioned last. You don't need to have a "configure" process completed before being able to see the options to chose from. A makefile present anywhere in the folder should activate the extension (otherwise there's nothing to even look at settings or run "make") and then we can read settings (single workspace for now) from settings.json and the quickPick UI element should contain all entries. I you see any variation of behavior other than this let us know.

What I think happened for you was that the selection you chose in windows mode was not seen when opening in wsl mode. I didn't test to be sure but I think the selection is simply saved somewhere else (not extension specific, VSCode specific, we construct by default a path within the user folder that corresponds to that VSCode instance and if VSCode wants a different path for WSL versus native windows then the two cases won't interfere). Once you select a configuration (from "makefile.configurations" setting) for WSL, close and reopen you should see the selection persisted. Does that happen? Even if different than what you selected when opened in windows mode.

gaodingpan commented 7 months ago

@gaodingpan , the first half of this ticket I will consider closed since we have the work item that covers multi-root. I was asking for a repro just in case you may have some interesting different than the usual situation about how you setup the various folders or how you define the settings. But we'll see then when we deliver the feature and you test it.

Now, I only want to make sure I understand what you mentioned last. You don't need to have a "configure" process completed before being able to see the options to chose from. A makefile present anywhere in the folder should activate the extension (otherwise there's nothing to even look at settings or run "make") and then we can read settings (single workspace for now) from settings.json and the quickPick UI element should contain all entries. I you see any variation of behavior other than this let us know.

What I think happened for you was that the selection you chose in windows mode was not seen when opening in wsl mode. I didn't test to be sure but I think the selection is simply saved somewhere else (not extension specific, VSCode specific, we construct by default a path within the user folder that corresponds to that VSCode instance and if VSCode wants a different path for WSL versus native windows then the two cases won't interfere). Once you select a configuration (from "makefile.configurations" setting) for WSL, close and reopen you should see the selection persisted. Does that happen? Even if different than what you selected when opened in windows mode.

Got it, I think the key is to have a Makefile present in the "Makefile Path" option, I will wait for the multi-root feature and see if that covers my need ,thx a lot!