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

Regression on installing multiple editable dependencies #1787

Closed
hsheth2 opened this issue Feb 20, 2024 · 14 comments · Fixed by #1847
Closed

Regression on installing multiple editable dependencies #1787

hsheth2 opened this issue Feb 20, 2024 · 14 comments · Fixed by #1847
Assignees
Labels
bug Something isn't working

Comments

@hsheth2
Copy link

hsheth2 commented Feb 20, 2024

Installing multiple editable versions causes a panic. This used to work with uv 0.1.5, and works with pip.

$ uv --version
uv 0.1.6
$ uname -mo
Darwin x86_64
$ RUST_BACKTRACE=1 uv pip install -e '/Users/hsheth/projects/datahub/metadata-ingestion/' -e '/Users/hsheth/projects/datahub/metadata-ingestion-modules/airflow-plugin/[plugin-v2]'
   Built file:///Users/hsheth/projects/datahub/metadata-ingestion
   Built file:///Users/hsheth/projects/datahub/metadata-ingestion-modules/airflow-plugin                                                                                              
Built 2 editables in 4.54s
⠹ pycparser==2.21                                                                                                                                                                     
thread 'main' panicked at crates/uv-resolver/src/resolution.rs:125:37:
Every package should be pinned: PackageName("acryl-datahub-airflow-plugin")
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

See datahub-project/datahub#9885 for a live example, or you can also repro by cloning the https://github.com/datahub-project/datahub repo and installing these two paths.

@charliermarsh
Copy link
Member

I believe I know the problem — thanks.

@charliermarsh charliermarsh self-assigned this Feb 20, 2024
@charliermarsh
Copy link
Member

Is there any relationship between the two? Do they depend on one another? Are there any extras involved?

@hsheth2
Copy link
Author

hsheth2 commented Feb 21, 2024

The base acryl-datahub-airflow-plugin package depends on acryl-datahub. The extra is only adding a few other dependencies, but doesn't impact the relationship between the two editable packages.

@charliermarsh
Copy link
Member

Perfect, thanks.

@charliermarsh
Copy link
Member

I’ll make sure it’s fixed by the next release.

@charliermarsh
Copy link
Member

Ugh, sadly the comment you pasted above works for me on main when run on that repo.

@charliermarsh
Copy link
Member

I'm trying to reproduce. What exact commit did you run this against, in the datahub repo?

@hsheth2
Copy link
Author

hsheth2 commented Feb 21, 2024

The CI failure is here https://github.com/datahub-project/datahub/actions/runs/7981141634/job/21792271496?pr=9885. Because we're using the default checkout action, CI ran on a commit that merged that PR into master

That said, I am trying the same commands again locally and it also seems to work for me. I might need to keep digging here

@hsheth2
Copy link
Author

hsheth2 commented Feb 21, 2024

This seems to reproduce the problem:

git clone https://github.com/datahub-project/datahub
cd datahub/metadata-ingestion-modules/airflow-plugin
uv venv venv
source venv/bin/activate
uv pip install --upgrade pip uv wheel 'setuptools>=63.0.0'
VIRTUAL_ENV=venv venv/bin/uv pip install -e ../../metadata-ingestion -e '.[ignore]'

Note that VIRTUAL_ENV=venv venv/bin/uv pip install -e ../../metadata-ingestion -e '.' works, and once that's completed, the original VIRTUAL_ENV=venv venv/bin/uv pip install -e ../../metadata-ingestion -e '.[ignore]' command works fine too, but installing new extras e.g. plugin-v2 fails again.

The ignore extra doesn't actually exist, and is only used to make it easy to append things without needing to conditionally add a comma e.g. ignore,plugin-v2.

The other thing that I didn't mention - the plugin-v2 extra of acryl-datahub-airflow-plugin depends on acryl-datahub[sql-parser]

@hsheth2
Copy link
Author

hsheth2 commented Feb 21, 2024

Seems like the issue shows up when using -e in conjunction with an extra that doesn't exist. I don't think the fact that there's multiple -e directives is related.

I've been able to work around it for now by declaring the ignore extra.

@charliermarsh
Copy link
Member

Thanks -- I'll try to get back to this today.

@charliermarsh
Copy link
Member

Thanks, this was my mistake. Just a bug.

@charliermarsh
Copy link
Member

(The bug was in the error reporting path for editable installs with non-existent extras.)

@charliermarsh
Copy link
Member

Should be fixed in v0.1.7 (out now).

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