COMPILATIONDB_INCLUDE_TOOLCHAIN=True skips WiFi

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

Description

integration

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
Dominant language
Python
Stars
9.6k
Forks
916
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from platformio/platformio-core

All issues in platformio/platformio-core

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.