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.

Project Configuration does not preserve comments in `platformio.ini`

See original GitHub issue

Behaviour Change Request

I think this may go in the ‘too hard basket’ … but still have to ask 😉

The (fantastic, btw!) project configuration GUI does some… Makes some questionable changes to the platformio.ini configuration file. I shorten the header text on a lot of mine, and also comment my libdeps lines, but by …

  1. opening the configurator
  2. adding a description
  3. hitting save

… this removes the comments, and re-adds the full header to the file. Also, as noted by another user, it sometimes adds

lib_archive = yes
test_build_project_src = no

on it’s own, even though these options haven’t been touched.

So is it possible to not change lines if they haven’t been modified… i.e. don’t strip the comments, and perhaps not make changes to the header.

2019-11-16_16-20 vscode pio configurator

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
ivankravetscommented, Nov 30, 2019

Sorry, now I understand. You can use custom fields in environment sections. Just add custom_ prefix. For example, custom_env_comment = Simple MCVE environment.

2reactions
TD-ercommented, Nov 30, 2019

Ahhh, formatting? We do not do this. We use native Python’s ConfigParser to save the configuration in a raw INI file. They know better how to do this.

Nope, that’s also not what I meant. See these added (not existing) parameters:

env_comment = Simple MCVE environment
env_description = Simple MCVE environment to build POC for new reported issues

Just to make sure it is not about formatting, I removed the spaces 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Project Configuration does not preserve comments in ... - GitHub
Makes some questionable changes to the platformio.ini configuration file. I shorten the header text on a lot of mine, and also comment my ......
Read more >
“platformio.ini” (Project Configuration File)
ini is a configuration file that lets you set up your development environment, share your code and configurations with others, and leverage a...
Read more >
🔥 PlatformIO Home 3.1 Beta and Project Configuration UI for ...
All comments in platformio.ini are lost; instead the standard header is inserted. The UI doesn't not synchronize with the platformio.ini ...
Read more >
PlatformIO Home 3.1 Beta and Project Configuration UI for ...
Since the project configurator also does not support multiple files, getting rid of comments does not help in keeping the ini files a...
Read more >
Platformio.ini with env:custom_table builds twice?
Now I am confronting a problem I seem not to be able to solve on my ... if I would comment out the...
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