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

provideConfigurations is called with duplicate URI:s #12177

Closed
HampusAdolfsson opened this issue Apr 9, 2024 · 2 comments
Closed

provideConfigurations is called with duplicate URI:s #12177

HampusAdolfsson opened this issue Apr 9, 2024 · 2 comments
Labels
bug Feature: Configuration Provider Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools. fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Projects
Milestone

Comments

@HampusAdolfsson
Copy link

Environment

  • OS and Version: WSL Ubuntu 22 / Windows 11
  • VS Code Version: 1.89.0-insider
  • C/C++ Extension Version: 1.20.0 pre-release
  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:
When cpptools calls provideConfigurations of a custom configuration provider, the uris parameter always contains the same uri twice:

image

This first appears in version 1.19.5 -- if I downgrade to 1.19.4 it works as expected.

Steps to reproduce:

  1. Run an extension that registers a CustomConfigurationProvider
  2. Put a breakpoint in your CustomConfigurationProvider's provideConfigurations.
  3. Open a file to trigger cpptools to query your extension for the file's intellisense configuration.
  4. Look at the uris parameter passed in -- it contains the same URI that you just opened twice.

Expected behavior:
Each uri should only appear once.

Configuration and Logs

Relevant section from the `C/C++` output channel (here using CMake Tools):

LSP: (received) textDocument/didOpen: file:https:///home/hampusad/EW%20Projects/CMakeTest/func.c
LSP: (invoked) cpptools/queryTranslationUnitSource: file:https:///home/hampusad/EW%20Projects/CMakeTest/func.c (id: 7)
LSP: (invoked) textDocument/didOpen: file:https:///home/hampusad/EW%20Projects/CMakeTest/func.c
Populating file name cache...
LSP: (received) cpptools/didChangeVisibleTextEditors
LSP: (invoked) cpptools/didChangeVisibleTextEditors
Intellisense update pending for: file:https:///home/hampusad/EW%20Projects/CMakeTest/func.c
Done populating filename cache. Elapsed time: 28 ms
LSP: Sending response (id: 7)
Custom configurations received:
  uri: file:https:///home/hampusad/EW%20Projects/CMakeTest/func.c
  config: {
  "includePath": [],
  "defines": [],
  "compilerPath": "/usr/bin/gcc",
  "compilerArgs": [],
  "compilerFragments": [
    "-g",
    "--debug"
  ]
}
  uri: file:https:///home/hampusad/EW%20Projects/CMakeTest/func.c
  config: {
  "includePath": [],
  "defines": [],
  "compilerPath": "/usr/bin/gcc",
  "compilerArgs": [],
  "compilerFragments": [
    "-g",
    "--debug"
  ]
}

Other Extensions

No response

Additional context

No response

@bobbrow bobbrow added this to Triage in 1.20 via automation Apr 9, 2024
@bobbrow bobbrow added bug Language Service regression A bug that didn't exist in a previous release Feature: Configuration Provider Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools. labels Apr 9, 2024
@bobbrow bobbrow added this to the On Deck milestone Apr 9, 2024
@bobbrow bobbrow moved this from Triage to To do in 1.20 Apr 9, 2024
@bobbrow
Copy link
Member

bobbrow commented Apr 9, 2024

@Colengms do you know what might have caused this?

@Colengms Colengms moved this from To do to Pull Request in 1.20 Apr 10, 2024
@Colengms Colengms modified the milestones: On Deck, 1.20 Apr 10, 2024
@bobbrow bobbrow added the fixed Check the Milestone for the release in which the fix is or will be available. label Apr 16, 2024
@bobbrow bobbrow moved this from Pull Request to Done in 1.20 Apr 16, 2024
@sean-mcmanus sean-mcmanus modified the milestones: 1.20, 1.20.2 Apr 17, 2024
@sean-mcmanus
Copy link
Collaborator

@HampusAdolfsson Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.20.2 .

@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Configuration Provider Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools. fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release
Projects
No open projects
1.20
Done
Development

No branches or pull requests

4 participants