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

Perl 6 lexer not being used for .pm6 files #1680

Closed
hoelzro opened this issue Nov 7, 2014 · 18 comments
Closed

Perl 6 lexer not being used for .pm6 files #1680

hoelzro opened this issue Nov 7, 2014 · 18 comments

Comments

@hoelzro
Copy link
Contributor

hoelzro commented Nov 7, 2014

.pm6 files in repositories have no syntax highlighting applied (example: https://github.com/retupmoca/p6-Email-Simple/blob/master/lib/Email/Simple.pm6). .pm6 files in Gists, however, do!

@pchaigno
Copy link
Contributor

pchaigno commented Nov 7, 2014

I think that your repository is just not up-to-date. With the last release I get:

$ linguist lib/Email/Simple.pm6 
lib/Email/Simple.pm6: 90 lines (75 sloc)
  type:      Text
  mime type: text/plain
  language:  Perl6

You should contact GitHub support.

@bkeepers
Copy link
Contributor

bkeepers commented Nov 7, 2014

The language stats are showing Perl6, so I think this is related to #1662. I'm investigating now.

@hoelzro
Copy link
Contributor Author

hoelzro commented Nov 7, 2014

Thanks @pchaigno, @bkeepers!

@vendethiel
Copy link

@bkeepers any heads up? The issue you linked was already closed when you posted your message

@bkeepers
Copy link
Contributor

Hey @vendethiel. Sorry, we recently swapped how we do syntax highlighting on GitHub and perl6 got dropped in the shuffle.

Do you know if https://github.com/textmate/perl.tmbundle properly handles Perl 6? If so, then we just need to add tm_scope: source.perl to the Perl 6 definition in languages.yml. If it does not, then we need to get Perl 6 support in that bundle first. (https://github.com/ashgti/perl-tmbundle says it supports it, so maybe a pull request could be made to add it to the textmate bundle?).

/cc @aroben @vmg

@hoelzro
Copy link
Contributor Author

hoelzro commented Nov 21, 2014

@bkeepers I've added the tm_scope stuff to my Perl 6 PR: #900

@aroben
Copy link
Contributor

aroben commented Nov 21, 2014

Do you know if https://github.com/textmate/perl.tmbundle properly handles Perl 6?

https://github.com/textmate/perl.tmbundle/blob/8f62f3c458cacba3152bfedcc971735a0a5d61b1/Syntaxes/Perl.plist#L11-L15 doesn't list any Perl 6-specific filename extensions, so it seems unlikely.

@hoelzro
Copy link
Contributor Author

hoelzro commented Nov 21, 2014

@aroben Ah, I was looking at https://github.com/ashgti/perl-tmbundle when I made the change. I'll see if I can poke @ashgti to submit the changes upstream.

@ashgti
Copy link

ashgti commented Nov 21, 2014

My perl-tmbundle is pretty old. I am not sure how accurate it is.

I can validate its still accurate and make a PR to the textmate/perl.tmbundle repo.

@hoelzro
Copy link
Contributor Author

hoelzro commented Jan 14, 2015

So it seems that Perl 6 files are sometimes classified as Prolog: https://github.com/rakudo/rakudo/search?l=prolog

@hoelzro
Copy link
Contributor Author

hoelzro commented Jan 14, 2015

Ha, found the problem! https://github.com/rakudo/rakudo/blob/nom/src/core/List.pm#L452 (at least with that file)

EDIT: Here's a link that won't change with time: https://github.com/rakudo/rakudo/blob/3607d7bf937b32bd7d35eee2de390f103ee4bb12/src/core/List.pm#L462

@arfon
Copy link
Contributor

arfon commented Feb 27, 2015

Can this be closed now that #900 has landed?

@hoelzro
Copy link
Contributor Author

hoelzro commented Feb 27, 2015

@arfon I'm not sure; as far as I see it, there are two issues remaining:

  • Perl 6 files are sometimes not detected as such (ex. List.pm in rakudo is identified as Prolog)
  • There is no highlighting for Perl 6 files, due to the lack of a Textmate bundle to do so.

The issue makes it sound like .pm6 files are not properly detected as Perl 6, which they are. I don't remember if linguist improperly detected them back in November, or if I was misrepresenting the issue that there was no Perl 6 highlighting for them. Would you like me to close this and break out the two problems mentioned above into separate issues?

@pchaigno
Copy link
Contributor

Perl 6 files are sometimes not detected as such (ex. List.pm in rakudo is identified as Prolog)

This is happening because of #2042.

There is no highlighting for Perl 6 files, due to the lack of a Textmate bundle to do so.

@ashgti doesn't seem to be responding anymore (see ashgti/perl-tmbundle#1). Maybe we could fork the repository, update the conflicting scope name and use it as is?

@ashgti
Copy link

ashgti commented Mar 1, 2015

@pchaigno Hi, I have updated my perl.tmbundle with an updated syntax based off the vim.perl perl6 syntax. Its not complete yet, but I created a pull request here atom/language-perl#9 and textmate/perl.tmbundle#13 for the basic support.

I am still working on a more complete grammar for TextMate (and Atom).

@pchaigno
Copy link
Contributor

pchaigno commented Mar 1, 2015

@ashgti Good! Could you post here when one of the PR is merged?

@ashgti
Copy link

ashgti commented Mar 1, 2015

@pchaigno sure, I'll let you know when its merged

@arfon
Copy link
Contributor

arfon commented Mar 16, 2015

Since v4.5.1 this is fixed.

@arfon arfon closed this as completed Mar 16, 2015
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

7 participants