particle-iot / cloud

A place to discuss issues, enhancements, features for: API, Cloud Compiler, Web IDE (Build), Webhooks, Console, and Device Setup
2 stars 0 forks source link

[Web IDE]: Project fails to build due to deleted library #42

Closed ScruffR closed 4 years ago

ScruffR commented 6 years ago

Building ontop of a library sample I used the USE THIS EXAMPLE button for Adafruit_SSD1351_Photon library only to realise I had to change some setting in the library header to fit my hardware. So I created the respective .h & .cpp files copy/pasted the contents of the original library into the files and then removed the library via the (X) icon next to the library name. But that apparently didn't remove the library from my project which then caused a multitude of redefinition errors. Even after adding and re-deleting the library or creating a sharable project snapshot and opening that with in another account the re-definitions didn't go away. Only creating a completely new project and then again copy/pasting over the content of the original project did do away with the re-definition errors.

This is the project in question https://go.particle.io/shared_apps/5aa514ec58f2d924f1000aaf

There should be a way to clean a project in such a case.

MartyMacGyver commented 5 years ago

The hidden project.properties file in this project contains the line dependencies.Adafruit_SSD1351_Photon=0.0.6 despite the fact you removed that library so as to include the files manually. When the library was removed that line should have been removed by the IDE but clearly it was not, leading to errors of the form lib/Adafruit_SSD1351_Photon/Adafruit_SSD1351_Photon.cpp:54:0: multiple definition of "Adafruit_SSD1351::writeCommand(unsigned char)" as the IDE continued to try to use the library despite it being removed from the project.

It's been 8 months and I just hit the same exact bug with a slightly different library. Hopefully someone looks into this eventually because it's hella annoying to waste time hunting down a bug you can't fix within the project you're working on.

ScruffR commented 4 years ago

This issue is still existent! I could describe what I did to get into the same trouble again, but I'm not convinced this will be read by anybody in charge! https://go.particle.io/shared_apps/5dcc7fc3dea0a600059a42fd

We need some way for a clean build.

Sure I could create a new project, copy/paste all the stuff over from the now dead project and life is all well again - but it's not.

monkbroc commented 4 years ago

Hi ScruffR, this issue is something that came up during prioritization. We know the root cause is that there are 2 project.properties file in the same app. We are still looking for steps to reproduce it as it's not clear which action in the Web IDE cause a second file to be created instead of the first file to be modified.

ScruffR commented 4 years ago

I was able to replicate the issue 9 days ago exactly the way I outlined in my opening post - but now when I try to replicate it I'm always getting stuck with a new issue where Web IDE always reports no such file or directory for the header of a just imported library.

image

monkbroc commented 4 years ago

This is resolved. If you still get an error on an existing project, remove the library then re-add it.