Writing snapcraft plugins is hard due to lack of API documentation

Bug #1599711 reported by Thomi Richards
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

I find myself having to write a custom plugin, and it's really hard to know what I should be doing in each method of BasePlugin. It would be nice if there was comprehensive API documentation aimed at plugin authors, published online.

Ideally it would cover:

 * Which methods of BasePlugin can be overridded.
  * What plugin authors should do in each method.
  * which attributes are set on the BasePlugin, and what they're for (installdir, builddir etc).
 * When each method on BasePlugin will get called.
 * Functions, classes and methods from the rest of snapcraft that's considered a public, stable API.

Tags: snap-docs
Leo Arias (elopio)
Changed in snapcraft:
status: New → Confirmed
Revision history for this message
Leo Arias (elopio) wrote :

As a first step, we will be publishing a sphinx doc in a website for all the classes and methods of snapcraft. This is not a stable API yet, so next step is to clean the API and agree on what will be the stable and supported API, remove all the internals and nicely document the remaining public parts.

Changed in snapcraft:
importance: Undecided → Medium
tags: added: snap-docs
Changed in snapcraft:
status: Confirmed → Triaged
Revision history for this message
Kyle Fazzari (kyrofa) wrote :

> This is not a stable API yet[...]

You're gonna scare people, Leo :P . To be clear, we do not intend to break the plugin API. I think what Leo is talking about here is the nebulous "other stuff" that is neither public nor clearly internal as of yet.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.