microsoft / microsoft/vscode-cpptools

[vscode-arduino] Basic `wiring` identifiers are undefined?

Open
#9,086 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: Configuration investigate: repro Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Bug type: Language Service

Describe the bug

  • OS and Version:
    OS: Linux x64 5.16.11-76051611-generic- C/C++ Extension Version:
  • VS Code Version:
    Version: 1.65.2
    Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
    Date: 2022-03-10T15:36:26.048Z
    Electron: 13.5.2
    Chromium: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
  • Other extensions you installed (and if the issue persists after disabling them):
    • vscode-arduino

image

Steps to reproduce
As you can see in the screenshot, VSCode claims the most basic wiring APIs are not defined.

I have validated the paths in the c_cpp_preferences.json, and they are correct. I also noticed that the problem matcher claims it is checking against C/C++(20) in the PROBLEMS tab. However, the standard specified in c_cpp_preferences.json clearly states c++14.
For the record: The c_cpp_preferences.json file was generated by the extension. I did NOT modify the file; I only verified its contents.

The code compiles without warnings, and if I press F12, then it will find the definition of either of the API.

Expected behavior
For Intellisense to resolve wiring symbols.

Additional context

I created issue 1468 on vscode-arduino. They were able to reproduce the issue, and asked me to cross post it here. They said they would have done it, but did not have permission to transfer the issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing with the listed VS Code, C/C++ extension, Linux, and vscode-arduino versions, then inspect the generated c_cpp_preferences.json and the C/C++(20) diagnostic against its c++14 setting. Compare the unresolved wiring identifiers with the successful F12 definition lookup. Done means IntelliSense resolves the wiring symbols without false undefined diagnostics while compilation remains warning-free.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, cpp, typescript, vscode
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.