Particle Libraries v2.0 in particle-cli 1.19.1 drawbacks

After launching the New firmware library manager for Particle Library 2.0 and managing my private libraries in command line with particle-cli 1.19.1 utility I have detected some drawbacks that will be hopefully resolved in next versions of that utility and documentation as well:

  • Command particle help library ends with error “Potentially unhandled rejection [1] TypeError: Cannot read property ‘does’ of undefined…”

  • There is no command particle library validate, which is mentioned and recommended in the example library

  • There is no command in particle-cli for removing private library, or not that feature documented at least.

  • After migration an existing library to version 2.0, the subfolder src/library-name with additional header file is created, which references to the original header file, probably for backward compatibility with former way of referencing libraries in applications. However, the particle-cli fails at example flashing in the command particle library flash <my_device> examples/<example_name>, because it includes both header files and that additional one is considered as the original one at original folder position with reference to the upper folder, which is outside of the library. For the time being that additional folder has to be removed in order to flash example to fimware from command line successfully.

  • The compiler considers the 32-bit data type “word” as unknown now, maybe due to compatibility with 8-bit Arduino platform. However, this data type is still present as a legal data type in the firmware reference documentation.


Thanks so much for the feedback – looking forward to improving libraries beyond our initial release in the upcoming weeks and months.

I’m cc’ing @jvanier into this thread who helped with the development of the new libraries manager in the CLI.

Thanks for dealing with it. I forgot another minor drawback:

  • In the library documentation in the chapter “TESTING THE EXAMPLES” in the command particle library flash <my_device> examples/<example_name> the word “library” should be ommited because the utility does not have such a command for library category.
1 Like

All good points. Thanks for taking the time to write this up!

The offline validate command and private version deletion command are planned for the CLI and the Desktop IDE.

I opened GitHub issues for the unhandled rejection and the word regression.

The example compilation issue with the adapter header file was a bug in the API that was fixed this morning.

I fixed the particle flash <my_device> examples/<example_name> in the docs.