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

global: --with-universal-ctags #8309

Closed

Conversation

ivanbrennan
Copy link

@ivanbrennan ivanbrennan commented Dec 30, 2016

GNU Global supports using Universal Ctags and Exuberant Ctags as plug-in parsers, but the current formula only exposes the Exuberant Ctags option.

This is problematic, as Universal Ctags is the actively maintained/developed implementation. The Global documentation describes how to configure Universal Ctags and makes no mention of Exuberant Ctags.

Expose --with-universal-ctags option to remedy this.

To install:

$ brew install global --with-universal-ctags

To use:

$ export GTAGSCONF=/usr/local/share/gtags/gtags.conf
$ export GTAGSLABEL=new-ctags
$ gtags                         # gtags invokes Universal Ctags internally

References:
https://www.gnu.org/software/global/manual/global.html#Plug_002din
https://github.com/universal-ctags/homebrew-universal-ctags

@ivanbrennan
Copy link
Author

Tests are currently failing because the formula can't find the universal-ctags formula (I ran tests locally, but only after running brew tap universal-ctags/universal-ctags.

I'm looking into either auto-tapping or providing an informative error in such cases -- not sure which is the preferred behavior.

@ivanbrennan ivanbrennan force-pushed the global-with-universal-ctags branch 2 times, most recently from 1d6d6ef to 145d789 Compare December 30, 2016 13:44
@ivanbrennan
Copy link
Author

ivanbrennan commented Dec 30, 2016

I updated the depends_on call to correctly reference the tapped universal-ctags formula:

 -  depends_on "universal-ctags" => :optional
 +  depends_on "universal-ctags/universal-ctags/universal-ctags" => :optional

This will automatically tap the universal-ctags dependency and should resolve the earlier test failures.

option "with-pygments", "Enable Pygments as a plug-in parser (should enable exuberent-ctags too)"
option "with-sqlite3", "Use SQLite3 API instead of BSD/DB API for making tag files"

deprecated_option "with-exuberant-ctags" => "with-ctags"

depends_on "ctags" => :optional
depends_on "universal-ctags/universal-ctags/universal-ctags" => :optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want homebrew/core formulae depending on non-Homebrew organisation taps as options. Could this be submitted to homebrew/core?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcQuaid The universal-ctags tap mentions,

When Universal Ctags has a tagged release, this formula should be moved to the official Homebrew repository. This repo should then be deleted.

Indeed, universal ctags still has no tagged release. I'll check with the maintainers on the status of that. Is a tagged release a prerequisite for submitting to homebrew/core?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, yep.

@@ -4,6 +4,7 @@ class Global < Formula
url "https://ftpmirror.gnu.org/global/global-6.5.6.tar.gz"
mirror "https://ftp.gnu.org/gnu/global/global-6.5.6.tar.gz"
sha256 "122f9afa69a8daa0f64c12db7f02981fe573f51a163fa3829ed4f832cd281505"
revision 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this unless you modify the non-option installation.

@@ -117,6 +124,18 @@ def pyfunc ():
assert_no_match(/test\.py/, shell_output("#{bin}/global -r py2func # correctly fails"))
assert_no_match(/test\.py/, shell_output("#{bin}/global -s pyvar # correctly fails"))
end
if build.with? "universal-ctags"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not worth adding this; these tests are only for CI and thus will never be run with options so this code will never be run.

@@ -4,6 +4,7 @@ class Global < Formula
url "https://ftpmirror.gnu.org/global/global-6.5.6.tar.gz"
mirror "https://ftp.gnu.org/gnu/global/global-6.5.6.tar.gz"
sha256 "122f9afa69a8daa0f64c12db7f02981fe573f51a163fa3829ed4f832cd281505"
revision 1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure whether exposing a new option warranted/required adding a revision. I'm starting to suspect not, but I'll leave this for now to get some outside feedback.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It definitely doesn't so you can remove it, thanks. A revision will force a reinstall and, in some cases, rebuild for everyone using this.

GNU Global supports using Universal Ctags and Exuberant Ctags as plug-in parsers, but the
current formula only exposes the Exuberant Ctags option.

This is problematic, as Universal Ctags is the actively maintained/developed
implementation. The Global documentation describes how to configure Universal Ctags and
makes no mention of Exuberant Ctags.

Expose --with-universal-ctags option to remedy this.

To install:

    $ brew install global --with-universal-ctags

To use:

    $ export GTAGSCONF=/usr/local/share/gtags/gtags.conf
    $ export GTAGSLABEL=new-ctags
    $ gtags                         # gtags invokes Universal Ctags internally

References:
https://www.gnu.org/software/global/manual/global.html#Plug_002din
https://github.com/universal-ctags/homebrew-universal-ctags
@dunn
Copy link
Contributor

dunn commented Jan 7, 2017

Do you have any idea when a stable release is expected?

@ivanbrennan
Copy link
Author

@dunn I found multiple universal ctags issues discussing their plans for a release, but it all seems up in the air at the moment. For reference:
universal-ctags/ctags#1038
universal-ctags/ctags#664
universal-ctags/ctags#658
universal-ctags/ctags#909
universal-ctags/ctags#662
universal-ctags/ctags#652

Apologies for the barrage of links, maybe too much information, but that's what I found.

@dunn
Copy link
Contributor

dunn commented Jan 7, 2017

Thanks! If there's no definite ETA, you can still leave this PR open, but we're gonna want that stable release before merging.

@ivanbrennan
Copy link
Author

Sounds good. Thanks @dunn

@MikeMcQuaid
Copy link
Member

Closing until we've got a stable release.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants