[ISSUE] Local compile OK - cloud compile has errors

VS Code Noob here -

Environment
MacOS, Argon:1.2.1, EthernetWing

I built a new project using Workbench - multiple src files etc and it compiles and flashes locally.

Cloud compile produces errors I dont understand

at makeError (/Users/shanevanj/.vscode/extensions/particle.particle-vscode-core-1.5.0/node_modules/execa/index.js:174:9)
	at module.exports.Promise.all.then.arr (/Users/shanevanj/.vscode/extensions/particle.particle-vscode-core-1.5.0/node_modules/execa/index.js:278:16)

Closed folder, created new project and copied Blink app from webIDE. Compiles and flashes locally, compiles and flashes via cloud

Can anyone point me into a direction to search for this error? I found a similar error in another post but having read this I am none the wiser (Srtrangly enough the error is exactly the same except on a different path and OS (windows)

More info about the structure of your failing project might help.
Are you using libraries? Which?
What happens when you comment out the library dependencies in project.properties?
Can you cloud compile the project via CLI (with and without the dependencies)? What’s the output?

This might be easier

image

Libraries installed using Particle:Install Library

Local compile output:

> Executing task: make -f '/Users/shanevanj/.particle/toolchains/buildscripts/1.6.1/Makefile' compile-user -s <

Creating /Users/shanevanj/Documents/Workbench/fMonX/fMonX1/target/module_user_memory.ld ...
Creating /Users/shanevanj/Documents/Workbench/fMonX/fMonX1/target/module_user_memory.ld ...
   text    data     bss     dec     hex filename
  53748    2400    3076   59224    e758 /Users/shanevanj/Documents/Workbench/fMonX/fMonX1/target/fMonX1.elf

*** COMPILED SUCCESSFULLY ***


Press any key to close the terminal.

Now I get something :slight_smile:

In file included from src/ThingsBoard.h:4:0,
                 from src/TIMERS.cpp:2:
lib/ArduinoJson/src/ArduinoJson.h:9:27: fatal error: ArduinoJson.hpp: No such file or directory
 #include "ArduinoJson.hpp"

however ...

image

The file is in same folder ?

Yup, precomipled header files have been posing problems in the past already since only .h, .cpp and .c files got condsidered in the build process.

I’m not sure whether this got addressed already for local and/or cloud compile.
Would require some testing.

1 Like

Interesting - yet using same library in WebIDE it complies fine?

https://go.particle.io/shared_apps/5d44049f1a811b001da7561e

So I moved to workbench due to WebIDE limitations (mostly the multiple tabs issue) and now I cannot update my cloud devices - Could you suggest a workaround? I am out of ideas :slight_smile:

Sorry, for being unclear on that - I meant cloud building locally stored files as .hpp files wouldn't be uploaded to the cloud compiler - in Web IDE the files are already present on the build farm and hence it works.


Update:
When you look at the cloud compile output you should see something like that

Including:
    lib\ArduinoJson\src\ArduinoJson.h
    src\XenonSerTest.ino
    src\XenonSerTest.cpp
    project.properties
attempting to compile firmware 

This clearly shows the .hpp file is not uploaded and hence missing for the compile.

@m_m, this is a somewhat annoying behaviour of CLI that frequently creeps up and I've been proposing (e.g. here) to provide a simple way to inlcude additional file types for CLI.
We used to have a (in old CLI) a spark.include (and for completeness a spark.ignore) file that would cater for that. Can we have that back, please? :pray:

2 Likes

yep - it’s on my radar for sure. fwiw, there’s the start of a PR for it over here:

2 Likes