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

Fix pattern syntax exception on windows #462

Merged

Conversation

pme123
Copy link

@pme123 pme123 commented Apr 21, 2020

On Windows 10 we get the following Exception:

sbt:bpf-next-demo> g8Scaffold camunda
component [demo-process]: roman
java.util.regex.PatternSyntaxException: Unexpected internal error near index 1
\
at java.util.regex.Pattern.error(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.util.regex.Pattern.<init>(Unknown Source)
at java.util.regex.Pattern.compile(Unknown Source)
at java.lang.String.split(Unknown Source)
at java.lang.String.split(Unknown Source)
at giter8.G8$.expandPath(g8.scala:212)
at giter8.G8$.$anonfun$writeTemplates$1(g8.scala:488)
at scala.collection.immutable.Stream.map(Stream.scala:414)
at giter8.G8$.writeTemplates(g8.scala:486)
at giter8.G8$.$anonfun$applyT$1(g8.scala:347)
at scala.util.Either$RightProjection.flatMap(Either.scala:697)
at giter8.G8$.applyT(g8.scala:330)
at giter8.G8$.fromDirectoryRaw(g8.scala:90)
at giter8.ScaffoldPlugin$.$anonfun$scaffoldTask$3(ScafoldPlugin.scala:53)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at sbt.std.Transform$$anon$3.$anonfun$apply$2(System.scala:46)
at sbt.std.Transform$$anon$4.work(System.scala:67)
at sbt.Execute.$anonfun$submit$2(Execute.scala:269)

According to the following answer: https://stackoverflow.com/a/34129096/2750966

I could fix the Problem.

Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. CI says

/home/travis/build/foundweekends/giter8/library/src/main/scala/g8.scala isn't formatted properly!

could you run scalafmt from sbt please?

@pme123
Copy link
Author

pme123 commented Apr 22, 2020

Sorry - I saw that it failed - but I could not find to Travis Logs;(.

@eed3si9n eed3si9n merged commit 3755d20 into foundweekends:master Apr 22, 2020
@pme123
Copy link
Author

pme123 commented Apr 24, 2020

Thanks for merging. Are there nightly releases - or is there a release plant with this fix?

@eed3si9n eed3si9n added this to the 0.13.0 milestone Apr 24, 2020
@eed3si9n
Copy link
Member

I guess 0.13.0 at some point? It would be good to get a new ST4 for antlr/stringtemplate4#254 when it comes out.

@xuwei-k
Copy link
Member

xuwei-k commented May 30, 2020

0.13.0-M1 released

@pme123 pme123 deleted the fix-pattern-syntax-exception-on-windows branch May 30, 2020 06:19
@PashoQ
Copy link

PashoQ commented Jun 16, 2020

Is it possible to use version 0.13.0-M1 together with sbt new command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants