wandersoncferreira / code-review

Code Reviews in Emacs
https://wandersoncferreira.github.io/code-review/
GNU General Public License v3.0
462 stars 49 forks source link

Fixing issues caused by breaking changes in closql #246

Open phelrine opened 1 year ago

phelrine commented 1 year ago

This pull request resolves an issue caused by breaking changes in closql (#245). The fix was implemented using a commit (https://github.com/magit/forge/commit/af9358dcad4c5146b359b1709184445ff05099db) as a reference.

Furthermore, there was another issue causing test failures due to changes in the return value of -contains-p (https://github.com/magnars/dash.el/commit/112aa7c251a7cf3e5d024e21f205cdba79df5a33#diff-51920e95310ebfbc1ae31709f3b95f89afffbf4f1a6e38e8b2b406e2fb6197eaR28-R29). This issue has also been resolved in this pull request.

abougouffa commented 1 year ago

Thank you for the fix @phelrine. I'm using your fix/closql-update branch util it gets merged, and it's working fine.

cclark-splash commented 1 year ago

I too have been using this branch.

aamikkelsenWH commented 1 year ago

Same here 👍

verdammelt commented 11 months ago

Thank you to @phelrine for this fix!

Any idea if this will be merged in anytime?

leungbk commented 9 months ago

@wandersoncferreira this patch resolves a breaking issue introduced in an upstream dependency; would you mind taking a look?

szabolcs-szilagyi commented 8 months ago

Thank you for the fix @phelrine!

Also for others who encounter this issue with spacemacs:

  1. clone phelsine's repo and checkout the correct branch (fix/closql-update)
  2. add the following config to your setup:
     (use-package code-review
       :load-path "~/Projects/Personal/code-review"
       :after magit forge emojify
       :demand t
       :config
       (setq code-review-auth-login-marker 'forge)
       (add-hook 'code-review-mode-hook #'emojify-mode)
       (define-key forge-topic-mode-map (kbd "C-c r") 'code-review-forge-pr-at-point)
       (define-key code-review-feedback-section-map (kbd "k") 'code-review-section-delete-comment)
       (define-key code-review-local-comment-section-map (kbd "k") 'code-review-section-delete-comment)
       (define-key code-review-reply-comment-section-map (kbd "k") 'code-review-section-delete-comment)
       (define-key code-review-mode-map (kbd "C-c C-n") 'code-review-comment-jump-next)
       (define-key code-review-mode-map (kbd "C-c C-p") 'code-review-comment-jump-previous))
  3. reload the config (SPC f e R)
ParetoOptimalDev commented 7 months ago

The current main branch is broken, but this pull request works great!

szabolcs-szilagyi commented 7 months ago
Not relevant anymore ~following a package update I'm getting:~ ``` Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 3) 4) #f(compiled-function (class &optional livep connection-class) #)(code-review-db-database code-review-db-connection "/home/user/.emacs.d/code-review-db-file.sqlite" t) apply(#f(compiled-function (class &optional livep connection-class) #) code-review-db-database (code-review-db-connection "/home/user/.emacs.d/code-review-db-file.sqlite" t)) closql-db(code-review-db-database code-review-db-connection "/home/user/.emacs.d/code-review-db-file.sqlite" t) code-review-db() code-review-db--pullreq-create(#) ``` ~I don't get how to read lisp stack-trace, so kind of stubbed with this one.~ ~UPDATE:~ ~It dies on this call:~ ```elisp (closql-db 'code-review-db-database 'code-review-db-connection code-review-db-database-file t) ``` ~looking at the method in closql package it changed again maybe? magit forge initializes the connection way different from this form.~

UPDATE no.2: my bad: my config loaded the package from the wrong place... :facepalm:

froh commented 3 months ago

Hi, the melpa version (20221206.113) doesn't have this fix and breaks with the current melpa magit closql package.