vermiculus / magithub

**DEPRECATED - please use Forge instead!** -- Magit-based interfaces to GitHub
GNU General Public License v3.0
579 stars 62 forks source link

Warning about not having configured a feature that I don't want to use #332

Closed tarsius closed 4 years ago

tarsius commented 6 years ago

I have the following in my configuration because I don't want to use pull-request-merge and status-checks-header:

(magithub-feature-autoinject
 '(commit-browse completion issues-section pull-requests-section))

As a result I get warnings about not having configured the features that I don't want to use:

Magithub features not configured: (pull-request-merge); see variable `magithub-features' \
to turn off this message

What am I supposed to do to disable a feature? I had to pretend that I had configured these features to make the warnings about not having done so go away:

(add-to-list 'magithub-features (cons 'pull-request-merge t))
(add-to-list 'magithub-features (cons 'status-checks-header t))
vermiculus commented 6 years ago

I think my original intention was to have folks add (pull-request-merge . nil) to the list; if that's not working, I'll have to investigate.

tarsius commented 6 years ago

I didn't check again whether (... . nil) works too, but vaguely remember that it didn't. But even if that works I still find this a bit weird. Is it really necessary to force users to use a setup function for configuration? And if so, then that should at least take care of it all. You could for example allow this:

(magithub-feature-autoinject
 '((pull-request-merge . nil) ; don't enable
   (commit-browse . t) ; enable
   completion ; enable (backward compatibility)
   (issues-section . t)
   (pull-requests-section . t)
   (status-checks-header . nil)))
vermiculus commented 6 years ago

We could make that work. How should multiple calls to autoinject be handled, though? I'll see if I can work on this tonight, but I might be helping to write thank-you cards :-)

tarsius commented 6 years ago

How should multiple calls to autoinject be handled, though?

I was wondering that too - including how does that work now :wink:

but I might be helping to write thank-you cards

Better do that then...

vermiculus commented 6 years ago

including how does that work now

Right now feature injection works on a symbol-by-symbol basis -- the t and all descriptors just map over all the symbols available in the feature list.