Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use new Racket lexer from pygments.rb 0.3.3 #325

Merged
merged 2 commits into from

6 participants

@greghendershott

Racket files had been using the Scheme lexer.

@greghendershott greghendershott Use new Racket lexer from pygments.rb 0.3.3
Racket files had been using the Scheme lexer.
8355f50
@greghendershott

Travis builds are failing with: DCPU-16 ASM is missing lexer.

But I didn't change anything related to DCPU-16 ASM. I updated the existing definition for Racket.

I notice some other recent pull requests are failing Travis for seemingly unrelated issues, too?


$ bundle exec rake
/home/travis/builds/github/linguist/lib/linguist/language.rb:222:in `initialize': DCPU-16 ASM is missing lexer (ArgumentError)
    from /home/travis/builds/github/linguist/lib/linguist/language.rb:30:in `new'
    from /home/travis/builds/github/linguist/lib/linguist/language.rb:30:in `create'
    from /home/travis/builds/github/linguist/lib/linguist/language.rb:464
    from /home/travis/builds/github/linguist/lib/linguist/language.rb:440:in `each'
    from /home/travis/builds/github/linguist/lib/linguist/language.rb:440
    from /home/travis/builds/github/linguist/lib/linguist/blob_helper.rb:2:in `require'
    from /home/travis/builds/github/linguist/lib/linguist/blob_helper.rb:2
    from /home/travis/builds/github/linguist/lib/linguist/file_blob.rb:1:in `require'
    from /home/travis/builds/github/linguist/lib/linguist/file_blob.rb:1
    from /home/travis/builds/github/linguist/test/test_blob.rb:1:in `require'
    from /home/travis/builds/github/linguist/test/test_blob.rb:1
    from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:10:in `require'
    from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:10
    from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:9:in `each'
    from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:9
    from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:4:in `select'
    from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:4
@greghendershott

I think the Travis fail may be a variation on #327 (comment) -- in that case the missing lexer is Augeas.

@sethvargo

I think linguist should only warn if a lexer is missing - especially with the large number of languages now supported...

@stevepiercy

@tnm Travis still fails to build, at least for the Lasso language lexer.
#235
https://travis-ci.org/github/linguist/jobs/3912893

55$ bundle exec rake
56/home/travis/builds/github/linguist/lib/linguist/language.rb:222:in `initialize': Augeas is missing lexer (ArgumentError)
57  from /home/travis/builds/github/linguist/lib/linguist/language.rb:30:in `new'
58  from /home/travis/builds/github/linguist/lib/linguist/language.rb:30:in `create'
59  from /home/travis/builds/github/linguist/lib/linguist/language.rb:464
60  from /home/travis/builds/github/linguist/lib/linguist/language.rb:440:in `each'
61  from /home/travis/builds/github/linguist/lib/linguist/language.rb:440
62  from /home/travis/builds/github/linguist/lib/linguist/blob_helper.rb:2:in `require'
63  from /home/travis/builds/github/linguist/lib/linguist/blob_helper.rb:2
64  from /home/travis/builds/github/linguist/lib/linguist/file_blob.rb:1:in `require'
65  from /home/travis/builds/github/linguist/lib/linguist/file_blob.rb:1
66  from /home/travis/builds/github/linguist/test/test_blob.rb:1:in `require'
67  from /home/travis/builds/github/linguist/test/test_blob.rb:1
68  from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:10:in `require'
69  from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:10
70  from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:9:in `each'
71  from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:9
72  from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:4:in `select'
73  from /home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb:4
74rake aborted!
75Command failed with status (1): [ruby -I"lib" -I"/home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib" "/home/travis/.rvm/gems/ruby-1.8.7-p371/gems/rake-10.0.3/lib/rake/rake_test_loader.rb" "test/test*.rb" ]
76
77Tasks: TOP => default => test
78(See full trace by running task with --trace)
79
80Done. Build script exited with: 1
@tnm
Owner
tnm commented

pygments 0.3.7 is updated with new lexers and we're green https://travis-ci.org/github/linguist/builds/3913377

@greghendershott

@tnm Thank you. Just in time to avoid going over the lingual cliff. :)

@tnm tnm referenced this pull request in greghendershott/linguist
Closed

Update test for racket #1

@greghendershott greghendershott Update test: Racket language uses Racket lexer.
This is #1 from @tnm.
That pull request is onto my master branch, not my `racket-lexer`
topic branch. If there is a way to accept the pull request onto my
topic branch, I don't have time to figure it out right now. As a
result I'm making my own commit.
0b24654
@tnm
Owner
tnm commented

Looks good to me :+1:

cc @josh

@josh
Owner

:+1:

@tnm tnm merged commit abda879 into github:master
@tnm
Owner
tnm commented
@michaelficarra michaelficarra commented on the diff
lib/linguist/languages.yml
((6 lines not shown))
color: "#ae17ff"
primary_extension: .rkt
extensions:
+ - .rkt

Was this necessary if the primary_extension is .rkt?

@josh Owner
josh added a note

Yeah, no need to add it again

@tnm Owner
tnm added a note

Looking at it now, we do this (copy the primary extension under extensions) in a bunch of places. Probably worth cleaning it up at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 29, 2012
  1. @greghendershott

    Use new Racket lexer from pygments.rb 0.3.3

    greghendershott authored
    Racket files had been using the Scheme lexer.
Commits on Jan 2, 2013
  1. @greghendershott

    Update test: Racket language uses Racket lexer.

    greghendershott authored
    This is #1 from @tnm.
    That pull request is onto my master branch, not my `racket-lexer`
    topic branch. If there is a way to accept the pull request onto my
    topic branch, I don't have time to figure it out right now. As a
    result I'm making my own commit.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +2 −1  lib/linguist/languages.yml
  2. +1 −1  test/test_language.rb
View
3  lib/linguist/languages.yml
@@ -1032,10 +1032,11 @@ RHTML:
Racket:
type: programming
- lexer: Scheme
+ lexer: Racket
color: "#ae17ff"
primary_extension: .rkt
extensions:
+ - .rkt

Was this necessary if the primary_extension is .rkt?

@josh Owner
josh added a note

Yeah, no need to add it again

@tnm Owner
tnm added a note

Looking at it now, we do this (copy the primary extension under extensions) in a bunch of places. Probably worth cleaning it up at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- .rktd
- .rktl
View
2  test/test_language.rb
@@ -45,7 +45,7 @@ def test_lexer
assert_equal Lexer['S'], Language['R'].lexer
assert_equal Lexer['Scheme'], Language['Emacs Lisp'].lexer
assert_equal Lexer['Scheme'], Language['Nu'].lexer
- assert_equal Lexer['Scheme'], Language['Racket'].lexer
+ assert_equal Lexer['Racket'], Language['Racket'].lexer
assert_equal Lexer['Scheme'], Language['Scheme'].lexer
assert_equal Lexer['Standard ML'], Language['Standard ML'].lexer
assert_equal Lexer['TeX'], Language['TeX'].lexer
Something went wrong with that request. Please try again.