Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible with reformatter 20240903.948 #14

Closed
TopSlick opened this issue Sep 6, 2024 · 5 comments
Closed

incompatible with reformatter 20240903.948 #14

TopSlick opened this issue Sep 6, 2024 · 5 comments

Comments

@TopSlick
Copy link

TopSlick commented Sep 6, 2024

Since upgrade of reformatter on melpa to version 20240903.948 , sqlformat-region and sqlformat-buffer are interrupted with message:

sqlformat-region/buffer: Wrong number of arguments: #, 10

Arch Linux, Emacs 29.4, with following customisations

 '(sqlformat-args '("--dialect=postgres"))
 '(sqlformat-command 'sqlfluff)

@purcell
Copy link
Owner

purcell commented Sep 6, 2024

Ah, that's actually because the reformatter-define macro changed in the newer reformatter version recently, so that any users of it (like this package) would need to be recompiled in order to work properly. If you M-x find-library RET sqlformat RET and then M-x byte-recompile-file that should fix the problem, but I'll also make a change to reformatter so that this shouldn't be necessary.

cc @DamienCassou

purcell added a commit to purcell/emacs-reformatter that referenced this issue Sep 6, 2024
This avoids the need to recompile every use of reformatter-define.

At some later point we can make it required again, once we think it's
unlikely that there is deployed bytecode that calls
reformatter--do-region without that parameter.

See #55 and
purcell/sqlformat#14
@purcell
Copy link
Owner

purcell commented Sep 6, 2024

Pushed a reformatter update to MELPA — once it is built and you've installed it, this error should go away. Thanks for taking the time to report it.

@DamienCassou
Copy link

I didn't foresee that, sorry. And thank you @purcell for the quick fix.

@TopSlick
Copy link
Author

TopSlick commented Sep 6, 2024

Recompiled package as described and it (indeed) solved the problem.
Thanks @purcell & @DamienCassou for your reactivity, pointing to the solution, and implementing the solution to MELPA. Top !

@TopSlick TopSlick closed this as completed Sep 6, 2024
@purcell
Copy link
Owner

purcell commented Sep 7, 2024

I didn't foresee that, sorry.

Neither did I! It's one of the risks when shipping packages whose public APIs take the form of macros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants