platformio / platformio/platformio-core

COMPILATIONDB_INCLUDE_TOOLCHAIN=True skips WiFi

Open
#5,166 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

integration
Dominant language
Python
Stars
9.5k
Forks
905
Avg merge
2d 13h
Merged PRs (30d)
2

Description

When I build the default compile db, I've got the following output and WiFi.h gets properly found:

Scanning dependencies...
Dependency Graph
|-- Adafruit NeoPixel @ 1.12.5
|-- arduino-timer @ 3.0.1
|-- WiFi @ 3.2.0

When I add env.Replace(COMPILATIONDB_INCLUDE_TOOLCHAIN=True) to extra_script.py,

Scanning dependencies...
Dependency Graph
|-- Adafruit NeoPixel @ 1.12.5
|-- arduino-timer @ 3.0.1
Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping
Warning! `COMPILATIONDB_INCLUDE_TOOLCHAIN` is scoping

So I can have either WiFi.h found by clangd or <algorithm> but not both.
How could I have them both found by clangd?

[env:esp32c3]
platform = espressif32
board = esp32-c3-devkitm-1
framework = arduino
monitor_speed = 115200
extra_scripts = pre:extra_script.py
lib_deps = 
    adafruit/Adafruit NeoPixel@^1.11.0
    contrem/arduino-timer@^3.0.1

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 with the extra_script.py entry point and reproduce the default build alongside COMPILATIONDB_INCLUDE_TOOLCHAIN=True using the provided platformio.ini settings. Compare the compilation database behavior and dependency scanning, with completion working for both WiFi.h and as the done condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
arduino, python
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.