platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
330 stars 219 forks source link

New PlatformIO core with old platform-espressif8266 makes platform tasks disappear #259

Open maxgerhardt opened 3 years ago

maxgerhardt commented 3 years ago

What kind of issue is this?

You can erase any parts of this template not applicable to your Issue.


Configuration

Operating system: Win 10 x64

PlatformIO Version (platformio --version): 5.2.1b2

Description of problem

Using an ESP8266 project which specifies the usage of an older platform-espressif8266 version makes the "Platform" tasks disappear (e.g., "Upload Filesystem Image"), although that platform version is capable of doing that.

The PlatformIO core APIs (or the VSCode plugin) should still work when an older platform version is selected for backwards compatibility reasons. Many projects exists that use previous platform versions, and users not seeing the "Upload Filesystem" button is confusing for them.

Steps to Reproduce

  1. Clone https://github.com/maxgerhardt/pio-old-esp8266/tree/old_platform in the old_platform branch
  2. Import into VSCode + PlatformIO
  3. Observe available tasks

Actual Results

No "platform" tasks

grafik

Expected Results

Platform tasks present as when using the latest platform version.

grafik

If problems with PlatformIO Build System:

Per referenced repo. Critical line is

platform = espressif8266@2.2.0

EDIT Corrected above "@3.2.0" to the correct 2.2.0.

Additional info

valeros commented 3 years ago

Hi @maxgerhardt ! Thanks for reporting. It's strange, but I'm not able to reproduce the problem. I cloned that project example, opened in VSCode and I can see the platform-specific tasks: image

Maybe it's a typo, but in the example you use v3.2.0 which is currently the latest available, so I went further and downgraded the platform to v3.0.0 and again the tasks were displayed just fine: image

Any chance there might be something wrong with your platform installations?

maxgerhardt commented 3 years ago

Are you 100% sure you checked out the old_platform branch of the project per instructions? It's using platform-espressif8266 2.2.0

https://github.com/maxgerhardt/pio-old-esp8266/blob/9c3713fcad0179472daadfdc98663ccf04991903/platformio.ini#L37-L41

ivankravets commented 3 years ago

The oldest versions do not use env.AddPlatformTarget API. Do we have a lot of requests for the oldest versions? The simplest solution is to call target directly: pio run -t uploadfs, etc.

maxgerhardt commented 3 years ago

That is also the workaround I proposed in the thread. While that works, many users may be confused why the upload task isn't there in the project and just give up. I don't have a number on that though. The project in question where this occurs is a 3D printer which at this time still uses the old platform: https://github.com/luc-github/ESP3D/blob/39bfde2586a55e5327f00fc04a92926469bc5853/platformio.ini#L39-L41