-
Notifications
You must be signed in to change notification settings - Fork 75
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
Strict dependencies allows binary packages for indirect dependencies #1473
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3055.
|
The fix to this should be to use My current strategy is put this into 3.1 (since 3.0 never hit stable) and just put a warning in 2.x. However I'm interested to hear from @carlcsaposs-canonical and @dimaqq since you're two of the biggest users strict mode. |
why have different behavior for direct and indirect dependencies on strict mode? (my understanding is that there will be no fallback for direct dependencies) If it's not necessary to fall back to building from source for direct deps, I don't understand why it's needed for indirect deps. Since charmcraft is a build tool (not a runtime tool), failing a build and instructing the user to add something to |
Direct dependencies fall back to being able to build from source if there's no binary available. You bring up a good point about what's a big or small deal. I'll have to consider it. |
are you sure? it looks like direct dependencies use |
I mean for ones that have binaries allowed. We don't enforce using binaries for anything - I suppose a backwards-compatible change for 2.x would be that if you're not using |
This reduces the chances of having pip install binary packages as indirect dependencies. Partial fix for #1473
oh I see I think |
This reduces the chances of having pip install binary packages as indirect dependencies. Partial fix for #1473
This reduces the chances of having pip install binary packages as indirect dependencies. Partial fix for #1473
This reduces the chances of having pip install binary packages as indirect dependencies. Partial fix for #1473
@lengau was this partially fixed or fully fixed? looking at the linked commits, I'm a bit confused |
Bug Description
charm-strict-dependencies: true
changes the behavior ofcharm-binary-python-packages
(source)If requirements.txt does not contain all dependencies (e.g. it contains
ops
but notpyyaml
, which is a dependency ofops
), indirect dependencies (e.g.pyyaml
) will be installed from binary wheels instead of from source—even if they are not specified incharm-binary-python-packages
This is because charmcraft uses
pip install --no-binary
with a list of package names in requirements.txtTo solve this, charmcraft should use
pip install --no-binary :all: --only-binary
with a list of package names incharm-binary-python-packages
(allowlist binary packages instead of blocklist source packages, since not all packages are necessarily in requirements.txt). Note that order mattersTo Reproduce
Environment
N/A
charmcraft.yaml
Relevant log output
The text was updated successfully, but these errors were encountered: