Skip to content

Remove absolute paths used in pdm.lock file#29

Merged
nehabagdia merged 2 commits into
mainfrom
fix/local-dep-path
Mar 1, 2024
Merged

Remove absolute paths used in pdm.lock file#29
nehabagdia merged 2 commits into
mainfrom
fix/local-dep-path

Conversation

@hari-kuriakose

@hari-kuriakose hari-kuriakose commented Feb 29, 2024

Copy link
Copy Markdown
Contributor

What

  • Fix absolute path for local dependency being used in pdm.lock file for backend
  • Add updated pdm.lock file for backend
  • Remove unnecessary pdm.lock file for tool registry as it will always be a local dependency

Why

Indirect local dependencies usually need to be added in their own projects as: https://pdm-project.org/latest/usage/dependency/#local-dependencies.

However, such indirect local dependencies which are not direct dependency of main project appear as absolute paths in pdm.lock of main project, making it impossible to check in the lock file.

How

  1. Add all indirect local dependencies too in the main project (main project here is backend).
  2. Add any local dependencies without version constraints in the sub-project, where the assumption is they are added as direct dependencies in main project itself (sub-project here is tool-registry).
  3. This will cause PDM to add the dependencies correctly in the pdm.lock file in the main project without using any absolute paths.

Notes on Testing

New generated pdm.lock file for backend does not contain any absolute paths.

Checklist

I have read and understood the Contribution Guidelines.

* Fix local dependency path for backend pdm lock file
@jaseemjaskp
jaseemjaskp self-requested a review March 1, 2024 05:06
@nehabagdia
nehabagdia merged commit 27ca54e into main Mar 1, 2024
@nehabagdia
nehabagdia deleted the fix/local-dep-path branch March 1, 2024 05:07
pk-zipstack pushed a commit that referenced this pull request Aug 20, 2025
* Remove unnecessary pdm lock file for tool registry
* Fix local dependency path for backend pdm lock file

Co-authored-by: Neha <115609453+nehabagdia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants