platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.2k stars 192 forks source link

Preload some tasks by default #2018

Open puzrin opened 3 years ago

puzrin commented 3 years ago

In continue of https://github.com/platformio/platformio-vscode-ide/issues/2004#issuecomment-694213164

v2 no longer preload targets to Terminal-> Run Build Task & Terminal -> Run Task by default.

It would be nice to allow developpers customize preloaded targets somehow.


Ideas below are incomplete, and not ideal. Only to start brainstorming.

What is desired, in ideal world:

ivankravets commented 3 years ago

I think the good solution for this issue is to ALWAYS preload tasks from an active working environment (you can switch from the bottom bar).

Also, would be great to SHOW PLATFORM TASKS on the TOP level in "Project Task Explorer. See https://www.reddit.com/r/esp32/comments/jgncc4/thoughts_on_platformio/g9rra1p?utm_source=share&utm_medium=web2x&context=3

Screen Shot 2020-10-23 at 19 41 57

puzrin commented 3 years ago

I think the good solution for this issue is to ALWAYS preload tasks from an active working environment (you can switch from the bottom bar).

IMO you missundersand use case. I have this ones (may be more exists):

For both cases, going to bottom bar env switch is addional loosing of view context.

Also, pay attention, in many cases developper is NOT focused on concrete env.


I suggest to return "load everything" in some configurable form. I can accept fact, that you may not wish do that by default. But if this could be configured by project author for everybody who cloned and opened project first time - fine.

pfeerick commented 3 years ago

But if this could be configured by project author for everybody who cloned and opened project first time - fine.

In that case, in the platformio.ini under the [platformio] would be the best place for a such a preload setting - since it is this file that contains all the project specific settings. There you could list either list one, many or wildcard the envs to preload.

puzrin commented 3 years ago

@pfeerick that was mentioned in first post, with comment "platformio.ini is not correct place to store IDE-specific settings". If this can be done via .vscode/ folder, that would be ideal.

Problem with .vscode/ is - user's local changes should not be added to git commit. And for the same reason platformio.ini is not suitable place.

pfeerick commented 3 years ago

There's never going to be a simple solution that satisfies both. As you point out, .vscode/ should not be synced because that is the local VSCode specific config. That does however leave room for 'pre-load by default', and 'allow local customisation'... , if that is the desired behaviour. However, I also see it similar to environments, where you might only be interested in a couple, or one, or all... hence the default_envs parameter... hm... perhaps it can be heirachical... pre-load all by default (can be disabled by global setting) unless local .vscode override present, else pre-load those specified in default_envs (if specified). The juggling act will be trying to work out the right order... local override should be the most important... probably followed by default_envs... finally pre-load all global setting...

puzrin commented 3 years ago

https://github.com/speedcontrols/ac_sc_grinder/tree/master/.vscode - i use partial .vscode/ sync, to auto-install pio on project open. That's important for users who just need firmware upload. Parial sync works.

Anyway, 2 level of customisation required:

ivankravets commented 3 years ago

Hi all,

We did a lot of improvements in the upcoming PlatformIO IDE 2.2.0 for VSCode. Could you try it? Does it solve this issue?

Screen Shot 2020-11-01 at 00 18 33

puzrin commented 3 years ago

We did a lot of improvements in the upcoming PlatformIO IDE 2.2.0 for VSCode.

Improvments are nice.

Could you try it? Does it solve this issue?

No. Changes are not related to described problem. https://github.com/platformio/platformio-vscode-ide/issues/2018#issuecomment-717832035