Skip to content

Fails to resolve config variables containing colons #2165

Closed

Description

@wpaul-magicleap

Type: LanguageService

  • OS and Version: Mac OS X 10.11.6
  • VS Code Version: 1.24.1
  • C/C++ Extension Version: 0.17.4

I have some configuration variables that share the same prefix and use '.' as a delimiter. This looks to be standard practice for vscode settings. e.g.
ml.sdk
ml.username
ml.foobar

I'm trying to include some sdk-relative include paths for IntelliSense like this in the workspace folder's settings.json:
"ml.sdk": "/path/to/sdk",
"C_Cpp.default.includePath": [
"${workspaceFolder}/**",
"${config:ml.sdk}/foo",
"${config:ml.sdk}/bar",
],

IntelliSense is unable to locate any of the headers in /path/to/sdk/foo or /path/to/sdk/bar.

If I change the '.' to '_' instead, e.g. ml_sdk, IntelliSense is able to locate the headers.

I have an extension that reads and writes these settings, e.g.
vscode.workspace.getConfiguration('ml').get('sdk');

so I'm not sure I can do that without having a '.' as a settings section-identifier.

Activity

  1. sean-mcmanus commented on Jun 21, 2018

    @sean-mcmanus
    Contributor

    Thanks for reporting this. Yeah, our typescript is throwing an exception in this case. We'll see if we can release this in our pending update -- if not, it'll go in the next update. See #2166 . This code has been around since February, so maybe VS Code changed how its APIs behave?

  2. wpaul-magicleap commented on Jun 21, 2018

    @wpaul-magicleap
    Author

    Wow, thanks for the quick fix!

  3. sean-mcmanus commented on Jun 22, 2018

    @sean-mcmanus
    Contributor

    Fixed with 0.17.5.

  4. locked and limited conversation to collaborators on Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions