SPIFlash library conflict win Arduino

Started by Explorer, February 03, 2016, 02:21:45 PM

Explorer

Hi,
I just ran into this and hope it helps others. (I searched for this posted already and could not find it)

There is a default SPIFlash library in Arduino (version 1.6.7) that points to: https://github.com/Marzogh/SPIFlash 
***This is not the same as Felix's SPIFlash library*** 

If you do an "Update" it will overwrite the one that you downloaded from Felix at:
https://github.com/LowPowerLab/SPIFlash

The library that is registerd with Arduino has completely different commands (such as not having "initialize()")

***********
Felix: Maybe you could rename yours to SPIFlashMote??  It would save others from having this issue :)

Felix

I think they should rename theirs since mine is older :)

Explorer

Felix:
Yes - agree they stepped on your toes! Maybe thereis  a way to "block" theirs and/or have it never lookup the other one?

PS:  Have 3 mote sensors running live now.  2 on batteries for more than 1.5 years! (temp, humid, light, motion)

TomWS

Quote from: Felix on February 03, 2016, 02:41:41 PM
I think they should rename theirs since mine is older :)
And better too, I'll bet!  ;D

Felix

I don't know about better, but i hope so. Mine is very basic compared to that other one.
When I create a library I search online for similar stuff, and also for the naming. Others apparently don't bother.
I don't know what it takes to filter/distinguish my library, if its even possible. If someone else knows please share a pointer here.
I found this open issue which looks similar to what we're talking here.

Explorer

Yes that is the same issue and it is bad design.  A "first come first served" model with no vetting that I can see.

The Arduino team seem to keep the library list in their own (somewhat filtered) database.  No vetting with the "public" that I can see.  At least that would capture some of the naming outlaws as well as testing phase for a library.

For the Mote users I suggest for now don't click "update" on the SPIFlash library in the Arduino IDE Library Manager application.


Felix

Over the past few major revisions of the IDE there have been vast changes ("improvements" in quotes for now). All of which seem to increase the feature list but for some reason left me confused and wondering how to really use them and what's really going on under the covers. I have defaulted back to the plain IDE 1.0.6 every time I tried the greater versions, 1.6.7 included. I hate most of the new features, don't know why. In 1.0.6 the library management is mostly manual but I know what to expect so once learned (like bike riding) you never forget so it's easy. If people are brave and use 1.6+ they will learn the hard way what to expect in some aspects similar to this discussed here. That's almost OK when the outcome is actually positive. But in most cases I feel it's negative and the blame will broadcast away from Arduino.
Oh well, maybe this cloud of dust is a result of the wars of Arduino where they spend the good energy on destructive warring between them instead of coding their IDE-for-idiots properly. Actually it's a community effort so I'm not really surprised of the outcomes.

TomWS

Quote from: Explorer on February 03, 2016, 08:21:09 PM
For the Mote users I suggest for now don't click "update" on the SPIFlash library in the Arduino IDE Library Manager application.
LOL!  I think that is sound advice for ANY Arduino user - NEVER click "update" on anything!  If it ain't broke, don't fix it - if it's broke, fix it yourself!

Tom