google / magika

Detect file content types with deep learning
https://google.github.io/magika/
Apache License 2.0
7.75k stars 412 forks source link

Pin which version of rust client to use when building the python package #714

Open reyammer opened 1 week ago

reyammer commented 1 week ago

The current python package build process just takes the latest rust binary we have under git. This is not ideal; we may want to select which specific version of the rust binary to pick for a given python package. For example, we may not want to use the latest v-*-rc.* rust binary, but we may want to pick a stable release.

We could implement this by improving the python build package script to do a clean checkout of a specific rust binary (rust releases should be tagged with rust-*, we could use those tags as reference points).

Regardless, I think it's important to decouple whatever rust's code "lives in main" and what we add to the python package.

@ia0, thoughts?

ia0 commented 1 week ago

Yes, I also thought about this issue, but thought that we would release Python and Rust "simultaneously" (i.e. first Rust and right after Python). In particular, Rust should always be in a releasable state, such that if we want to release Python, we just release Rust first. However, if we really want to release Python without releasing Rust first, then I guess we can do as you suggest (git checkout rust-xxx rust to overwrite the rust directory to a previous released version).