microsoft / vscode-makefile-tools

MAKE integration in Visual Studio Code
Other
194 stars 58 forks source link

No configurations defined in makefile.configurations setting. #471

Closed CedricSchmeits closed 10 months ago

CedricSchmeits commented 1 year ago

I have the following file: .vscode/settings.json:

{
    //"makefile.loggingLevel": "Debug",
    "makefile.configurations": [
        {
            "name": "Default",
            "makeArgs": [
                "WORKSPACE=${workspaceFolder}/.."
            ],
        }
    ]
}

With this I'm constantly getting the message: No configurations defined in makefile.configurations setting. What am I doing wrong?

After just upgrading to v0.8.1, I'm still having the same issues.

OS: Ubuntu 22.04

andreeis commented 1 year ago

@CedricSchmeits , because of an unfortunate assumption made on the "Default" text string. We will fix this. In the meantime, rename your configuration to anything other than "Default". Would "DefaultConfig" work? Besides the warning message, anything else should work though, let us know if you don't see the effects of adding the WORKSPACE variable.

CedricSchmeits commented 1 year ago

@andreeis actually I don't mind what the name is. When I put in any other name that "Default", it still shows the same message.

When I press on the pencil icon behind Configuration [Unset] I'm getting a selection dialog with only Default in it. Screenshot from 2023-05-10 00-14-50

andreeis commented 1 year ago

@CedricSchmeits, that's definitely not what we intend and we've never seen this bug manifest before. Double check that your "makefile.configurations" setting is written into the right settings.json of the project that you are opening as folder, the exact .vscode subfolder of that root workspace directory.

CedricSchmeits commented 1 year ago

@andreeis I've just created a example project om another computer, this one is running Debian testing. This shows the same issues: https://github.com/CedricSchmeits/makeconfiguration

gcampbell-msft commented 1 year ago

@andreeis @CedricSchmeits Just as an FYI, I've not been able to repro on Windows or on Ubuntu through VMWare. I cloned your repository in Ubuntu and opened it and also wasn't able to repro, the "HalloWorld" option appeared as expected.

Could you provide us with more information about your makefile settings and how you're opening VSCode? Any information may help us repro.

@andreeis Feel free to add any information that might be helpful.

CedricSchmeits commented 1 year ago

My main system is running Debian testing.

I've installed vscode by installing the debian package. sudo dpkg -i code_1.78.1-1683194560_amd64.deb

I'm using GNU Make 4.3 that comes default with debian I start vscode from the default start menu within gnome.

I have install among others the following extensions:

It seems like nothing that is configured in the settings.json file is somehow registered somewhere.

I don't understand the question about the makefile settings. It's just the makefile as in the repository with only the 3 lines:

WORKSPACE ?= ${HOME}

all:
    @echo "WORKSPACE := $(realpath $(WORKSPACE))"
gcampbell-msft commented 1 year ago

My apologies, when I said "makefile settings" I was referring to your makefile extension settings. You can view these by finding them inside of the VSCode settings. Navigate to these by using the command Preferences: Open Settings (UI), and then searching for or navigating to the Makefile Tools extension settings.

I'm wondering if there's anything you have set in your settings that might be causing different behavior. Thank you!

CedricSchmeits commented 1 year ago

This is the contents of my settings file: .config/Code/user/settings.json

{
    "workbench.colorTheme": "Default Dark+",
    "[python]": {
        "editor.formatOnType": true
    },
    "yaml.schemas": {
        "file:///home/cedrschm/.vscode/extensions/atlassian.atlascode-3.0.2/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
    },
    "workbench.startupEditor": "none",
    "cmake.configureOnOpen": true,
    "editor.renderWhitespace": "all",
    "security.workspace.trust.untrustedFiles": "open",
    "templates.Author": "Cedric Schmeits",
    "diffEditor.ignoreTrimWhitespace": false,
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "editor.formatOnPaste": true,
    "editor.formatOnType": true,
}
andreeis commented 1 year ago

@CedricSchmeits, I see nothing suspicious in the user settings json file that you shared. Hmm.... since I'm out of ideas, let me ask: do you still reproduce this now? Probably, but I was just checking and please confirm.

andreeis commented 12 months ago

@CedricSchmeits , since we don't have any info to help reproduce or diagnose what happens on your side, I'm thinking we would close this ticket soon. Please confirm whether you still or don't reproduce this behavior. If so, let's find what triggers it so that we see it happen here and investigate for a root cause and fix.

darkaegisagain commented 11 months ago

I see the same problem.. running VScode on MacOS through a ssh to a ubuntu box. The Configuration remains unset.

image
andreeis commented 11 months ago

@darkaegisagain , in order to see anything in the "Configuration" UI element, you need to define the setting "makefile.configurations". In your screenshot I see "makefile.launchConfigurations" which will contribute to populating the UI element 2 positions down from "Configuration", which is "Launch target". Can you share what is your "makefile.configurations" setting?

github-actions[bot] commented 10 months ago

This issue is now marked as 'stale' due to there being no activity on it for the past 30 days and being labeled 'more info needed'. Unless the 'stale' label is removed or the issue is commented on, this will be closed in 14 days. If you would like to make this issue exempt from getting stale, please provide the information needed for the maintainers to understand the issue better.

github-actions[bot] commented 10 months ago

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