microsoft / microsoft/vscode-cpptools

Not being case sensitive to files resulted in the correct dependency not being found.

Open
#11,565 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment
  • OS and version: Windows 11 22H2 22621.2428
  • VS Code: 1.83.1
  • C/C++ extension: v1.17.5
Bug Summary and Steps to Reproduce

Bug Summary:

demo: https://github.com/wc7086/cppextdemo

Steps to reproduce:

  1. Open my demo project
  2. Building with platformio
Debugger Configurations
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
//
// PIO Unified Debugger
//
// Documentation: https://docs.platformio.org/page/plus/debugging.html
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug",
            "executable": "C:/Users/*/Desktop/code/demo/demo/.pio/build/esp12e/firmware.elf",
            "projectEnvName": "esp12e",
            "toolchainBinDir": "C:/Users/*/.platformio/packages/toolchain-xtensa/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "preLaunchTask": {
                "type": "PlatformIO",
                "task": "Pre-Debug"
            }
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (skip Pre-Debug)",
            "executable": "C:/Users/*/Desktop/code/demo/demo/.pio/build/esp12e/firmware.elf",
            "projectEnvName": "esp12e",
            "toolchainBinDir": "C:/Users/*/.platformio/packages/toolchain-xtensa/bin",
            "internalConsoleOptions": "openOnSessionStart"
        },
        {
            "type": "platformio-debug",
            "request": "launch",
            "name": "PIO Debug (without uploading)",
            "executable": "C:/Users/*/Desktop/code/demo/demo/.pio/build/esp12e/firmware.elf",
            "projectEnvName": "esp12e",
            "toolchainBinDir": "C:/Users/*/.platformio/packages/toolchain-xtensa/bin",
            "internalConsoleOptions": "openOnSessionStart",
            "loadMode": "manual"
        }
    ]
}
Debugger Logs
Processing esp12e (platform: espressif8266; board: esp12e; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 (4.2.1) > Espressif ESP8266 ESP-12E
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES: 
 - framework-arduinoespressif8266 @ 3.30102.0 (3.1.2) 
 - tool-esptool @ 1.413.0 (4.13) 
 - tool-esptoolpy @ 1.30000.201119 (3.0.0) 
 - toolchain-xtensa @ 2.100300.220621 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\esp12e\src\eeprom.cpp.o
src\eeprom.cpp: In function 'void begin()':
src\eeprom.cpp:3:16: error: 'EEPROM' was not declared in this scope
    3 | void begin() { EEPROM.begin(4095); }
      |                ^~~~~~
src\eeprom.cpp: In function 'void end()':
src\eeprom.cpp:5:14: error: 'EEPROM' was not declared in this scope
    5 | void end() { EEPROM.end(); }
      |              ^~~~~~
Compiling .pio\build\esp12e\FrameworkArduino\FS.cpp.o
Compiling .pio\build\esp12e\FrameworkArduino\FSnoop.cpp.o
Compiling .pio\build\esp12e\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pio\build\esp12e\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\esp12e\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\esp12e\FrameworkArduino\LwipDhcpServer-NonOS.cpp.o
*** [.pio\build\esp12e\src\eeprom.cpp.o] Error 1
Compiling .pio\build\esp12e\FrameworkArduino\LwipDhcpServer.cpp.o
========================================================= [FAILED] Took 2.04 seconds =========================================================
Other Extensions

No response

Additional Information

Holding down the ctrl key and clicking on #include "eeprom.h" and #include <EEPROM.h> both go to eeprom.h, but clicking on the EEPROM class goes to EEPROM.h normally.

bugv

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

Reproduce the failure by opening the linked demo project and building it with PlatformIO. Compare resolution of the lowercase eeprom.h include with the uppercase EEPROM.h file and the reported EEPROM compile errors. Done means the correct dependency is found without confusing the two filenames and the demo build succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.