poetry: Skip packages with directory source in lockfile#213
poetry: Skip packages with directory source in lockfile#213sin-ack wants to merge 1 commit intojvolkman:mainfrom
Conversation
Path dependencies are apparently added to poetry.lock as
directory-sourced packages, and this was causing issues.
This fixes the following error:
Traceback (most recent call last):
File ".../tools/poetry_translator.py", line 333, in <module>
main(parse_flags())
File ".../tools/poetry_translator.py", line 274, in main
lock_set = translate(
^^^^^^^^^^
File ".../tools/poetry_translator.py", line 204, in translate
files = files_by_package_name[package_listed_name]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'path-dependency'
|
Given that skip is probably not the expected behavior, should this be behind a flag? directory_deps = "ignore", |
|
It's the expected behavior since we do the same for path dependencies listed in rules_pycross/pycross/private/tools/poetry_translator.py Lines 149 to 151 in f0da947 |
|
(Though I agree that the established behavior can be surprising, so I could create a separate issue for that if you'd like. This one fixes the immediate build failure.) |
Not my repo, just a user 🙂 |
|
Just for my understanding, do you have a small example that causes this scenario? |
Created one here: https://github.com/sin-ack/pycross-pr213-repro/ |
Path dependencies are apparently added to poetry.lock as directory-sourced packages, and this was causing issues.
This fixes the following error: