Comments on Arduino 1.5 Specifications

Thanks for taking the time to look at these issues.

Regarding the EEPROM.h, I'm afraid I oversimplified things a bit. I'm also using inline functions that call C code from within the class definition. I don't actually have any C++ code for EEPROM on Teensy 3.0, except in that header. The rest is all C-only, for a number of other reasons I won't mention, for the sake of keeping this reply shorter.

I really do appreciate your offer to merge a pull request quickly. But with 1.5.5 only days from release, I would really prefer to target 1.5.6 and allow more time to carefully consider these complex issues. The last thing I want to do is hastily prepare a pull request and cause breakage in an Arduino release, even if it is labeled beta.

It's tempting to write more regarding the parts of this spec that give my the biggest cause for concern, "core-dependencies=" and "architecture=", but at this moment I'd really prefer to think about these a while longer before more comments. Likewise for customizing the examples.

The library search order is one place where I'd like to make a proposal.

The current IDE should work, more or less, like this:

Let's call ARCH the architecture of currently selected board, and VENDOR its vendor name.

  1. The IDE discards all 1.5 libraries that haven't ARCH in the platform= property.
  2. From the remaining libraries it choose the first matching library by searching these folders, in order:
    a) SKETCHBOOK/libraries
    b) ARDUINOPATH/hardware/VENDOR/ARCH/libraries
    c) ARUDINOPATH/libraries

So putting a library inside ARDUINOPATH/hardware/VENDOR/ARCH/libraries works. Again, here there is another compromise to deal with: we can reorder the path priority for example b) c) a), but this won't let the user the possibility to override vendor-provided libraries.

I agree, a) b) c) is the best search order.

However, I would like to propose a smart strategy for the a) to b) transition. If the user installs a library in their sketchbook, perhaps with "architecture=avr" or any other library.properties line that doesn't match the board they're selected, then b) and c) should be tried to find a better match. Libraries found in b) should always match, and c) is the last location, so really the smart decisions are only truly needed at step a).