Compiler Differences

I’ve been recently using both the Web IDE and Particle Dev to write code for my Photons. Like a few other posts:

Local VS Cloud Compile speed

Particle Dev VS Particle Build IDE Compile Issues

I’ve noticed differences between both the cloud compiler and the Particle Dev compiler, the most significant of these being that I don’t get compile errors thrown with Particle Dev, while they are properly thrown in the cloud, even when there are clear issues with the code (like missing semicolons). I also have an issue with Particle Dev where any firmware I try to build for a product always kicks back an error when trying to upload to the Particle Dashboard (it claims that the product versions don’t match even when they do). Is there a good way to get the local copy of the current cloud compiler?

I’ve also noticed when downloading firmware binaries that they can be very different in size (6k vs 76k) for almost exactly the same code. The smaller firmware versions allow my product devices to update correctly, however, the bigger ones fail in flashing every time. After reading a few posts on maximum allowable firmware size I’m convinced that the issue is the size difference. I’d suspect that this is the difference between a firmware update and full code for my product, can anyone confirm?

Finally, I’ve tried to include several libraries in the Web IDE with #include statements, but the compiler says that no such library exists unless I specifically add it to the project by going to the library and clicking “Include in App”. Is there a way to get the cloud compiler to recognize that it has the library with just the #include statements instead of manually having to add each library?

Nope. That’s how it works (for now)

Are you use the “latest” option on the Web IDE? I’m not 100% sure but i think the Particle dev defaults to the latest firmware.

There’s one in beta right now (more like alpha): https://github.com/spark/particle-dev-local-compiler
but i think for your use case, you should be able to work fine with the :cloud: compiler

Particle dev should should you some error when it is unable to compile properly. Do you have a screenshot showing it not working?

I am using “Latest” on the Web IDE. The compiler in cloud option on Particle Dev is now giving me the opposite problem. Instead of throwing no errors. It’s throwing errors where there aren’t any (See screenshot below. The two errors claim there is a missing constructor in the loop function, but I’m pretty sure the code is good.)



For now it sounds like I’ll have to keep using the Web IDE with the cloud compiler and eventually grab a copy of the local compiler from GitHub.