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

Lock expands linked filepaths, making pdm.lock not portable at all, not just platform specific. #2240

Closed
1 task done
Jackbennett opened this issue Sep 6, 2023 · 0 comments · Fixed by #2242
Closed
1 task done
Assignees
Labels
🐛 bug Something isn't working

Comments

@Jackbennett
Copy link

Jackbennett commented Sep 6, 2023

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

That said, I suspect the answer involves the workspaces issue.

Steps to reproduce

Building the parent monorepo project and dependencies expands filepaths in the lockfile.

for example;

parent pyproject:

[tool.pdm.dev-dependencies]
dev = [
  "-e foo @ file:///${PROJECT_ROOT}/packages/foo#egg=foo",
  "-e bar @ file:///${PROJECT_ROOT}/packages/bar#egg=bar",
]

foo pyproject depends on bar:

[tool.pdm.dev-dependencies]
dev = [
  "-e file:///${PROJECT_ROOT}/packages/../bar#egg=bar",
]
[project]
dependencies = [
  "bar @ file:///${PROJECT_ROOT}/packages/../bar#egg=bar"
]

The pdm.lock contains an expanded path;

dependencies = [
    "bar @ file:///workspace/persist/monorepo/packages/foo/../bar",
]

and when pdm export runs the filepath is also expanded in the requirements.txt. So if I run pdm sync in CI, this doesn't resolve bar.

Now, hopefully I've made a error in the structure as it was hard to find references. But if I'm supposed to build the file dependency package first I did not find how.

@Jackbennett Jackbennett added the 🐛 bug Something isn't working label Sep 6, 2023
@frostming frostming self-assigned this Sep 7, 2023
frostming added a commit that referenced this issue Sep 7, 2023
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