Libraries vs "sketchbook folder" libraries

Morning all,

When I've installed libraries in the past, I've copied them into the libraries folder in my Arduino installation. That's worked fine, and an example is Henning Karlsen's DS1302 library.

I'm looking at I2C for the first time, and both Adafruit's libray for one of their OLED panels, and Rob Tillaart's I2C_eeprom library, instruct the user to put them into the sketchbook library folder rather.

Is that significant? Co-incidence that both the I2C libraries I've looked at go there?

I'm thinking that the idea of sketchbook libraries is to keep Arduino install libraries separate from user libraries so they don't get zapped in a re-install.... Is that right or is there more to it?

Jim

3rd party libraries go in sketchbook library folder so you don't have to move them with each release of new IDEs.

LarryD:
3rd party libraries go in sketchbook library folder so you don't have to move them with each release of new IDEs.

Thanks

I’m thinking that the idea of sketchbook libraries is to keep Arduino install libraries separate from user libraries so they don’t get zapped in a re-install… Is that right or is there more to it?

That is correct and the longer you use arduino and the more IDE version upgrades you go through the more you will appreciate this feature.

retrolefty:
That is correct and the longer you use arduino and the more IDE version upgrades you go through the more you will appreciate this feature.

Except when the Arduino developers break compatibility, resulting in libraries being incompatible with some IDE versions. Then, you'd be glad to be able to associate the library with the IDE. It's only happened once so far that I know of, but I haven't seen any commitment not to do it again.

PeterH:

retrolefty:
That is correct and the longer you use arduino and the more IDE version upgrades you go through the more you will appreciate this feature.

Except when the Arduino developers break compatibility, resulting in libraries being incompatible with some IDE versions. Then, you'd be glad to be able to associate the library with the IDE. It's only happened once so far that I know of, but I haven't seen any commitment not to do it again.

Well i recall the IDE developers did spend a lot of time explaining and warning of the then upcoming IDE 1.0 and the things it would break. They felt is was important at the time to make the changes to move the IDE from beta to 1.0 and I do think they made a commitment to not force such drastic changes in the future. However one can never make everyone happy all the time and I'm sure there will be those that felt they did more harm then good when moving from beta to 1.0.

It seems to me that it should have been possible to make those changes backwards compatible. The failure to do that meant that everyone has wasted a lot of time and effort trying to figure out which libraries were compatible with which IDE versions - and that cost is continuing today.

retrolefty:
Well i recall the IDE developers did spend a lot of time explaining and warning of the then upcoming IDE 1.0 and the things it would break. They felt is was important at the time to make the changes to move the IDE from beta to 1.0 and I do think they made a commitment to not force such drastic changes in the future. However one can never make everyone happy all the time and I'm sure there will be those that felt they did more harm then good when moving from beta to 1.0.

That is not my recollection of what happened at all.
I would totally disagree that they spent a lot of time explaining and warning, and
more importantly considering the full implications of this "break the world" decision.

Before the changes were made, several of the higher level 3rd party developers,
brought up how it would break 100% of the 3rd party libraries and recommended against handling it the way
the Arduino team wanted to do it.
The 3rd party developer stance was that there were better ways to handle it by including some backward
compatibility support such that the vast majority of libraries could transparently continue to work
"as is" using some behind the scenes compatibility defines, headers, and macros.
Some libraries would immediately break since you couldn't provide backward comparability for everything,
but the vast majority could continue to work, "as is", with no changes, using the backward compatibility.
It was a very very small amount of changes, and the work had already been done.
All that had to be done was to roll it into the official release.

The Arduino team stance was that they wanted the 3rd party developers
to change their code as fast as possible to the "new way" of doing things,
and thought it was a desirable feature to break 100% of the code, since that would force all
the authors to convert their code quicker and the net result would be that all the 3rd party
libraries would be fully converted over sooner.
The Arduino team put no weight on backward compatibility, nor on the support effort that
breaking 100% of the existing libraries would create.
If you search the issues list, you can find their comments, and they consciously decided
to break 100% of the existing 3rd party libraries rather than provide any sort of backward comparability.
They flat rejected providing any backward compatibility and moved forward knowingly and consciously
deciding to break 100% of the existing 3rd party library code base.

To make matters worse, they made the changes after the s/w was already in release candidate state
just before the actual 1.0 release. There was no time allocated for a beta of these changes
much less an RC after these drastic changes were made.
There was a limited release available if you followed the developer forums but it was not generally available and wasn't announced.
This really limited the audience for it.

This is a VERY BAD s/w practice.
This is not a normal s/w release process. Normally, you don't go breaking 100% of your existing
code base that has been very stable for several years between the final release candidate the final release.
If you made that sort of a drastic change, it should knock the release cycle back to beta for while
to allow everyone time to recover. Then after a while move back to RC status and final release.
Nope. They didn't do that, they went from an RC directly to a final release that broke the world.

After nearly 3 years, we are still fighting pre 1.x vs 1.x library issues.

In my opinion, this "break the world" stance was a terrible decision and showed
an immaturity with respect to s/w design and release processes.


If you happen to have a Teensy product, Paul adds in backward compatibility capabilities for his boards.
so most of the older pre 1.x libraries work when used on a Teensy board.
I've gone in and created half a dozen changes to the Arduino core to allow most of the pre-1.x libraries
to work by providing the trivial backward compatibility stuff that the Arduino team rejected.


In terms of not every doing this again....
If you were following the 1.5 library & directory structure changes that was being discussed about 4-6 months ago,
history was about to repeat itself in that the Arduino team was going to break 100% of all the 3rd party
libraries AGAIN in 1.5x
It wasn't until a very heated discussion ensued about the 1.5x library format,
that some of the Arduino team finally grasped the pain of breaking backward compatibility
for the 3rd party library developers.
The original 1.5x format resulted in two different sets of library directory structures,
and they were not compatible with each other.
i.e. you couldn't load an existing 1.x library on 1.5x
and you couldn't load a new 1.5x library on to 1.x

They were living in bubble where everything is released at once and once they did a release, they never looked
back at previous releases and so they never had these sorts of compatibility issues.
Finally, they understood and grasped how the 3rd party world of thousands of libraries doesn't work that way.
And because of this 1.5x library discussion, the 1.5x library format was relaxed to provide backward compatibility
with 1.x libraries and we so now have a 1.5x that can use the existing 1.x libraries.
Had there not been this heated discussion earlier in the year, we would eventually be having all kinds of library
issues in 1.5x just like like we had with 1.0

--- bill

bperrybap:
In my opinion, this "break the world" stance was a terrible decision and showed an immaturity with respect to s/w design and release processes.

I find the IDE useful, and I appreciate that it's free software that the developers have put a lot of effort into, but it's far from perfect and incorporates many decision which IMO indicate poor judgment and immaturity. I wasn't aware that they had been considering a repeat of the 1.0 backwards compatibility fiasco, but I can't say I'm surprised by it.

Ultimately the Arduino group has the right to make any changes that they see fit for their product. Does that potentially place 3rd party developers at odds with them? Of course it does. However, considering that the Arduino IDE is the work of the Arduino group, they have every right to force changes in order to move forward with their development goals. Any third party developers that do not like this reality certainly had the opportunity to simply stop supporting Arduino - nothing was forcing them to do so. Complaining to this day about this subject is simply sour grapes.

kd7eir:
Complaining to this day about this subject is simply sour grapes.

When you make a bad design decision that affects your users for a long time, then you should expect your users to complain about it for a long time. The fall-out from that misguided decision to break compatibility is costing people wasted time and effort even now, years later, and will continue to do so for years to come. Not the Arduino developers who took the decision, of course - they don’t provide community support. It’s mainly Arduino novices who don’t understand why the code they found doesn’t work, and the people here on the forum who spend time helping them figure out what’s wrong, who are paying the cost. Apparently the Arduino developers thought, and perhaps still think, that other people’s time and effort doesn’t matter.

If there is still a library out there that is broken by the changes to IDE 1, then that is abject laziness on the part of the developer. Developing requires CONSTANT changes and updates. The people that make the environment that someone to chooses to develop for have ZERO OBLIGATION to hold people’s hands for something that they are giving away for FREE.

If it’s such a terrible problem I have a solution - STOP using Arduino, STOP helping in the forums, STOP writing libraries, STOP the juvenile whining.

Arduino owes you NOTHING. Their JOB is to develop the hardware. The IDE was simply a GIFT to the community. Nothing is stopping you from tossing the IDE entirely, writing your own libraries and code in assembly, and uploading from the command line through a toolchain that you configured entirely on your own. See, no more “Bad, evil, mean Massimo” tarnishing your coding with his “Terrible, disgusting, up to date, FREE IDE.”

I SERIOUSLY doubt that you, or anyone else here have suffered any harm by the changes to IDE 1. For some unknown reason, people just persist in wanting to make the world think that they are some sort of victim. Get over it or leave - the incessant negativity causes far more harm than ANYTHING that IDE 1 has caused.