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

:ensure nil is now broken #526

Closed
tpapp opened this Issue Nov 30, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@tpapp

tpapp commented Nov 30, 2017

After 32b536f, :ensure nil in use-package gives

Warning (initialization): An error occurred while loading ‘/home/tamas/.emacs.d/init.el’:

error: use-package: :ensure wants an optional package name (an unquoted symbol name)

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
@CSRaghunandan

This comment has been minimized.

Show comment
Hide comment
@CSRaghunandan

CSRaghunandan Nov 30, 2017

Also noticed the same error after updating use-package a few mins ago

CSRaghunandan commented Nov 30, 2017

Also noticed the same error after updating use-package a few mins ago

@tpapp

This comment has been minimized.

Show comment
Hide comment
@tpapp

tpapp Nov 30, 2017

BTW, I no longer think that it was the commit I linked that breaks this.

Also, the problem occurs in some

(use-package some-package
    :ensure nil)

statements that basically replace

(require 'some-package)

Is this OK, or a misuse of use-package?

tpapp commented Nov 30, 2017

BTW, I no longer think that it was the commit I linked that breaks this.

Also, the problem occurs in some

(use-package some-package
    :ensure nil)

statements that basically replace

(require 'some-package)

Is this OK, or a misuse of use-package?

@Silex

This comment has been minimized.

Show comment
Hide comment
@Silex

Silex Nov 30, 2017

Contributor

Is this OK, or a misuse of use-package?

This is ok, it's the only way to override use-package-always-ensure

Contributor

Silex commented Nov 30, 2017

Is this OK, or a misuse of use-package?

This is ok, it's the only way to override use-package-always-ensure

@tpapp

This comment has been minimized.

Show comment
Hide comment
@tpapp

tpapp Nov 30, 2017

I have bisected, and

a1c736f36dae12773e6caf06e547bb6eaaf57e09 is the first bad commit
commit a1c736f36dae12773e6caf06e547bb6eaaf57e09
Author: John Wiegley <johnw@newartisans.com>
Date:   Wed Nov 29 14:41:12 2017 -0800

    Allow :bind ("C-c C-c" . (lambda () (ding))) and #'(lambda ...)
    
    Fixes #333
    Fixes #461

:100644 100644 eb24d2396e3bee08306ab06a1aafde086f10e594 ca6c2a7ceed641e735c110955a091a15f578e3ec M      bind-key.el
:100644 100644 c52c3810439c960a634b769021170c7f9c06d878 830ca644990e0b9111f5f43463ab5b7fb73fed2e M      use-package-tests.el
:100644 100644 68c10f3d1758fd2eed947ceec75a8077c2b37405 2b5de46ca35d79b3bf5126a6f8e93330396cc09d M      use-package.el

tpapp commented Nov 30, 2017

I have bisected, and

a1c736f36dae12773e6caf06e547bb6eaaf57e09 is the first bad commit
commit a1c736f36dae12773e6caf06e547bb6eaaf57e09
Author: John Wiegley <johnw@newartisans.com>
Date:   Wed Nov 29 14:41:12 2017 -0800

    Allow :bind ("C-c C-c" . (lambda () (ding))) and #'(lambda ...)
    
    Fixes #333
    Fixes #461

:100644 100644 eb24d2396e3bee08306ab06a1aafde086f10e594 ca6c2a7ceed641e735c110955a091a15f578e3ec M      bind-key.el
:100644 100644 c52c3810439c960a634b769021170c7f9c06d878 830ca644990e0b9111f5f43463ab5b7fb73fed2e M      use-package-tests.el
:100644 100644 68c10f3d1758fd2eed947ceec75a8077c2b37405 2b5de46ca35d79b3bf5126a6f8e93330396cc09d M      use-package.el
@Silex

This comment has been minimized.

Show comment
Hide comment
@Silex

Silex Nov 30, 2017

Contributor

Here is a link to the above commit: a1c736f

Contributor

Silex commented Nov 30, 2017

Here is a link to the above commit: a1c736f

@oantolin

This comment has been minimized.

Show comment
Hide comment
@oantolin

oantolin Nov 30, 2017

That commit changes a bunch of occurrences of symbolp to use-package--non-nil-symbolp. I don't know how many of those are correct, but the one in use-package-normalize/:ensure certainly isn't, because :ensure nil should be allowed.

The error message in that function is also short-sighted. It says: ":ensure wants an optional package name (an unquoted symbol name)". It should mention that besides a package name you can use t or nil (and, of course, the function should actually let you use them).

As a work around I changed that specific occurrence of use-package--non-nil-symbol back to symbol and re-byte-compiled (byte-recompiled?) use-package.el and now I can start Emacs again. :)

oantolin commented Nov 30, 2017

That commit changes a bunch of occurrences of symbolp to use-package--non-nil-symbolp. I don't know how many of those are correct, but the one in use-package-normalize/:ensure certainly isn't, because :ensure nil should be allowed.

The error message in that function is also short-sighted. It says: ":ensure wants an optional package name (an unquoted symbol name)". It should mention that besides a package name you can use t or nil (and, of course, the function should actually let you use them).

As a work around I changed that specific occurrence of use-package--non-nil-symbol back to symbol and re-byte-compiled (byte-recompiled?) use-package.el and now I can start Emacs again. :)

@Silex

This comment has been minimized.

Show comment
Hide comment
@Silex

Silex Nov 30, 2017

Contributor

@jwiegley: summoning you here because this is a serious regression

Contributor

Silex commented Nov 30, 2017

@jwiegley: summoning you here because this is a serious regression

@jwiegley jwiegley closed this in 3e8b738 Nov 30, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment