-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve PDM plugin development support: PDM breaks entirely if developed plug-in cannot be loaded #878
Comments
I would also like to add my time spent, while working with pdm plugin like pdm-venv I faced few issues like #872 While trying resolving it I faced a problem of not able to figure out a way to identify what all configurations are updated (new or overridden) by that plugin. Thus, while removing a plugin config clean-up was hard. I thought if the plugin API also holds something as |
It is indeed possible: https://pdm.fming.dev/plugin/write/#tips-about-developing-a-pdm-plugin |
I'll check that later. The last time I tried, my plugin was not listed running the pdm Command... |
Ok, I have tried. You are right, the plugin is found, but it breaks pdm entirely, if the entrypoint is wrong. $ pdm install
...
$ pdm
Traceback (most recent call last):
File "/home/developer/.local/bin/pdm", line 8, in <module>
sys.exit(main())
File "/home/developer/dev/pdm/plugins/pdm-bump/__pypackages__/3.9/lib/pdm/core.py", line 219, in main
return Core().main(args)
File "/home/developer/dev/pdm/plugins/pdm-bump/__pypackages__/3.9/lib/pdm/core.py", line 134, in main
self.load_plugins()
File "/home/developer/dev/pdm/plugins/pdm-bump/__pypackages__/3.9/lib/pdm/core.py", line 214, in load_plugins
plugin.load()(self)
File "/home/developer/miniconda3/lib/python3.9/importlib/metadata.py", line 79, in load
return functools.reduce(getattr, attrs, module)
ModuleNotFoundError: No module named 'pdm_bump.cli' I also had an invalid package installed in my conda environment. But its no good, that PDM breaks, if it cannot load a plug-in. This really hard to debug / check. |
Awesome, thanks |
PDM plugins are not available if currently developed
Creating a plug-in is frustrating. My current workflow is as follows:
Add PDM development support
When running PDM inside the project, it is clear, that the current project is not searched for entry points. The idea is to create a (local) configuration value to enable PDM to search the current project for entry points, since the current project will be installed as editable package.
I suggest the creation of a command like
or similar to make PDM (locally) aware, that there is a plugin to search for.
What do you think of the idea? Is there anything I should do better/else when creating a plug-in?
The text was updated successfully, but these errors were encountered: