Subject: bug#55186: closed (Re: bug#55186: package-definition-location is wrong for inherited packages)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 16 May 2022 04:57:01 +0000

Your bug report

#55186: package-definition-location is wrong for inherited packages

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
55186: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55186
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#55186: package-definition-location is wrong for inherited packages
From: Maxim Cournoyer <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Mon, 16 May 2022 00:56:19 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Ludovic,

Ludovic Courtès <[email-masked]> writes:

> Hi,
>
> Maxim Cournoyer <[email-masked]> skribis:
>
>> Here's another problem with source location I've discovered when
>> attempting to locate the source of `python2-pytest-warnings', which
>> reads like:
>>
>> (define-public python2-pytest-warnings
>>   (package (inherit (package-with-python2
>>                      (strip-python2-variant python-pytest-warnings)))
>>            (properties `((superseded . ,python2-pytest)))))
>
> It works for me:

Thanks for checking, this works for me too now.  I think I was amidst
modifications to the code, that induced me in error.  I've fixed what I
think was a typo in a comment in the code that made my understanding
difficult in the early commits of https://issues.guix.gnu.org/55424.

Happily closing,

Maxim

Subject: package-definition-location is wrong for inherited packages
From: Maxim Cournoyer <[email-masked]>
To: bug-guix <[email-masked]>
Date: Fri, 29 Apr 2022 11:56:34 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Guix,

Here's another problem with source location I've discovered when
attempting to locate the source of `python2-pytest-warnings', which
reads like:

--8<---------------cut here---------------start------------->8---
(define-public python2-pytest-warnings
  (package (inherit (package-with-python2
                     (strip-python2-variant python-pytest-warnings)))
           (properties `((superseded . ,python2-pytest)))))
--8<---------------cut here---------------end--------------->8---

The define-public line is at line 2569, but:

--8<---------------cut here---------------start------------->8---
(define package (car (find-packages-by-name "python2-pytest-warnings")))
(package-definition-location package) location->source-properties)
--8<---------------cut here---------------end--------------->8---

returns 2570, the line below.

Thanks,

Maxim