Complier stopped displaying warnings

I use Particle Web IDE. Recently, it stopped printing wardings. I only get Error: Could not compile. Please review your code

It depends on the nature of the issue whether an error/warning log can be produced or not.
If you can provide a SHARE THIS REVISION link we might be able to see what’s causing it and possibly explain why you get such a non-descript error log.

When I build this I do get warnings. You just have to hit the SHOW RAW button.

You have a stray closing brace (}) at line 583
It comes from nesting block comments which often leads to issues.

  someCode;
  /* outer comment
    /* nested comment */
   this should still be commented but is not
  */

this trips the compiler

Show RAW looks like this to me:

201204_fc_recv_1.ino: In function ‘void announce()’:
201204_fc_recv_1.ino:639:9: warning: unused variable ‘averagePulseTime’ [-Wunused-variable]
639 | int averagePulseTime;
| ^~~~~~~~~~~~~~~~
201204_fc_recv_1.ino:640:9: warning: unused variable ‘averageNonPulseTime’ [-Wunused-variable]
640 | int averageNonPulseTime;
| ^~~~~~~~~~~~~~~~~~~
…/build/module.mk:274: recipe for target ‘…/build/target/user/platform-6-m201204_fc_recv_1.o’ failed
make[2]: *** […/build/target/user/platform-6-m201204_fc_recv_1.o] Error 1
make[2]: Leaving directory ‘/firmware/user’
…/…/…/build/recurse.mk:11: recipe for target ‘user’ failed
make[1]: *** [user] Error 2
make[1]: Leaving directory ‘/firmware/modules/photon/user-part’
…/build/recurse.mk:11: recipe for target ‘modules/photon/user-part’ failed

scroll up a bit, there you’ll find this

201204_fc_recv_1.ino:583:5: error: expected declaration before '}' token
  583 |     }
      |     ^
201204_fc_recv_1.ino: In function 'void announce()':
201204_fc_recv_1.ino:639:9: warning: unused variable 'averagePulseTime' [-Wunused-variable]
  639 |     int averagePulseTime;
      |         ^~~~~~~~~~~~~~~~
201204_fc_recv_1.ino:640:9: warning: unused variable 'averageNonPulseTime' [-Wunused-variable]
  640 |     int averageNonPulseTime;
      |         ^~~~~~~~~~~~~~~~~~~

Is there a way to go back to the older style where only line numbers and error occur. I really don’t want all of extra verbiage from the compiler. I would l like something closer to the Arduino compiler

I think that isn’t intentional anyway. This might be due to the fact that device OS 2.0.0 now uses a newer compiler and the Web IDE log parser hasn’t been adapted for that yet.
When you build for 1.5.2 you should still see the error log as usual.

@marekparticle, do we have a timeline for the Web IDE error logs being brushed up for 2.0.0 support?

Hi @ScruffR - thank you for bringing this to my attention. @m_m, do you happen to know the answer?

1 Like

Yes, it was the OS target. I reduced it to 1.52 and everything worked as expected. I did notice the target device is actually at release 0.7.0 so someday, I’ll need to update the photon itself.