particle-iot-archived / particle-dev

Particle Dev package for Atom
https://www.particle.io/dev
Apache License 2.0
183 stars 30 forks source link

Compiler error messages not showing in desktop IDE #203

Closed hairyhoncho closed 7 years ago

hairyhoncho commented 7 years ago

Compile the test program below (note typo for "void" )in the desktop IDE (atom 1.15.0, particle-dev 0.1.20, particle-dev-cloud-functions 0.1.0)

Select "Compile in the cloud". The IDE suppresses the error message and instead returns "Success" in the status bar.

Compile in the web IDE and the compile errors are correctly reported

int led2=D7;
Void setup(){
  pinMode(led2,OUTPUT);
}
void loop(){
  digitalWrite(led2,HIGH);
  delay(1000);
  digitalWrite(led2,LOW);
  delay(2000); 
}
suda commented 7 years ago

Hello, I'm unable to reproduce the issue: screen shot 2017-03-31 at 12 30 52

What's the directory structure of your project?

hairyhoncho commented 7 years ago

screen shot 2017-03-31 at 3 59 08 pm

hairyhoncho commented 7 years ago

Found the problem. Compile is looking at Test.ino (which has stubs but no link to Test.cpp) , code is in test.cpp. Is there a compile switch so that I can use regular C++ file structure ?

suda commented 7 years ago

If you have both .ino file and .cpp file in your src directory, both will be compile. I would suggest moving the files which aren't supposed to be part of the main app itself to a different directory.