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

Custom browse configuration path irregularities #1099

Closed
RobRuckOB opened this issue Feb 27, 2020 · 5 comments
Closed

Custom browse configuration path irregularities #1099

RobRuckOB opened this issue Feb 27, 2020 · 5 comments
Labels
bug a bug in the product Feature: cpptools integration fixed (release pending) fixed in pre-release and is pending official release IMPORTANT
Milestone

Comments

@RobRuckOB
Copy link

(I initially mistakenly reported this bug to the C/C++ extension team)

Whilst looking at another unrelated issue with the C/C++ extension I turned on debug logging and saw something unusual in the paths listed in the "Custom browse configuration received:" section. Specifically, there are repeated lower-cased versions of paths (I can just about believe that's intentional due to platform differences) and/or paths with the workspace folder appended twice (I can't think of any reason for this). If this is a somewhat scattergun approach to finding things, that's not ideal, but it also doesn't seem to work quite right - I see some paths in the lower case or repeated style that don't appear correctly in the list of paths at all.

  • OS and Version: OSX 10.14.6
  • VS Code Version: 1.42.1
  • C/C++ Extension Version: 0.26.3
  • CMake Version: 3.16.2
  • CMake Tools Extension Version: 1.3.1
  • Compiler/Toolchain: clang 9.1.0

To Reproduce
My c_cpp_properties.json:
{ "configurations": [ { "name": "Mac", "includePath": [ "${workspaceFolder}/**", "~/.conan/data/**" ], "defines": [], "macFrameworkPath": [ "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks" ], "compilerPath": "/usr/bin/clang", "cStandard": "c11", "cppStandard": "c++17", "configurationProvider": "vector-of-bool.cmake-tools" } ], "version": 4 }
I simply start up VS Code, and the paths issue is visible in the start up debug output from the extension.

Expected behavior
Only valid paths are set in the browse configuration.

Screenshots
Lower casing of path (Notice /users):
image

Lower casing of path and repetition of the workspace folder:
image

Subsequent errors:
image

@bobbrow
Copy link
Member

bobbrow commented Feb 28, 2020

Thanks for reporting this. I can reproduce this locally.

@bobbrow bobbrow added this to the 1.4.0 milestone Feb 28, 2020
@KoeMai
Copy link
Contributor

KoeMai commented Mar 2, 2020

I was not able to reconstruct the problem.
Does it work if you change cmake.cmakeCommunicationMode setting back to ServerAPI?

@bobbrow
Copy link
Member

bobbrow commented Mar 2, 2020

I don't think this has anything to do with that. I added code to cpptools.ts that aggregates the paths for all of the projects into the browse configuration. The path normalization code for macOS is running before the paths are added to the Set. I had assumed that it would follow the linux normalization rules, but it is following the Windows rules instead since macOS supports case-insensitive paths.

@bobbrow bobbrow added the fixed (release pending) fixed in pre-release and is pending official release label Mar 2, 2020
@andreeis
Copy link
Contributor

CMake Tools 1.4.0 Beta is available on GitHub.
https://github.com/microsoft/vscode-cmake-tools/releases/tag/1.4.0-beta

Please try it out and let us know if you encounter any issues.

@andreeis
Copy link
Contributor

This fix is available in CMake Tools #1.4.0 which has been released.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: cpptools integration fixed (release pending) fixed in pre-release and is pending official release IMPORTANT
Projects
None yet
Development

No branches or pull requests

4 participants