For a long time now, it has become clearer that having Lektor manage the installation of a project's Python plugins is a significant pain point for maintainers and users. There are a lot of issues that have popped up over the years, from bugs, to missing features. I and some other maintainers are leaning toward minimizing Lektor's role in installing and managing a project's plugin Python packages. @mitsuhiko do we have your go-ahead? Thoughts or concerns?
Regardless of the exact goal chosen, there are the normal concerns about breakages and deprecations in order to prepare users for the changes and not make things unnecessarily hard.
We need to decided what exactly this looks like. For example, this could mean:
Rough option 1) - minimize plugin management:
- Removing the
lektor plugins
command, and it's sub-commands
- Removing the use of the
[packages]
section from project files
- Remove the automated use of
packages/
subdirectory
- Give specific and simple guidelines for installing packages in the docs, such as how to use a very basic Poetry setup, or
requirements.txt
.
- Possibly leave in the ability run a similar command to
lektor dev new-plugin
, though this would likely be modified, at least to match the changed docs instructions. I don't see this, isolated, to be very burdensome, and is potentially very helpful.
In my opinion this option is the best, because
- At presents everyone with a clear demarcation of responsibility, and lets a dedicated package manager do what it was made for
- It reduces maintenance burden to the minimum on this issue.
This plan has the con of potentially removing some convenience features for users, such as only having to understand and use a single program (Lektor) instead of a minimum of two (Lektor and pip/poetry/etc). The burden of choice at least can be minimized by clear instructions in our docs.
Rough option 2) - do some level of wrapping of a preferred packaging tool
Should we try to keep some pieces of lektor plugins
, such as add
, remove
, and list
, and adapt them to match or wrap a chosen tool like Poetry? Should we leave in [packages]
and somehow translate that to invoke a tool like Poetry? Should we auto-install things from packages/
? These goals are somewhat independent, and they may offload some maintenance burden, but they clearly add some too. Choosing this path could mitigate some of the drawbacks of the option 1). In my opinion, that is not a good enough tradeoff.
N.B. there are also several discussions about using a different package management strategy internally to maintain this repo. This wouldn't matter much if we choose option 1), above, but the less we approach option 1), the more it might reduce mental overhead to use the same tool for integrations for projects and to manage this repo itself.
enhancement plugin-related design breaking-change