conan
conan copied to clipboard
Feature/builtin compression
Changelog: Feature: Support built-in xz and zstd compression for Conan artifacts Docs: https://github.com/conan-io/docs/pull/XXXX
Close https://github.com/conan-io/conan/pull/14706 Close https://github.com/conan-io/conan/pull/18314 Close https://github.com/conan-io/conan/issues/648
- https://github.com/conan-io/conan/issues/18259
- https://github.com/conan-io/conan/issues/5209
- https://github.com/conan-io/conan/issues/18185
- https://github.com/conan-io/conan/issues/6732
Also for cache save/restore
- https://github.com/conan-io/conan/issues/18255
Maybe we should try to raise a more meaningful error for the cases that you uploaded a package with zstd for example and try to use if in a Python < 3.14. Right now it would be something like:
-------- Downloading 1 package --------
Downloading binary packages in 14 parallel threads
pepitorl/0.1: Retrieving package 461f120128f0af7aba967bf3e9e4aaa5892a82b3 from remote 'develop'
pepitorl/0.1: ERROR: Exception while getting package: 461f120128f0af7aba967bf3e9e4aaa5892a82b3
pepitorl/0.1: ERROR: Exception: <class 'conan.errors.ConanException'> Error while extracting downloaded file '/Users/carlosz/Documents/developer/sandbox/test-compression/conan_home/p/pepitffc37dd6b5ca5/d/conan_package.tzst' to /Users/carlosz/Documents/developer/sandbox/test-compression/conan_home/p/pepitffc37dd6b5ca5/p
file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: ReadError('not an lzma file')
- method tar: ReadError('invalid header')
ERROR: Error while extracting downloaded file '/Users/carlosz/Documents/developer/sandbox/test-compression/conan_home/p/pepitffc37dd6b5ca5/d/conan_package.tzst' to /Users/carlosz/Documents/developer/sandbox/test-compression/conan_home/p/pepitffc37dd6b5ca5/p
file could not be opened successfully:
- method gz: ReadError('not a gzip file')
- method bz2: ReadError('not a bzip2 file')
- method xz: ReadError('not an lzma file')
- method tar: ReadError('invalid header')
Also there's the case of a Client < 2.24 trying to use that package, but for this one I think we can only make a clear documentation about that this case could happen?
-------- Downloading 1 package --------
Downloading binary packages in 14 parallel threads
pepitorl/0.1: Retrieving package 461f120128f0af7aba967bf3e9e4aaa5892a82b3 from remote 'develop'
pepitorl/0.1: ERROR: Exception while getting package: 461f120128f0af7aba967bf3e9e4aaa5892a82b3
pepitorl/0.1: ERROR: Exception: <class 'conan.errors.ConanException'> Corrupted pepitorl/0.1:461f120128f0af7aba967bf3e9e4aaa5892a82b3 in 'develop' remote: no conan_package.tgz
ERROR: Corrupted pepitorl/0.1:461f120128f0af7aba967bf3e9e4aaa5892a82b3 in 'develop' remote: no conan_package.tgz