-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
pdm: missing editables
module when entering devShell
#1000
Comments
What do you mean by app's python dependencies - in the |
Never mind - I figured it out (at least for me). Place it in the mkDerivation in the module (in the examples in this repo it would be the |
Curious, I've never had that happen before. I'll see if I can debug it later. |
@JonBoyleCoding Were you just asking me to clarify, or does your response indicate that you've run into the same error? I really was hoping someone would know what this was and just tell me I was holding it wrong, so we might be able to help run this to ground by finding a minimal repro. I took a few quick swings at doing so this morning but haven't yet been able to isolate one, and I've got other fires to fight so I may not be able to revisit for a bit. |
I encountered the same error and was asking if you could provide specifics on how you got around it. Thankfully I did manage to get around it for now! |
Gotcha. I did something a little more targeted, but what you're saying sounds fine for a workaround. I don't really love some specifics of the Nix half of this and will probably refactor later, but for reference I just added a new optional/dev dependency group to pyproject.toml containing only "editables". This part looks like: [tool.pdm.dev-dependencies]
# workaround
editables = [
"editables"
] Back in let
get_dev_packages = groups: with groups;
editables.packages //
other_group_i_need.packages;
in {
devShells.default = (pkgs.mkShell rec {
inputsFrom = [
packages.blah.devShell
];
buildInputs = with pkgs; [
# ...
] ++ map (x: (pkgs.lib.head (pkgs.lib.attrValues x)).public) (
pkgs.lib.attrValues (get_dev_packages packages.blah.config.groups)
);
});
} Is your project public, or is it generally fairly small/simple? This may be an easy fix for @purepani if we have a minimal reproduction at hand. My project's private and somewhat large so it'll take me some time to extract something minimal from it. |
I ended up getting the error today while working so I can figure it out based on that. |
It will be public in a few days, but not yet. However if you've already got the error then presumably you can go forward with that. |
@purepani Awesome, if you take a look! I could do as well, if you want and push a reproducer :) |
I'll take a look after work today! |
Looks like this may have been a bug in pdm-backend: pdm-project/pdm-backend#242. |
Even better looks like it was already commited into staging 5 days ago: NixOS/nixpkgs#320924 |
So we just have to wait until https://nixpk.gs/pr-tracker.html?pr=320924 hits nixpkgs-unstable and update the inputs then :) |
Yep exactly |
This is now fixed as far as I can tell! |
I couldn't find other reports of this, so maybe I'm just holding it wrong, but after switching to the pdm module I started getting this traceback when I enter a devShell:
I'm able to work around it by adding editables it to the app's python dependencies.
The text was updated successfully, but these errors were encountered: