platformio/platformio-core

Silent failure when dependency path is incorrect in library.json

Open

#4901 aperta il 19 apr 2024

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Python (791 fork)batch import
help wantedpackage management

Metriche repository

Star
 (7329 star)
Metriche merge PR
 (Merge medio 109g 16h) (5 PR mergiate in 30 g)

Descrizione

Configuration

Operating system: Windows

PlatformIO Version: 6.1.14

Description of problem

If you put this in a library.json file:

{
  "dependencies": {
    "nonexistent_lib_1": "symlink:../hfzehfzeiohize",
    "nonexistent_lib_2": "file:../hrfiohgeuibz"
  }
}

PlatformIO will happily tell you:

Library Manager: Installing symlink:../hfzehfzeiohize
Library Manager: Installing file:../hrfiohgeuibz

even though none of those paths exist. This makes tracking path issues painful.

Expected Results

I would expect:

Library Manager: Installing symlink:../hfzehfzeiohize
PackageException: Can not create a symbolic link for `../hfzehfzeiohize`, not a directory

or:

Library Manager: Installing symlink:../hfzehfzeiohize
VCSBaseException: VCS: Unknown repository type symlink:../hfzehfzeiohize

Guida contributor