apache / buildstream-plugins

BuildStream plugins
https://buildstream.build/
Apache License 2.0
4 stars 5 forks source link

cargo: Pass the crate path to translate_url() #60

Closed abderrahim closed 7 months ago

abderrahim commented 8 months ago

As we can no longer use urljoin, we assume that the crates repository url has a trailing slash. This is an incompatible change, but we can't support both the trailing slash and non-trailing slash cases as we might be unable to know whether the url provided has a trailing slash or not (e.g. if it is an alias).

This behaviour is now incompatible with 2.0, but is the behaviour requested in https://github.com/apache/buildstream-plugins/pull/52

To keep the compatibility with older buildstream versions, we check the version and only use suffix with buildstream >= 2.2.