Robot-Will / Stino

A Sublime Text Plugin for Arduino
Other
1.58k stars 250 forks source link

strange compilation behaviour #460

Open bidoowee opened 6 years ago

bidoowee commented 6 years ago

I installed stino 3 about ten days ago with the arduino IDE 1.8.3 and have been using it very happily ever since. It is a great project!

I'm seeing some strange behavior during compilation. I've found a workaround, but this seems to be quite bug-like.

I have some reasonably lengthy code divided into two .ino files and a bunch of other .h/.cpp files (I am merging two projects written differently). Everything was fine until this afternoon when I attempted to add a trivial function at the bottom of the main .ino file and the compiler started to throw error: stray '#' in program followed by a whole bunch of does not name a type and not declared in this scope errors in code that compiled fine until then.

I would be searching my own soul, except for the fact that in the Arduino IDE I can compile, upload and run the same code. If I save a new version of the same files in the Arduino IDE (without making any changes to the code), the new version will compile from within Sublime until I add something to the bottom of the main again. If I take away (or comment out) what I have added, the code compiles. I can work around this by adding new code above the last function, but this doesn't seem normal...

A couple of possibly relevant issues:

In the attached file, there is a comment line at the end of the main (filenames starts with Lcd__.ino). If I add code before the comment line, everything is fine. If I add it after, I get errors.

LcdCDTimerMeetsShowtime06.zip

paulskirk53 commented 4 years ago

I have exactly the same issue, but can't get a workaround to work...