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

[Bug Report]: Faulty default includePath (VSC-518) #258

Closed
3 tasks done
brainstorm opened this issue Jan 2, 2021 · 3 comments
Closed
3 tasks done

[Bug Report]: Faulty default includePath (VSC-518) #258

brainstorm opened this issue Jan 2, 2021 · 3 comments
Labels
area:C/C++ Extension Related C/C++ Extension Related Issue or Bugs or Limitations bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)

Comments

@brainstorm
Copy link

Pre Bug Report Checklist
Before reporting any bug please make sure of these points.

  • Make sure you have searched for existing bugs and features request before you post an issue.
  • This is a bug report for the ESP-IDF Visual Studio Code extension and not an ESP-IDF bug report.
  • I've read the docs and found no information that could have helped solving the issue.

Describe the bug
Skärmavbild 2021-01-02 kl  15 06 33

Expected behavior
0 Intellisense/includePath warnings after onboarding. Adding paths manually as hinted in the documentation:

https://github.com/espressif/vscode-esp-idf-extension/blob/master/docs/C_CPP_CONFIGURATION.md

Does not help either, neither does the builtin VSCode quick fixes:

{
    "configurations": [
        {
            "name": "Mac",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "includePath": [
                "${config:idf.espIdfPath}/components/**",
                "${config:idf.espIdfPathWin}/components/**",
                "${workspaceFolder}/**",
                "/Users/romanvg/dev/esp-idf/components/newlib/platform_include"
            ],
            "browse": {
                "path": [
                    "${config:idf.espIdfPath}/components",
                    "${config:idf.espIdfPathWin}/components",
                    "${workspaceFolder}"
                ],
                "limitSymbolsToIncludedHeaders": false
            }
        }
    ],
    "version": 4
}

Environment (please complete the following information):

  • OS Name & Version: MacOS X 10.15.2 (Catalina)
  • VSCode Version: Insiders, latest
  • ESP-IDF Version: master
  • Python Version: 3.9.1
@brainstorm brainstorm added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Jan 2, 2021
@github-actions github-actions bot changed the title [Bug Report]: Faulty default includePath [Bug Report]: Faulty default includePath (VSC-518) Jan 2, 2021
@pwmb pwmb added the area:C/C++ Extension Related C/C++ Extension Related Issue or Bugs or Limitations label Jan 5, 2021
@brianignacio5
Copy link
Collaborator

brianignacio5 commented Jan 6, 2021

Have you tried using compile_commands.json configuration ? You could also specify compilerPath to xtensa-esp32's gcc

@brainstorm
Copy link
Author

brainstorm commented Jan 6, 2021

Sorry, I'm blocked by issue #276 at the moment, will try that when I can actually build through the IDE :/ .... but actually, wouldn't those compile_commands.json be overwritten on each build? It looks like an auto-generated file (as opposed to the JSONs sitting in .vscode), I'll investigate, thanks @brianignacio5.

@brianignacio5
Copy link
Collaborator

compile_commands.json is generated by CMake by resolving all source dependencies there. Should maintain almost the same if your project dependencies don't change.

Closing this since it seems to me that compile_commands.json does the work. The naive configuration is not completely reliable, but we don't maintain the C/C++ extension so we can't provide a solution so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:C/C++ Extension Related C/C++ Extension Related Issue or Bugs or Limitations bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue)
Projects
None yet
Development

No branches or pull requests

3 participants