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

Show zopectl.command commands as well #18

Closed
gforcada opened this issue Dec 14, 2015 · 4 comments
Closed

Show zopectl.command commands as well #18

gforcada opened this issue Dec 14, 2015 · 4 comments

Comments

@gforcada
Copy link
Member

p.r.zope2instance can show and run commands defined on setup.py like this:

[plone.recipe.zope2instance.ctl]
solr_clear_index=collective.solr.commands:solr_clear_index
solr_reindex=collective.solr.commands:solr_reindex

Actually it can also run (but not display them on its help) any command defined like:

[zopectl.command]
solr_clear_index=collective.solr.commands:solr_clear_index
solr_reindex=collective.solr.commands:solr_reindex

It would be great if the help command could also show them as well.

If not one is puzzled about installing a distribution (collective.solr for example) that claims to install some commands but that are not shown at all when running bin/instance help.

Is there any reason to not show them?

@jensens
Copy link
Member

jensens commented Dec 14, 2015

+1

@jensens jensens changed the title Show zopect.command commands as well Show zopectl.command commands as well Dec 14, 2015
@tschorr
Copy link
Contributor

tschorr commented Dec 15, 2015

Looking at the example, wouldn't it be easier to change the entry point to p.r.zope2instance.ctl in collective.solr? This would also bypass the issues I have described here: collective/collective.solr#88 (comment).

@gforcada
Copy link
Member Author

@tschorr sure, that would be a fix for collective.solr, but I guess collective.solr is not the only package that provides commands, so if instead of having to fix all and every single distribution (and get a release for each of them), we list all commands we only have to care about a single package to fix and release.

@tschorr
Copy link
Contributor

tschorr commented Dec 16, 2015

I cannot find many packages that use zopectl.command, but I might be mistaken.

In my opinion it is rather confusing that there are two different entry point names for exactly the same functionality.
p.r.zope2instance overrides much of the functionality of Zope2.Startup.zopectl, but instead of overriding the existing entry point configuration, it defines a new entry point that does the same thing (although arguably better, as you have noted).
I didn't notice that there was another entry point definition when working on the collective.solr PR recently, otherwise I would have changed the entry point to p.r.zope2instance.ctl back then.

So this now might be a good chance to simplify things and maybe get rid of one of the two entry points. Or at least put some deprecation warning for the zopectl.command case.

gforcada added a commit that referenced this issue Jan 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants