-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
feat: install plugins from project config #1893
Conversation
/cc @tgolsson @noirbizarre may be interested. What do you think about the naming? Would a more verbose name like |
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #1893 +/- ##
==========================================
- Coverage 85.43% 85.35% -0.08%
==========================================
Files 100 99 -1
Lines 9137 9172 +35
Branches 1970 1983 +13
==========================================
+ Hits 7806 7829 +23
- Misses 900 909 +9
- Partials 431 434 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
I've personally never installed a cargo plugin as a dev dependency and I wouldn't expect that to work as you can normally only depend on libs. Thus, I do think more specific naming would be good. What about In essence: does the specialness of the plugins warrant more special workflows, as opposed to overloading existing commands with "similar" functionality. If keeping it as a dev-dep group I'd definitely call it |
I agree with @tgolsson. I rely on a PDM plugin locally but not in CI, and therefore would prefer that it does not get installed by default. Amazing feature anyway, great work @frostming! |
I don't particularlymind if they get automatically installed though. I was just positing that they are a conceptually third kind of dependency. :-) |
Signed-off-by: Frost Ming <[email protected]>
I put them in dev-dependencies because I also want the plugins to be locked while reusing the lock ability. However I agree that plugins should not be install by default but should be requested explicitly. I am about to move it to its own configuration field, is it acceptable that we do not create locks for plugins? |
That's an aspect I hadn't considered, but I think it could be argued both ways. Pants doesn't, and I haven't felt any major issues working with it so far - but I also always do strict pinning Though that only solves some issues, not all. Presumably it could be retrofitted with locking capabilities if it turns out to not work well enough? |
Signed-off-by: Frost Ming <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
Signed-off-by: Frost Ming [email protected]
Pull Request Checklist
news/
describing what is new.Describe what you have changed in this PR.
Resolve #1461
This adds a config field
tool.pdm.plugins
as a list of plugin requirements. When user runspdm install --plugins
, the dependencies will be installed to a project plugin library under the project root, which will be gitignored by default.Then, the following invocations of PDM will add the path to
sys.path
and load the plugins in it.