-
-
Notifications
You must be signed in to change notification settings - Fork 398
IDE picks old version of installed 3rd party library after library upgrade #1153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe the problem is caused by some interaction between Dropbox and the IDE that prevents the IDE from properly renaming the library directory during an install or upgrade, so this leaves multiple library versions lingering around. That issue is tracked here: arduino/Arduino#11203 However, there is another issue here: How should identical libraries be disambiguated. It might make sense to always take the newest library, though in practice the IDE might not really realize that it's looking at two version of the same library (as opposed to two different libraries that both happen to supply the same header file name, in which case comparing version numbers is meaningless). Also, in practice having multiple versions of the same library installed doesn't really make sense, so I'm not sure if this is a case to really support. So I'm inclined to close this issue, and leave just the other one? |
@matthijskooijman When it comes to Dropbox I also keep my sketchbook on it and what many users face is an issue with the specific folder not getting synced. |
If the libraries provide libraries.properties this could be resolved via the URL and VERSION keys. I assume that different libraries have different URLs.
The reality is, when I want to adapt some code of an older project the first thing is to fix the code due to breaking changes in upgraded libs. Like IotWebConf or ArduinoJSON. Or revert library versions to the ones used at the time. This requires of course documentation of the used versions at the time in the code. |
I had a look at the dropbox sync client and the dropbox web site. In the client I found Preferences->Sync->Selective Sync which opens up a window where one can select specific folders which should not be synced from dropbox to local PC. I have ticked Select All here. |
Using CLI you can put different versions of a library (same headers and files) into a folder and use |
that's what I meant, I just didn't remember the words. |
Same here.
Interesting. I am using Windows 10 and NTFS. I am curious, do you too? |
nope. Mac OS here |
Hi!
I am currently working on an ESP8266 based project in Arduino IDE v1.8.13.
I installed Streaming.h via IDE library manager and subsequently upgraded Streaming.h library to the latest version. As it seems I now have two versions of Streaming,h because during compilation I get
Unfortunately the IDE picks version 5.0.0 instead of 6.0.8. (see last -I parameter):
This is also true for other libraries I have installed via library manager, e.g.
The same behavior also on version 1.8.14 hourly build 2021/12/15 11:33.
My expectation was that during compile time the latest version of installed libraries matching board/core/... is used or that I can instruct in the IDE (or even better in the sketch) which library version should be used.
Strangely enough the order of the detected library version list is not the same after restarts. And during compile time most of the time the library version as the first element gets used. So I get errors when using new features not present in old version.
Alex.
The text was updated successfully, but these errors were encountered: