Closed LemonBreezes closed 9 months ago
I feel like some new Emacs commit broke Forge.
Same here.
According to the result of bisect with master branch of Emacs git repository, the problem starts with following commit.
commit c55694785e93212d1da5f96123288e596cb24f53
Merge: 4dd4f145b85 4372a056fef
Author: Andrea Corallo <acorallo@gnu.org>
AuthorDate: Fri Mar 1 09:30:44 2024 +0100
Commit: Andrea Corallo <acorallo@gnu.org>
CommitDate: Fri Mar 1 09:30:44 2024 +0100
Merge branch 'feature/type-hierarchy' into 'master'
I think the problem is that the call (forge-get-repository nil)
should match
(cl-defmethod forge-get-repository ((demand symbol) &optional remote) ..
instead of
(cl-defmethod forge-get-repository (((host owner name) list)
&optional remote demand) ...
Maybe this is a upstream bug
Thanks for having this all ready to go, by the time I have made it out of bed. :zzz: :grinning:
I've pushed a fix.
Funny enough, I am working to replace the valid values for the demand
argument with a more descriptive set (not including nil
). Had I merged that already, we might not have noticed this at all. Or maybe it would just have become harder to debug. We might still have to handle the (forge-get-repository (thought-this-never-returns-nil))
case, if only to make debugging that easier.
I've pushed a fix.
Before you pushed your fix, I submitted a bug report to Emacs upstream thinking it was an upstream bug; is there anything that needs to be done upstream? If not, I will close that ticket.
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69520
Leave it open. It's good to have a place to discuss it.
Seems to work, indeed. Test-case:
(cl-defmethod xxx ((a symbol))
(message "symbol: %s" a))
(cl-defmethod xxx (((a b) list))
(message "list: (%s %s)" a b))
(xxx 'foo)
(xxx '(1 2))
(xxx nil)
I'll leave the kludge in forge in place for a few days.
This is the version of
forge-get-repository
that is being run:I've been debugging this for a few hours and I'm stumped.
I'm using the latest Emacs.