question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Git platform_packages not fetched correctly

See original GitHub issue

What kind of issue is this?

  • PlatformIO Core. If you’ve found a bug, please provide an information below.

Configuration

Operating system: macOS

PlatformIO Version 5.0.2a2

Description of problem

Specifying a custom Git URL in platform_packages sometimes doesn’t work. The specified Git repo appears to be cloned, but ~/.platformio/packages/framework-X does not end up with the correct files. Instead, it ends up containing a few files for something called json-patch-test-suite.

Steps to Reproduce

Use an env like this:

[env]
platform = espressif32
framework = arduino, espidf
platform_packages =
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.0
  framework-espidf @ https://github.com/espressif/esp-idf.git

Run pio run.

Actual Results

Based on CLI output, both frameworks above appear to be cloned. The Arduino framework appears to end up in the correct spot, at ~/.platformio/packages/framework-arduinoespressif32.

However, the ESP-IDF framework disappears into the ether. The ~/.platformio/packages/framework-espidf directory ends up with a scant few files:

[~/.platformio/packages/framework-espidf]$ ls
README.md              cjson-utils-tests.json package.json           spec_tests.json        tests.json             version.txt

The contents of the package.json and README in there indicate that this is something called “json-patch-test-suite”. No idea how it got there.

Expected Results

Expect a copy of the ESP-IDF from the specified Git URL to end up in the right place.

Additional info

Using git@github.com:espressif/esp-idf.git instead of a HTTPS URL still has the same issue. Using my own ESP-IDF fork (tidbyt/esp-idf) has the same issue.

Notably, this all worked fine before upgrading to PlatformIO Core v5. Not sure if #3624 is related.

If problems with PlatformIO Build System:

The content of platformio.ini:

[env]
platform = espressif32
framework = arduino, espidf
platform_packages =
  framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#idf-release/v4.0
  framework-espidf @ https://github.com/espressif/esp-idf.git
board_build.cmake_extra_args = -DPYTHON=python3
board_build.embed_files =
  src/assets/ble.webp
  src/assets/boot.webp
  src/assets/connect.webp
  src/assets/noapps.webp
  src/assets/setup.webp
extra_scripts =
  pre:extra_scripts/pre.py
test_build_project_src = yes
upload_port = /dev/cu.SLAB_USBtoUART

[env:tidbyt-v7]
board = tidbyt-v7
monitor_speed = 115200
monitor_dtr = 0
monitor_rts = 0
monitor_flags = --raw
build_flags =
  -DTIDBYT_PIN_LAYOUT_VERSION=6
  -DTIDBYT_SCL_GPIO=0
  -DTIDBYT_SDA_GPIO=3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ivankravetscommented, Sep 17, 2020

We just use source code from https://github.com/espressif/esp-idf/tags.

You can fork ESP-IDF and add this package.json.

0reactions
rohansinghcommented, Sep 17, 2020

Ah, It does not contain a package.json, that must be the issue. Not sure how it worked with PlatformIO v4.3.4. I’ll fix it, thanks so much!

Just curious, are the scripts that generate the official framework-espidf available somewhere? It would be really useful to be able to see exactly how an upstream ESP-IDF rev becomes a PlatformIO framework-espidf release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

git command output not shown on clone error #8351 - GitHub
I have a private repository I'm trying to clone into an AWS CodeBuild local test environment. The build was also failing in the...
Read more >
git clone: How do I clone an Android 2.2 compatible branch of ...
git clone -b froyo git://android.git.kernel.org/platform/packages/apps/Browser.git. This will fetch every branch as well, but that's not a big deal.
Read more >
Diff - 58eaabc^! - platform/packages/apps/Dialer - Git at Google
+ Fix janky seeking, so that it now works correctly consistently rather than ... directly used the framework MediaPlayer (instead of a custom...
Read more >
Building from source - VMware Docs
Supply Chain -- fetch source * either from Git or local directory ... profiles can customize the default name of the secret (...
Read more >
Package 'sparklines' breaks composer deployment - KoolReport
... git fetch composer install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found