šŸ”„ PlatformIO Home 3.1 Beta and Project Configuration UI for "platformio.ini"

3.1.0-beta.7 is out! See changes Commits Ā· platformio/platformio-home Ā· GitHub

Please re-run pio update and restart VSCode.

What Is New

  • Dropdown list with serial ports for *_port options
  • Autocompletion with known boards, platforms, and frameworks
  • Autocompletion for lib_deps.

Thanks, @pfeerick and @manuelbl for your bug reports and feature requests!

Are we close to the finish? :blush:

1 Like

The autocompletion is very helpful but currently hard to use:

  • If the platform is changed, board and framework are deleted. Very surprising. It would make sense if the value is incompatible with the selected platform. But the framework (Arduino in my test case) was available on both platforms.
  • Framework field is not working:
    • When I start to type, all entries have three dots prepended even if the field is empty (except in a single case I can no longer reproduce). Why?
    • When I select an entry from the autocompletion, the autocompletion disappears and the typed letters remain in the field. (What in fact happens is that the selected entry is inserted outside the visible area of the field content and in addition to the typed letters even though itā€™s supposed to replace it.)
    • Multiple entries are inserted on separate lines but the field height does not grow. So the content is not visible and its not obvious what happens.
    • Unlike the other fields, the framework field has no search icon at the end of the field. Whatā€™s this difference supposed to indicate?
  • At first the lib_deps field didnā€™t work. I entered text, clicked the search icon: no effect. Then after about 20 seconds, it started to work. But it still does not seem to work reliably. I guess itā€™s loading some data in the background. If so, it badly needs some indication that itā€™s working.

I am also confused that a newly created project does not appear in the Projects view. I have to first add it manually (Add Existing) before I can configure it.

Once the above issued have be ironed out, youā€™ll be very close to the finish or even have made it.

1 Like

That looks to be a bug, as itā€™s much worse than that. If, for instance, you merely click on the platform entry, and then click away from it, it clears both the board and framework. I thought at first it worked if you clicked on the auto-complete prompt, but even then it deletes the other entries :frowning:

bad_framework_autocomplete

The triple dots appears to be related to the multi-line nature of the framework field, and I can get it to behave half of the time. It seems to get confused if the field wasnā€™t completely empty to start withā€¦ if there is any whitespace at all, it prepends the ... and will insert the selected entry on a new line. And yeah, it does confuse a bit that the field doesnā€™t auto-expand if add to.

I didnā€™t have any issues with the lib_deps search (yet! :laughing:)ā€¦ I typed, waited 1-1.5 seconds and it gave me optionsā€¦ picked my optionā€¦ and then pressed enter to add it (maybe that last bit isnā€™t so intuitive?) Or sooner if I clicked the search icon. But yes, perhaps a spinner similar to the one used on the main home screen whilst itā€™s searching could be implemented, for when there are issues with internet connection, i.e. slow, etc. I suppose editing existing values is in the ā€˜too hard basketā€™ for now? Or is that a ā€˜go edit the platformio.ini fileā€™ occasion.

lib_deps_autocomplete

Thank you for pointing out the newly created projects arenā€™t addedā€¦ I completely forgot to mention that when I encountered it. IIRC, it does get added if you create it from the Projects page, but not from the home page?

This is on Windows 10 w/ PIO Home 3.1.0-beta.7 & Core 4.1.1b5

Beta 8 is out! We fully refactored auto-completion engine. It should work much better now. Please pio upgrade --dev.

Merry Christmas! :christmas_tree:

1 Like

Looks much better now. The remaining issues are:

  • Projects created from Home do not appear under Projects.
  • The search bar on Projects has no effect.
  • In the rare case of multiple frameworks (e.g. framework = mbed, arduino) they appear in the UI as mbedarduino.

How to reproduce this? Do you use the latest Beta 8?

This is how I can reproduce it:

  • Start Visual Studio Code
  • Click on the Home icon in the status bar
  • Click New Project
  • Enter:
    • Name: Nano-IoT-3
    • Board: NANO 33 IoT (Arduino)
  • Click Finish
  • Click PlatformIO icon in left bar
  • Click Projects & Configuration in QUICK ACCESS

The just created project is not present in the list of projects even though I probably should.

  • Typing nano in the search bar
  • Press RETURN
  • Click the white search icon on blue background

Nothing happens. The list of projects doesnā€™t change.

This is with PIO Home 3.1.0-beta.8 and PIO Core 4.1.1b6.

It looks like the search works in realtimeā€¦ i.e. after you pause for a moment it does something ā€¦ so thereā€™s no need to hit the button or press enterā€¦ but itā€™s that something that isnā€™t working properlyā€¦ as what it is actually matching/searching for I donā€™t know!

e.g. I can see that when I search for ā€˜pzemā€™ that the list is reduced from four items to three instantly, but why it shows the other two matches I donā€™t know??

And whilst I thought the history issue was only related to the new Projects tab, I just realised the main front screen recent projects list isnā€™t updating.

Home screen add new project

vs

Projects section add new project

But the add existing button on the Projects panel updates the list properly, which is why the PZEM project is listed now.

Also, it seems like the multi-line handling for framework is better (less confusing?), but also worseā€¦ it now wonā€™t let you enter two frameworks at all, and if you have two frameworks present in the file, it mashes them togetherā€¦

i.e. the randomly (and manually) entered

framework = 
  arduino
  simba

got turned into

image

Otherwise seems good! :slight_smile: Hope you guys had a great Christmas! :wink:

Everything is fixed in 3.1.0-rc.1. Please pio upgrade --dev.

@manuelbl @pfeerick @maxgerhardt thank you so much for all your help in 2019! We appreciate this and wish you a very Happy New Year! :christmas_tree: :yellow_heart: :santa:

1 Like

Yup, looks good. Multi-framework definition can still be a bit ā€¦ temperamentalā€¦ but Iā€™ve only got it to play up onceā€¦ and it was just a matter of clearing the field and starting again, so it maybe it was user error. Upload serial port and library dependency auto-complete seem to be working fine on Windows 10. Iā€™ll convert my linux install over to the dev branch later and will see what I can break there :wink:

2020 is shaping up quite nicely already, and itā€™s only day 1! :slight_smile:

Looks almost ready to be released. The only major bug Iā€™ve found is related to the board autocompletion. I canā€™t really pinpoint it but the behavior is somewhat random. Several bugs seem to be involved:

  • Every time it is opened, the custom boards from ~/.platformio/boards are added. The more often it is opened, the more copies of that board appear in the autocompletion popup. And they are not even filtered by the input.
  • After some more test, I suddenly get the same behavior (stickiness, multiple copies) with the ā€œSparkFun RED-V RedBoardā€.
  • The filter does not properly work. Typing ā€œ12eā€ finds ā€œEspressif 8266 ESP-12Eā€ but it does not find ā€œNodeMCU 1.0 (ESP-12E Module)ā€.
  • It seems somewhat random which board is selected (out of multiple matching ones) and what the scroll position is when typing. (It might be related to the mess caused by the custom boards.)

For the next release of Projects & Configuration, you might want to look at these minor issues:

  • If a new configuration is added, it should be selected and brought to the foreground.

  • The board autocompletion on the Projects & Configuration page and in the Project Wizard should look and behave the same.

  • If a configuration is added and given the same name as another configuration, the page behaves strangely. It should probably be prevent from happening in the first place.

    • New options do not appear. Instead they are added to the other configuration with the same name.
    • The same option can be added several times (but goes to the other tab)
    • On save, the two configurations are somehow merged but if two configurations use the same option one of the is lost.
  • If a project has an invalid platformio.ini file, a reasonable error message appears when opening it for configuration. However, the loading indicator remains (even if the error message is closed).

  • The search bar on Projects & Configuration page behaves differently from the search bar on the Libraries and Boards pages. When you type, it immediately filters while you need to press ENTER on the other pages.

  • The autocompletion pop-up for configuration options should also show the value that will be inserted into the field if the item is selected. Otherwise, the behavior is too surprising. Example:

    • I would like to select one of the NodeMCU boards so I type ā€œnodemcuā€.
    • Iā€™m presented with three options: ā€œNodeMCU 0.9 (ESP-12E Module)ā€, ā€œNodeMCU 1.0 (ESP-12E Module)ā€ and ā€œNodeMCU 32-Sā€.
    • I select ā€œNodeMCU 0.9 (ESP-12E Module)ā€. The popup closes and the field does not change. Itā€™s still ā€œnodemcuā€. Thatā€™s correct but surprising.
    • If I click into the field again, the same three options are presented again. A day or a week later, I wonā€™t remember which of the three boards Iā€™ve selected. This ambiguity occurs anytime a board ID is a prefix of another board ID. Additional cases exist, e.g. ā€œbluepill_f103c8ā€ and ā€œbluepill_f103c8_128kā€.
1 Like

I can reproduce this - it seems itā€™s not as fuzzy as it could beā€¦ a search for ESP with an espressif8266 platform selected wouldnā€™t bring up the NodeMCU 0.9 (ESP-12 Module) or NodeMCU 1.0 (ESP-12E Module). Re the randomness, it seems the board in the list that is selected when you press enter is the one that is highlighted, which can be done with cursor keys or mouse. This is without any custom boards present, so you can take that out of the equation at least.

Sorry for the late answer. We were busy with other parts of PlatformIO. We want to finally release PlatformIO Core 4.1.1 next week. Weā€™ve just release PIO Home 3.1.0-rc.2 and fixed all known issues. There are some unresolved things but they are not a blocker.

Please re-run pio upgrade --dev. Can we move to the release phase? Thanks!!!

Iā€™m afraid the board auto completion still does not properly work. Some problems have been fixed (such as searching for ā€œ12Eā€). But after opening the configuration page for the same project again, suddenly my custom board (from ~/.platformio/boards) appears about ten times and doesnā€™t care about the filter.

And Iā€™ve mentioned it before but must have missed the answer: why does copy/cut/paste only work from the main menu but not with keyboard shortcuts or from a context menu (which is not available)? It applies to all PIO screens (Visual Studio Code on Mac) but on the configuration pages I missed it the most.

1 Like

The Project Wizard dialog (opened with New Project form the home page) has the same bug as well. My custom board definition appears once for each platform.

It looks like an issue with PlatformIO Core. Could tell me how is declared your custom board? Does it have platform or platforms field? I canā€™t replicate it. I would be thankful if you can prepare some test boards and send me manifests. Thanks!

Hereā€™s the file:

esp32-solo.json:

{
  "build": {
    "core": "esp32",
    "extra_flags": "-DARDUINO_NodeMCU_32S -DCONFIG_FREERTOS_UNICORE=1",
    "f_cpu": "240000000L",
    "f_flash": "40000000L",
    "flash_mode": "dio",
    "ldscript": "esp32_out.ld",
    "mcu": "esp32",
    "variant": "nodemcu-32s"
  },
  "connectivity": [
    "wifi",
    "bluetooth",
    "ethernet",
    "can"
  ],
  "debug": {
    "openocd_board": "esp32-solo-1.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "ESP32-Solo-1 (generic)",
  "upload": {
    "flash_size": "4MB",
    "maximum_ram_size": 327680,
    "maximum_size": 4194304,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://www.espressif.com/",
  "vendor": "Espressif"
}

Iā€™ve never finished the work on the ESP32-Soloā€¦

Sorry for delay - crazy busy with upcoming PIO Core 4.1.1.

You see multiple times this custom board because you targeted it to all dev-platforms which are installed on your machine. Please add to your board manfiest

{
  ....
  "platform": "espressif32"
...

   ... or
   "platforms": ["espressif32", dev-platform2,etc]
}

This is a bug of VSCode. They do not want to fix it :frowning: See my comment Investigation: do not restart Extension host when first folder changes Ā· Issue #69335 Ā· microsoft/vscode Ā· GitHub

1 Like

Thanks, that fixes it. I guess the platform entry is only needed for the boards directory in .platformio and not for the board definition that come as part of a platform (as I canā€™t see such an entry in those files).

1 Like