Hi all,

On 17/07/26 6:21 pm, Andrew Lee wrote:
> Hi Simon, Toddy, (cc' Nilesh)
> 
> On Fri, Jul 17, 2026 at 8:49 AM Simon Josefsson <[email protected]> wrote:
>>
>> Andrew Lee <[email protected]> writes:
>>
>>> I update the MigrationFAQ page and added `CRITICAL: Always Align
>>> XS-Go-Import-Path with go.mod`.
>>>   https://wiki.debian.org/Teams/DebianGoTeam/MigrationFAQ
>>
>> Thanks!  I didn't understand this.
> 
> Thank you for point this out Simon. I beleve you are not the only one
> who has this questions in mind. I will explain how the dependencies
> resolving works under `module-aware builds` in more details below.
> (Toddy: Please correct if I am wrong)
> 
>> Can we get a lintian check for this added ASAP?

The "critical" thing listed there, I suppose, is implemented in
https://salsa.debian.org/lintian/lintian/-/merge_requests/757 and a
follow-up https://salsa.debian.org/lintian/lintian/-/merge_requests/759

The v2/v2 thing smells same as 
https://lintian.debian.org/tags/repeated-path-segment.html

> I pass this to Nilesh with my explaination below.

Repeating myself again: Please file bug reports on lintian for all and any 
support you
need on this, including what tags you look for. This will escape my radar 
otherwise.
I'm not attending debconf and have limited time; so it is hard (practically 
impossible)
for me to proactively follow up on everything here.

> ...
>
> To make this mapping to works, the directory structure shipped in -dev
> package must match the path expected by go compiler with go.mod file
> as well.
> 
> After understoodd how go compiler resolves with new dh-golang 1.66,
> helps us to understand how to handle the -dev packaging:
> 
> * No more multiple XS-Go-Import-Path: We no longer need to list
> multiple paths in XS-Go-Import-Path. The XS-Go-Import-Path should only
> declare a single TOP-level of the modern module path. Unless some
> special case that GOPROXY handles the legacy rename mappings(eg: yaml
> package). And for us, the legacy path compatibility is handled purely
> on the filesystem using symlinks.

This might mean a lintian check is necessary for cases with multiple values
in that field, but even better would be for dh-golang to simply refuse to
build packages with multiple XS-Go-Import-Path. I'd prefer the latter.

> * Subdirectory modules: If a project doesn't have a root go.mod and
> only contains modules nested in subdirectories, XS-Go-Import-Path
> still shouldn't point to those submodules. It always remains the
> single root identifier for the entire source tree. So that we should
> still point XS-Go-Import-Path to the TOP-level of the modern module
> path.

I think there isn't much or anything for lintian to do anything here. LMK
if that is not the case (and please file bug reports about it instead).

Best,
Nilesh


Reply via email to