[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What to do with version conflicts?



Hello,

On 05/09/2021 08:34, Nilesh Patra wrote:
>
>
> Hi John,
>
> On 5 September 2021 5:04:19 am IST, John Goerzen <jgoerzen@complete.org> wrote:
>> Hello,
>>
>> I am working on packaging lukechampine.com/blake3.
>>
>> Its go.mod says:
>>
>> require (
>>        github.com/klauspost/cpuid v1.3.1
>> )
>>
>> sid has golang-github-klauspost-cpuid-dev but at version 2.0.6. 
>> blake3 doesn't compile with it:
>>
>> src/lukechampine.com/blake3/cpu.go:8:24: cpuid.CPU.AVX2 undefined 
>> (type cpuid.CPUInfo has no field or method AVX2)
>> src/lukechampine.com/blake3/cpu.go:9:24: cpuid.CPU.AVX512F 
>> undefined (type cpuid.CPUInfo has no field or method AVX512F)
>>
>> This looks like a change in API v2 of cpuid-dev.
>>
>> What is the usual path forward here?
>>
>> In this PARTICULAR case, it probably wouldn't be too bad to patch 
>> the user of the library, but I'm not sure about the more general 
>> case.
>
> There can be three ways:
>
> a) Make blake3 compatible with newer version of cpuid
>
> b) downgrade the version of cpuid in unstable
>
> c) provide an old copy of cpuid in a new vendor/ directory in the project source using  multiple orig tarballs
>
> Option 'a' is the best way here. 'b' cannot be done in this case since a few important packages depend on new upstream of cpuid.
> 'c' can be done, but it'd be pretty ugly not usually something you'd like to do.
>
> Hope this helps,
> Nilesh
>

Echoing what nilesh has said, option 'a' is definitely the best.
What you can do if you are not comfortable with Go is opening an issue upstream asking to bump their version
of github.com/klauspost/cpuid.

If you are comfortable with Go you can fork the repository upstream, write a fix to support the latest version
of github.com/klauspost/cpuid and then submit a PR. You can then backport your PR by writing a patch file
and include it in the packaging in order to make it built with github.com/klauspost/cpuid v2.

Once upstream has reviewed and merged your PR, you can update the packaging to the new upstream version
and drop your patch.

Feel free to ask if you need more details.

Cheers,

-- 
Aloïs Micard <creekorful@debian.org>

GPG: DA4A A436 9BFA E299 67CD E85B F733 E871 0859 FCD2


Reply to: