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

scala.MatchError: 1 (of class scala.meta.Lit$LitImpl) #2

Closed
olafurpg opened this issue Jul 14, 2017 · 7 comments
Closed

scala.MatchError: 1 (of class scala.meta.Lit$LitImpl) #2

olafurpg opened this issue Jul 14, 2017 · 7 comments

Comments

@olafurpg
Copy link

git clone https://github.com/scalacenter/scalafix.git
cd scalafix
coursier launch co.pjrt:stags-cli_2.12:0.1.1 -- ./
Exception in thread "main" scala.MatchError: 1 (of class scala.meta.Lit$LitImpl)
	at co.pjrt.stags.TagGenerator$.getFromPats(TagGenerator.scala:127)
	at co.pjrt.stags.TagGenerator$.getFromPat$1(TagGenerator.scala:118)
	at co.pjrt.stags.TagGenerator$.$anonfun$getFromPats$2(TagGenerator.scala:124)
	at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241)
	at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238)
	at scala.collection.immutable.List.flatMap(List.scala:352)
	at co.pjrt.stags.TagGenerator$.getFromPats(TagGenerator.scala:124)
	at co.pjrt.stags.TagGenerator$.$anonfun$tagsForStatement$1(TagGenerator.scala:71)
	at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241)
	at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238)

Seems like

is missing a fallback.

@pjrt
Copy link
Owner

pjrt commented Jul 14, 2017 via email

@olafurpg
Copy link
Author

If you want a large corpus you can try https://github.com/olafurpg/scala-repos/

Alternatively, scalameta testkit provides a nice interface to run custom analysis on that same corpus https://github.com/scalameta/scalameta/blob/1bd511158352bd6375bdb1e0e28395e76513094f/scalameta/testkit/src/main/scala/scala/meta/testkit/SyntaxAnalysis.scala

@pjrt
Copy link
Owner

pjrt commented Jul 14, 2017

Nice, thanks! I'll see if I can integrate it into my tests.

@pjrt pjrt closed this as completed in e9ef51a Jul 14, 2017
@pjrt
Copy link
Owner

pjrt commented Jul 14, 2017

Fixed. I'll push to maven later today (or tomorrow. idk if I'll have time today).

@olafurpg
Copy link
Author

Thanks for the fix! I'm slowly trying to move from IJ to vim and I hope to use stags to smoothen the transition 😄

@pjrt
Copy link
Owner

pjrt commented Jul 15, 2017

@olafurpg 0.2.1 is now on maven. I had to jump over 0.2.0 since I broke it :\

@olafurpg
Copy link
Author

Awesome, just ran it on the scalafix repo with no problem 💯

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

2 participants