Skip to content

[objectbox_generator] Upgrade cryptography #638

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

Closed
1 task done
ziadsarour opened this issue May 25, 2024 · 8 comments
Closed
1 task done

[objectbox_generator] Upgrade cryptography #638

ziadsarour opened this issue May 25, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@ziadsarour
Copy link

Is there an existing issue?

Use case

Because cryptography >=2.0.0 <2.1.0 depends on js ^0.6.3 and cryptography >=2.1.0 <2.6.0 depends on js ^0.6.2, cryptography >=2.0.0 <2.6.0 requires js ^0.6.2.
And because cryptography >=2.6.0 depends on js ^0.6.7, cryptography >=2.0.0 requires js ^0.6.2.
And because objectbox_generator 4.0.0 depends on cryptography ^2.0.5 and mixpanel_flutter >=2.3.0 depends on js ^0.7.1, objectbox_generator 4.0.0 is incompatible with mixpanel_flutter >=2.3.0.
So, because app depends on both mixpanel_flutter 2.3.1 and objectbox_generator 4.0.0, version solving failed.

Proposed solution

Upgrade cryptography that is using a newer version of js

Describe alternatives you've considered

Downgrading Mixpanel to 2.2.0 for now

Additional context

cryptopgrahy is used by objectbox_generator

@ziadsarour ziadsarour added the enhancement New feature or request label May 25, 2024
@greenrobot-team
Copy link
Member

Thanks! However, the current version constraint does allow the latest version of cryptography (currently 2.7.0). No?

cryptography: ^2.0.5

Maybe try to use flutter pub upgrade instead of editing versions in pubspec manually?

@greenrobot-team greenrobot-team added the more info required Needs more info to become actionable. Auto-closed if no response. label May 27, 2024
@techouse
Copy link

techouse commented May 27, 2024

I've made a PR dint-dev/cryptography#181 for that over a month ago, but it's not been merged yet. Until it's merged you can either reference the PR directly or just use dependency overrides, i.e.

dependency_overrides:
  js: ^0.7.1

@github-actions github-actions bot removed the more info required Needs more info to become actionable. Auto-closed if no response. label May 28, 2024
@greenrobot-team
Copy link
Member

@techouse Thanks! So this is nothing that can be fixed by this library. Closing then.

@techouse
Copy link

@greenrobot-team sadly https://github.com/dint-dev/cryptography looks abandoned. Maybe think of a drop-in replacement?

@greenrobot-team
Copy link
Member

@techouse Thanks for the hint! Last update in September 2023, so would not go that far. Anyhow, had a quick look and I don't really see any good alternatives. Suggestions are welcome!

@greenrobot-team
Copy link
Member

greenrobot-team commented Jun 5, 2024

Reopened because we should do something about this as js is apparently commonly used (#643).

Internal issue: objectbox/objectbox-dart#112

The current workaround is to add a dependency override.

@techouse
Copy link

techouse commented Jun 5, 2024

@greenrobot-team FYI package:js has been deprecated in favour of package:js_interop so the dependency override won't work indefinitely. 🙈

@greenrobot-team
Copy link
Member

greenrobot-team commented Oct 22, 2024

Release 4.0.3 has switched to the pointycastle crypto library. It allows recent versions of js, so the any dependency override can be removed. It also has migrated to js_interop internally already, so will likely drop the js dependency with a future release.

To update to this release, for a Flutter project run flutter pub upgrade or for a Dart Native project dart pub upgrade.

@greenrobot-team greenrobot-team added this to the 4.0.3 milestone Oct 22, 2024
@greenrobot-team greenrobot-team self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants