Downgrade platformio

Hi!

I upgraded platformio from 2.8.6 to 2.9.0.
After that a arduino-project produces tons of “error: ‘any_function’ was not declared in this scope”.
also tried with 2.9.1.dev0.
how can I downgrade to 2.8.6.

Thank you in advance!

Robert

  1. Could you share here INO file which produces this error?
  2. Try to rename INO to CPP.

Its a large project with many files in ugly style.
I’v also tried to rearrange it a little bit, including renaming it to .cpp with no success.

Is there do way to downgrade to 2.8.6?

There must be some other way how 2.9.x include functions.
I’v moved all ino-files containing function in one big header file included by main.cpp and sorted these functions in the right order.
It’s compiling now but maintenance is almost impossible now.

Robert

The INO to CPP converter has significantly refactored and optimized. I know about this issue with &prototype, see Build error after the "Big Update" · Issue #639 · platformio/platformio-core · GitHub.

Do you have constructions in INO file with &protoype?

P.S: I’m working on fixing.
P.S.S: If you want to downgrade, please use pip install -U "platformio<2.9"

really tried for hours to figure out what causes the error.
Downgrade to Version 2.8.6 works, thank you!

I’ll try again to figure it out after your update.

Robert

Yes. many of them…

I’ve just added support for pointers to the prototypes. See Handle pointer to the prototypes while converting "*.ino" to ".cpp" /… · platformio/platformio-core@a77cbe5 · GitHub.

Could you try the latest development version? Does it work for you?

I tried with “pip install -U https://github.com/platformio/platformio/archive/develop.zip
with no success.

as i said, my code ist ugly, so probably that’s the reason, so don’t worry.

Robert

Could you share here a few parts before setup() with problematic files? It’s very important for me to understand why it doesn’t work. Does it work with Arduino IDE?

Current version of my software does not run on Arduino-IDE anymore.
Obviously i made some changes in the past.

To test it for you i took an older version, compiled under arduino-ide.
Then- on platformio 2.8.6 - i had to put everything before setup() in a separate header file to compile the code.
with 2.9.0 it does not work at all.

Sorry but I can’t share the code here, it was my first project and it would immediately exhibited as the worst code ever written on this world;)

Robert

I don’t need old code that works under Arduino IDE. I need code/example that doesn’t work under PlatformIO :slight_smile:

Could you create some snippet to reproduce this issue? You can mail me@ikravets.com and I’ll not share your code.

Sorry but i thought you need a code that compiles under arduino-ide AND platformio 2.8.6.

I really want to help you and i tried hard for hours to create a code snippet for you but I did not succeed:(

All I could do is: to mail you the whole code but - believe me - then you’ll only get dirty fingers;)

Robert

No problem, I just want to understand can I improve current INO to CPP converter. Thanks.

PlatformIO 2.9.1 is out! Please upgrade.