A strange thing happened to my arduino installation.
I've been debugging a sensor library that uses I2C and calls elements of wire.h I'm using arduino 1.8.5, with the sam extension for the Due. The Due is useful because it's got lots of memory space and works at 3v3. I'm also targeting the much more restricted 32u4 on the Micro, and keep switching board settings. My main problem is accommodating a long i2c transfer, too big for the standard Wire buffers. I also installed a soft i2c library but hadn't started to use it.
I noticed that the Due link was using Wire from somewhere in .arduino/.arduino15/packages/..
At some point, possibly just after denying a library update notification, the build started to fail, unable to find Wire.h which was included from a .cpp file in my library sources. On investigating, I found that my .arduino directory had changed : I now had none of the usual .arduino files (but still had arduino15 in there), I had a new .arduino15 directory but with only the flat files - no packages.
I've tried moving .arduino/arduino15 to .arduino15 and once again have the installed boards in the boards manager, but am still failing to find Wire.h for either the Sam, or the 32u4 when accessed by the library code. I can find it, however, when the top level sketch uses it in a simple test example from the Wire examples.
I can't work out what happened. I can't see any accidental deletion or move in my terminal logs. I haven't changed from arduino 1.8.5 or added a further library through the library manager. It feels as though an upgrade tried to replace .arduino with .arduino15, but got it wrong. Or perhaps I've been building the library incorrectly and it's suddenly bitten me.