{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/4064","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/4064/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/4064/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/4064/events","html_url":"https://github.com/arduino/Arduino/issues/4064","id":114490979,"number":4064,"title":"lib manager overrides core libraries included with 3rd party boards","user":{"login":"soundanalogous","id":401539,"avatar_url":"https://avatars.githubusercontent.com/u/401539?v=3","gravatar_id":"","url":"https://api.github.com/users/soundanalogous","html_url":"https://github.com/soundanalogous","followers_url":"https://api.github.com/users/soundanalogous/followers","following_url":"https://api.github.com/users/soundanalogous/following{/other_user}","gists_url":"https://api.github.com/users/soundanalogous/gists{/gist_id}","starred_url":"https://api.github.com/users/soundanalogous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soundanalogous/subscriptions","organizations_url":"https://api.github.com/users/soundanalogous/orgs","repos_url":"https://api.github.com/users/soundanalogous/repos","events_url":"https://api.github.com/users/soundanalogous/events{/privacy}","received_events_url":"https://api.github.com/users/soundanalogous/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-01T20:28:34Z","updated_at":"2015-11-01T22:09:45Z","closed_at":null,"body":"I'm encountering several library compatibility issues lately. I believe these are due in part to the library manager and that if you update a library via the lib manager (the Servo library for example) that is also included by 3rd party boards (via the board manager or 3rd party installers such as the Teensy installer) the library installed by the lib manager will take priority.\r\n\r\nA couple of specific examples:\r\nArduino Zero required a newer Servo library than was included in the latest Arduino release. This could be resolved by using the library manager to install Servo v1.1.0. However this version of Servo was incompatible with non SAMD architectures (although this appears to have been resolved in Servo v1.1.1). However 3rd party boards such as Teensy include their own version of the Servo library. Updating Servo via lib manager however will now include that version rather than the version of the lib included with the 3rd party board. Same problem with Intel Galileo and Servo library.\r\n\r\nI've noticed the same incompatibility issues across boards with the Ethernet and SPI libraries as well (I believe it's related to this issue: https://github.com/arduino/Arduino/issues/3961).\r\n\r\nSo there are actually 2 issues here:\r\n1. lib manager overrides core libraries included with 3rd party and board manager installed boards\r\n2. core libraries are not compatible across all official arduino boards (when they should be) - due to issues in core library support for new boards (is anyone testing this before release?)\r\n\r\nSome possible solutions:\r\n- Give priority to core libraries included with 3rd party boards (installed by means other than the boards manager) and by boards installed and updated via the boards manager. Include those libraries instead of core libraries updated via the library manager. Maybe there would be a clever way to override on a case-by case basis (for example I wouldn't want the Teensy version of Firmata included when the latest Firmata version supports all Teensy boards).\r\n- Consider including core libraries in all architecture variants. For example include Servo in samd instead of trying to maintain a all in one version for all avr, sam and samd, especially when new boards are available before they are fully compatible with the core software.\r\n- Consider a way for the library manager to be architecture aware. This would enable updating a library for only certain architectures.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/152869242","html_url":"https://github.com/arduino/Arduino/issues/4064#issuecomment-152869242","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/4064","id":152869242,"user":{"login":"lmihalkovic","id":1318077,"avatar_url":"https://avatars.githubusercontent.com/u/1318077?v=3","gravatar_id":"","url":"https://api.github.com/users/lmihalkovic","html_url":"https://github.com/lmihalkovic","followers_url":"https://api.github.com/users/lmihalkovic/followers","following_url":"https://api.github.com/users/lmihalkovic/following{/other_user}","gists_url":"https://api.github.com/users/lmihalkovic/gists{/gist_id}","starred_url":"https://api.github.com/users/lmihalkovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmihalkovic/subscriptions","organizations_url":"https://api.github.com/users/lmihalkovic/orgs","repos_url":"https://api.github.com/users/lmihalkovic/repos","events_url":"https://api.github.com/users/lmihalkovic/events{/privacy}","received_events_url":"https://api.github.com/users/lmihalkovic/received_events","type":"User","site_admin":false},"created_at":"2015-11-01T22:09:45Z","updated_at":"2015-11-01T22:09:45Z","body":"I've been playing with the IDE code for a couple days. One of the things I was considering was to change the way libraries are stored. The current layout is something like this:\r\n\r\n```\r\nlibraries\r\n   libABC\r\n       file1\r\n       file2\r\n   libDEF\r\n       file1\r\n       file2\r\n```      \r\n\r\nI was thinking about following the unix model and doing something like:\r\n```\r\nlibraries\r\n   libABC\r\n       1.0.1\r\n           file1\r\n           file2\r\n       1.0.8\r\n           file1\r\n           file2\r\n   libDEF\r\n       2.0.0\r\n           file1\r\n           file2\r\n```      \r\n\r\nThis would take care of keeping multiple versions of any given library. The problem is that it requires a new mechanism to let the compiler know which one to use. \r\n```\r\n{ \r\n  ' this is a simplified JSON file following the Ninja format\r\n  depends [\r\n    {\r\n      name: libABC\r\n      version: 1.0.8\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nNo matter what, I may need something like that for the other changes I am making. In the following screenshot, the 'references' section contains a list of the system libraries that the sketch uses. This test sketch only requires Wire but the list is still missing filtering code.\r\n\r\n<img width=\"206\" alt=\"screen shot 2015-11-01 at 11 06 05 pm\" src=\"https://cloud.githubusercontent.com/assets/1318077/10871649/45182a32-80ed-11e5-920b-5f524ed5034c.png\">\r\n"}}