Skip to content
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

Changing the dependencies of editable dependencies doesn't change lock file correctly #1640

Closed
1 task done
la-magra opened this issue Jan 21, 2023 · 1 comment · Fixed by j178/pdm#1
Closed
1 task done
Labels
🐛 bug Something isn't working

Comments

@la-magra
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Steps to reproduce

# start new project
git init
pdm init
git add .
# create a subproject
mkdir subp && cd subp
pdm init
# add a vcs dependency to the subproject
pdm add "git+https://github.com/pdm-project/[email protected]"
# now add the subproject as editable dependency
cd .. && pdm add -d -e "./subp"

# now edit the vcs dependency in the subproject
$EDITOR subp/pyproject.toml # change git+https://github.com/pdm-project/[email protected] to 2.4.0
(cd subp && pdm update)

# pdm update the main project
pdm update

# check pdm.lock file or diff

Actual behavior

pdm.lock (and perhaps venv too) are not updated correctly.

[[package]]
name = "pdm"
version = "2.3.2" # !!! bug, should be "2.4.0"

# ...

[[package]]
name = "subp"
version = "0.1.0"
requires_python = ">=3.9.0"
editable = true
path = "/home/****/test/subp"  # !!! bug path was changed
summary = ""
dependencies = [
   "pdm @ git+https://github.com/pdm-project/[email protected]", # correct
]
--- a/pdm.lock
+++ b/pdm.lock
@@ -214,10 +214,10 @@ name = "subp"
 version = "0.1.0"
 requires_python = ">=3.9.0"
 editable = true
-path = "./subp"
+path = "/home/******/test/subp"
 summary = ""
 dependencies = [
-    "pdm @ git+https://github.com/pdm-project/[email protected]",
+    "pdm @ git+https://github.com/pdm-project/[email protected]",
 ]

 [[package]]

Expected behavior

The dependencies of the editable dependencies in the main pdm.lock file should be as declared in the subproject.

Environment Information

$ pdm info && pdm info --env
PDM version:
  2.4.0
Python Interpreter:
  /home/*******/test/.venv/bin/python (3.11)
Project Root:
  /home/******/test
Project Packages:
  None
{
  "implementation_name": "cpython",
  "implementation_version": "3.11.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "6.1.4-arch1-1",
  "platform_system": "Linux",
  "platform_version": "#1 SMP PREEMPT_DYNAMIC Sat, 07 Jan 2023 15:10:07 +0000",
  "python_full_version": "3.11.1",
  "platform_python_implementation": "CPython",
  "python_version": "3.11",
  "sys_platform": "linux"
}
@la-magra la-magra added the 🐛 bug Something isn't working label Jan 21, 2023
@frostming
Copy link
Collaborator

path = "/home/****/test/subp"  # !!! bug path was changed

I can't reproduce this point, but fixed the others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants