code-review icon indicating copy to clipboard operation
code-review copied to clipboard

Fixing issues caused by breaking changes in closql

Open phelrine opened this issue 1 year ago • 9 comments

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.

phelrine avatar Apr 22 '23 01:04 phelrine

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

abougouffa avatar May 15 '23 13:05 abougouffa

I too have been using this branch.

cclark-splash avatar Jun 28 '23 20:06 cclark-splash

Same here 👍

aamikkelsenWH avatar Aug 28 '23 12:08 aamikkelsenWH

Thank you to @phelrine for this fix!

Any idea if this will be merged in anytime?

verdammelt avatar Sep 30 '23 23:09 verdammelt

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

leungbk avatar Nov 14 '23 00:11 leungbk

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)

szabolcs-szilagyi avatar Dec 22 '23 10:12 szabolcs-szilagyi

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

ParetoOptimalDev avatar Jan 10 '24 18:01 ParetoOptimalDev

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) #<bytecode 0x1af10f7b232b0f20>)(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) #<bytecode 0x1af10f7b232b0f20>) 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(#<code-review-github-repo code-review-github-repo-15723cee3090>)

~I don't get how to read lisp stack-trace, so kind of stubbed with this one.~

~UPDATE:~ ~It dies on this call:~

    (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:

szabolcs-szilagyi avatar Feb 01 '24 12:02 szabolcs-szilagyi

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

froh avatar May 27 '24 11:05 froh