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

Dependency conflict: pdf ^3.11.1 incompatible with image ^4.5.2 #1798

Open
dwzrlp opened this issue Dec 20, 2024 · 3 comments
Open

Dependency conflict: pdf ^3.11.1 incompatible with image ^4.5.2 #1798

dwzrlp opened this issue Dec 20, 2024 · 3 comments
Labels
bug Something isn't working needs triage

Comments

@dwzrlp
Copy link

dwzrlp commented Dec 20, 2024

Hello,

I encountered a dependency conflict when using pdf version ^3.11.1 alongside image version ^4.5.2. The issue arises because of the following dependency constraints:
1. pdf ^3.11.1 requires archive ^3.4.0.
2. image ^4.5.2 requires archive ^4.0.2.

This results in an incompatibility between pdf and image dependencies:

Because no versions of pdf match >3.11.1 <4.0.0 and pdf 3.11.1 depends on archive ^3.4.0, pdf ^3.11.1 requires archive ^3.4.0.
And because image 4.5.2 depends on archive ^4.0.2 and no versions of image match >4.5.2 <5.0.0, pdf ^3.11.1 is incompatible with image ^4.5.2.
So, because smart_by_jarod depends on both image ^4.5.2 and pdf ^3.11.1, version solving failed.

Steps to Reproduce:
1. Create a new Dart/Flutter project.
2. Add the following dependencies to pubspec.yaml:

dependencies:
pdf: ^3.11.1
image: ^4.5.2

3.	Run flutter pub get or dart pub get.

Expected Behavior:

Dependencies resolve successfully.

Actual Behavior:

Version solving fails due to the conflicting archive dependency versions.

Proposed Solution:

Consider updating the archive dependency in the pdf package to be compatible with archive ^4.0.2. Alternatively, providing a range of compatible versions for archive would make it easier to resolve such conflicts.

Environment:
• Flutter version: 3.27.1 (stable)
• Dart version: 3.6.0
• OS: macOS 15.2 (darwin-arm64)
• Android toolchain: Android SDK version 35.0.0
• Xcode version: 16.2
• CocoaPods version: 1.16.2
• Java version: OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

Additional Context:

Let me know if you need further details or logs. Thank you for your time and effort in maintaining this package!

@dwzrlp dwzrlp added bug Something isn't working needs triage labels Dec 20, 2024
@saif-ellafi
Copy link

Hi, came to upvote this. archive is a common dependency, any chance we get a newer version around here?

@selvam920
Copy link

any update on this?

@wahahachan
Copy link

I suggest anyone who encountered this can temporarily resolve the issue by changing the dependency setting of the pdf package in pub.dev/pdf-3.x.x/pubspec.yaml

from

dependencies:
  archive: ^3.4.0

to

dependencies:
  archive: '>=3.4.0'

Then execute flutter pub get in your project directory if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

4 participants