-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
4.18 unexpectedly introduces Rust into build requirements #1117
Comments
See #1114 and crate-py/rpds#6 -- if you're on some other platform which now still does not have rpds-py wheels, a PR or issue is welcome.
Your opinion is noted but I (obviously) disagree, this is simply a build time change, not a publicly facing one, and you should be pinning your dependencies. If you want some previous precedent/context, have a look at (the note at the bottom of) pyca/cryptography#5771 |
We generally do loose pins so that fixes to packages get included, but breaking changes don't break things. Am well aware of the cryptography mess. |
Users using any AWS Lambda resources now need to pin jsonschema down: aws/aws-cdk#26300 |
Because some dependencies of jsonschema require the rust toolchain (see 1 and 2), building the charm fails when building and installing some deps of jsonschema. The workaround to this is to install jsonschema from binary, avoiding unnecesary toolchains in the charm and reducing the chance of getting affected by third party dependencies when they are updated. [1]python-jsonschema/jsonschema#1117 [2] python-jsonschema/jsonschema#1114
Because some dependencies of jsonschema require the rust toolchain (see 1 and 2), building the charm fails when building and installing some deps of jsonschema. The workaround to this is to install jsonschema from binary, avoiding unnecesary toolchains in the charm and reducing the chance of getting affected by third party dependencies when they are updated. Other considerations: Other options were considered for fixing the issue, like installing rustc in the charm directly and pinning jsonschema<4.18. The first option seem too invasive as charms will not use rustc for anything during runtime. The last option restricted us from updating the package in the event of a bug fix or if a new version is needed. Installing from binary also has limitations, such as version management, which is now done in charmcraft.yaml and not in the more common requirement files. Fixes: #147 [1]python-jsonschema/jsonschema#1117 [2] python-jsonschema/jsonschema#1114
Because some dependencies of jsonschema now require the rust toolchain (see 1 and 2), building charms that depend on SDI (and therefore pull jsonschema) fail when building because none of them have rustc available when pip installing the charm's python dependencies. Reasoning: jsonschema 4.18.x introduced a dependency on rdps-py which at the same time introduced a dependency on maturin, a python package that requires the rustc toolchain to be built and installed from source. jsonschema 4.17.x does not have that dependency. Links: [1]python-jsonschema/jsonschema#1117 [2] python-jsonschema/jsonschema#1114 Partially fixes: canonical/bundle-kubeflow#648
* build: pin jsonschema to >4, <4.18 to avoid installing 4.18.x Because some dependencies of jsonschema now require the rust toolchain (see 1 and 2), building charms that depend on SDI (and therefore pull jsonschema) fail when building because none of them have rustc available when pip installing the charm's python dependencies. Reasoning: jsonschema 4.18.x introduced a dependency on rdps-py which at the same time introduced a dependency on maturin, a python package that requires the rustc toolchain to be built and installed from source. jsonschema <4.18 does not have that dependency. Links: [1]python-jsonschema/jsonschema#1117 [2] python-jsonschema/jsonschema#1114 Partially fixes: canonical/bundle-kubeflow#648 Co-authored-by: Adam Dyess <[email protected]> Co-authored-by: Andrew Scribner <[email protected]>
Requiring Rust is a non-starter (it's not really bootstrappable, which is a huge security issue) and pinning dependencies is a bad practice. Please fix this. |
This is completely impossible on macOS with Homebrew, as it does not use wheels for Python resources. 🤷 |
This issue did not prevent me from using context
links error
docker images
|
You can also solve the error by setting necessary flags for example flags
log
links |
Introducing rpds-py as a dependency in 4.18 broke builds due to the new Rust requirement for using jsonschema.
IMO this type of change should be a major version change and not a minor one. ie jsonschema should have gone to 5.0.
The text was updated successfully, but these errors were encountered: