Sometimes your code is compiling in the CI and it gives an indication that a library file is missing. This is definitely possible. Just as you need to use a .test.only file to select the board (as the compiler doesn't know which one you used), the compiler also doesn't know all the libraries you used in the Arduino IDE.

The Adafruit CI includes many libraries in it's compilation process. But the libraries are changing all the time and some relatively new library may have been added and used by a guide developer and it isn't in Adafruit's list to include.

Generally only Adafruit developers will add new libraries to the CI list. All PRs on the file below should be well documented as to the intent on changes.

Where Libraries are Listed for the Learning System

In the main Adafruit Learning System Guides repository is a file named library.deps. That file has one line listing the library names automatically loaded by the CI.

Getting the Library's Name

The library.deps file uses the specific library names separated by a comma and space,

A specific library name if found as follows:

Go to the directory housing the library in GitHub.

There should be a file named library.properties in the source files for the library.

Look in the library.properties file for a line with "name="

All the next after the equals sign is the library name you'll be adding to library.deps.

Note some library names include the word Adafruit, some include the word Library, but it may not. This is why you must use the text exactly as listed after the equals sign.

Example: Here is the the contents of library.properties for the Adafruit BMP280 Library:

name=Adafruit BMP280 Library
version=2.4.2
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library for BMP280 sensors.
paragraph=Arduino library for BMP280 pressure and altitude sensors.
category=Sensors
url=https://github.com/adafruit/Adafruit_BMP280_Library
architectures=*
depends=Adafruit Unified Sensor, Adafruit BusIO

The name of the library is all the text on line with name=. So this library name for our use is "Adafruit BMP280 Library"

Putting in a PR for a Library Addition

Do a Pull Request on an edited version of library.deps. The change consists of editing the file to add a comma and space after the last library listed. Then put the library name you found in the step above to the list of libraries.

The Pull Request should be rather descriptive as to why you're changing the file - generally including a new library defined by Adafruit.

When your PR is approved, you can rerun the CI on your Adafruit Learning System guide code.

This guide was first published on Oct 19, 2021. It was last updated on Oct 19, 2021.

This page (Missing Libraries) was last updated on Dec 04, 2021.

Text editor powered by tinymce.