{"action":"created","issue":{"url":"https://api.github.com/repos/cucumber/cucumber-jvm/issues/1248","repository_url":"https://api.github.com/repos/cucumber/cucumber-jvm","labels_url":"https://api.github.com/repos/cucumber/cucumber-jvm/issues/1248/labels{/name}","comments_url":"https://api.github.com/repos/cucumber/cucumber-jvm/issues/1248/comments","events_url":"https://api.github.com/repos/cucumber/cucumber-jvm/issues/1248/events","html_url":"https://github.com/cucumber/cucumber-jvm/pull/1248","id":264864537,"number":1248,"title":"[Core] Implement cucumber expressions","user":{"login":"mpkorstanje","id":6946919,"avatar_url":"https://avatars2.githubusercontent.com/u/6946919?v=4","gravatar_id":"","url":"https://api.github.com/users/mpkorstanje","html_url":"https://github.com/mpkorstanje","followers_url":"https://api.github.com/users/mpkorstanje/followers","following_url":"https://api.github.com/users/mpkorstanje/following{/other_user}","gists_url":"https://api.github.com/users/mpkorstanje/gists{/gist_id}","starred_url":"https://api.github.com/users/mpkorstanje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpkorstanje/subscriptions","organizations_url":"https://api.github.com/users/mpkorstanje/orgs","repos_url":"https://api.github.com/users/mpkorstanje/repos","events_url":"https://api.github.com/users/mpkorstanje/events{/privacy}","received_events_url":"https://api.github.com/users/mpkorstanje/received_events","type":"User","site_admin":false},"labels":[{"id":433638670,"url":"https://api.github.com/repos/cucumber/cucumber-jvm/labels/Cucumber%20Expressions","name":"Cucumber Expressions","color":"02d7e1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cucumber/cucumber-jvm/milestones/6","html_url":"https://github.com/cucumber/cucumber-jvm/milestone/6","labels_url":"https://api.github.com/repos/cucumber/cucumber-jvm/milestones/6/labels","id":3173302,"number":6,"title":"4.0.0","description":"","creator":{"login":"mpkorstanje","id":6946919,"avatar_url":"https://avatars2.githubusercontent.com/u/6946919?v=4","gravatar_id":"","url":"https://api.github.com/users/mpkorstanje","html_url":"https://github.com/mpkorstanje","followers_url":"https://api.github.com/users/mpkorstanje/followers","following_url":"https://api.github.com/users/mpkorstanje/following{/other_user}","gists_url":"https://api.github.com/users/mpkorstanje/gists{/gist_id}","starred_url":"https://api.github.com/users/mpkorstanje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpkorstanje/subscriptions","organizations_url":"https://api.github.com/users/mpkorstanje/orgs","repos_url":"https://api.github.com/users/mpkorstanje/repos","events_url":"https://api.github.com/users/mpkorstanje/events{/privacy}","received_events_url":"https://api.github.com/users/mpkorstanje/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2018-03-09T03:30:50Z","updated_at":"2018-03-09T03:31:05Z","due_on":null,"closed_at":null},"comments":45,"created_at":"2017-10-12T09:02:40Z","updated_at":"2018-04-11T07:13:55Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cucumber/cucumber-jvm/pulls/1248","html_url":"https://github.com/cucumber/cucumber-jvm/pull/1248","diff_url":"https://github.com/cucumber/cucumber-jvm/pull/1248.diff","patch_url":"https://github.com/cucumber/cucumber-jvm/pull/1248.patch"},"body":"## Summary\r\n\r\n* Implements [Cucumber expressions](https://docs.cucumber.io/cucumber-expressions/) \r\n* Removes XStream\r\n* Adds DataTables from https://github.com/cucumber/cucumber/pull/291\r\n* Introduces the concept of StepExpressions which combines a CucumberExpression and DataTable expression. Currently data table expressions are limited to a name or java type. Currently only the implicit type derived from the method argument is used.\r\n\r\nFor a working example check the calculator examples.\r\n\r\n## How to build\r\n\r\nInstall (`mvn install`) `datatables/java` from `cucumber/cucumber`\r\nThen install this branch. If it fails you may need to remove `pax-exam` from `examples/pom,xml`. This is okay.\r\n\r\n## Todo \r\n * [ ] Test SnippetGenerators and StepdefGenerator icm Idea\r\n * [ ] Update documentation\r\n * [ ] Write blog post\r\n\r\nThis closes  #1041\r\n"},"comment":{"url":"https://api.github.com/repos/cucumber/cucumber-jvm/issues/comments/380351377","html_url":"https://github.com/cucumber/cucumber-jvm/pull/1248#issuecomment-380351377","issue_url":"https://api.github.com/repos/cucumber/cucumber-jvm/issues/1248","id":380351377,"user":{"login":"mlvandijk","id":20927578,"avatar_url":"https://avatars0.githubusercontent.com/u/20927578?v=4","gravatar_id":"","url":"https://api.github.com/users/mlvandijk","html_url":"https://github.com/mlvandijk","followers_url":"https://api.github.com/users/mlvandijk/followers","following_url":"https://api.github.com/users/mlvandijk/following{/other_user}","gists_url":"https://api.github.com/users/mlvandijk/gists{/gist_id}","starred_url":"https://api.github.com/users/mlvandijk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlvandijk/subscriptions","organizations_url":"https://api.github.com/users/mlvandijk/orgs","repos_url":"https://api.github.com/users/mlvandijk/repos","events_url":"https://api.github.com/users/mlvandijk/events{/privacy}","received_events_url":"https://api.github.com/users/mlvandijk/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T07:13:55Z","updated_at":"2018-04-11T07:13:55Z","author_association":"MEMBER","body":"OK, so today I tried to replace `(\\\\d+)` in a stepdef with `{int}` and am getting the following error:\r\n```\r\ncucumber.runtime.CucumberException: Error creating bean with name 'cucumber.performance.StepDefs': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [cucumber.performance.StepDefs]: Constructor threw exception; nested exception is java.util.regex.PatternSyntaxException: Illegal repetition near index 15\r\n^the seller has {int} strike(s)$\r\n               ^\r\n\r\n\tat cucumber.runtime.java.spring.SpringFactory.getInstance(SpringFactory.java:212)\r\n\tat cucumber.runtime.java.JavaBackend.buildWorld(JavaBackend.java:127)\r\n\tat cucumber.runner.Runner.buildBackendWorlds(Runner.java:155)\r\n\tat cucumber.runner.Runner.runPickle(Runner.java:78)\r\n\tat cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:140)\r\n\tat cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)\r\n\tat cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\r\n\tat cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)\r\n\tat cucumber.api.junit.Cucumber.runChild(Cucumber.java:99)\r\n\tat cucumber.api.junit.Cucumber.runChild(Cucumber.java:56)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\r\n\tat cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:108)\r\n\tat org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\r\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:137)\r\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)\r\n\tat com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)\r\nCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cucumber.performance.StepDefs': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [cucumber.performance.StepDefs]: Constructor threw exception; nested exception is java.util.regex.PatternSyntaxException: Illegal repetition near index 15\r\n^the seller has {int} strike(s)$\r\n               ^\r\n\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:279)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1193)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1095)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:345)\r\n\tat cucumber.runtime.java.spring.GlueCodeScope.get(GlueCodeScope.java:14)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:220)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1018)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:345)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:340)\r\n\tat cucumber.runtime.java.spring.SpringFactory.getInstance(SpringFactory.java:210)\r\n\t... 28 more\r\nCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [cucumber.performance.StepDefs]: Constructor threw exception; nested exception is java.util.regex.PatternSyntaxException: Illegal repetition near index 15\r\n^the seller has {int} strike(s)$\r\n               ^\r\n\tat org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:154)\r\n\tat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)\r\n\tat org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:271)\r\n\t... 40 more\r\nCaused by: java.util.regex.PatternSyntaxException: Illegal repetition near index 15\r\n^the seller has {int} strike(s)$\r\n               ^\r\n\tat java.util.regex.Pattern.error(Pattern.java:1955)\r\n\tat java.util.regex.Pattern.closure(Pattern.java:3157)\r\n\tat java.util.regex.Pattern.sequence(Pattern.java:2134)\r\n\tat java.util.regex.Pattern.expr(Pattern.java:1996)\r\n\tat java.util.regex.Pattern.compile(Pattern.java:1696)\r\n\tat java.util.regex.Pattern.<init>(Pattern.java:1351)\r\n\tat java.util.regex.Pattern.compile(Pattern.java:1028)\r\n\tat io.cucumber.cucumberexpressions.ExpressionFactory.createExpression(ExpressionFactory.java:28)\r\n\tat io.cucumber.stepexpression.StepExpressionFactory.createExpression(StepExpressionFactory.java:62)\r\n\tat io.cucumber.stepexpression.StepExpressionFactory.createExpression(StepExpressionFactory.java:52)\r\n\tat cucumber.runtime.java8.Java8StepDefinition.createExpression(Java8StepDefinition.java:78)\r\n\tat cucumber.runtime.java8.Java8StepDefinition.<init>(Java8StepDefinition.java:70)\r\n\tat cucumber.runtime.java8.Java8StepDefinition.create(Java8StepDefinition.java:31)\r\n\tat cucumber.api.java8.En.lambda$Given$42(En.java:593)\r\n\tat cucumber.runtime.java.JavaBackend.addStepDefinition(JavaBackend.java:165)\r\n\tat cucumber.api.java8.En.Given(En.java:592)\r\n\tat cucumber.performance.StepDefs.<init>(StepDefs.kt:35)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\r\n\tat org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:142)\r\n```\r\n\r\nThe stepdef is (in Kotlin, so using Kotlin `Int`): \r\n```\r\n        Given(\"^the seller has {int} strike(s)$\") { strikes: Int ->\r\n            monitorPeriodMockSteps.expectMonitorPeriod(currentSeller.id, strikes)\r\n        }\r\n```\r\n\r\nStepDef class uses:\r\n```\r\n@SpringBootTest(classes = [TestConfiguration::class]) // Testconfiguration provides webdriver\r\nclass StepDefs(\r\n        val page: Page, // PageObject classes; edited\r\n        val mockSteps: MockSteps, // MockStep classes edited\r\n        val currentSeller: CurrentSeller // Domain object\r\n): En {\r\n```\r\n\r\nVersions from pom.xml:\r\n```\r\n        <kotlin.version>1.2.30</kotlin.version>\r\n        <cucumber.version>3.0.0-SNAPSHOT</cucumber.version> // built locally last monday\r\n```\r\n\r\nDependencies:\r\n```\r\n            <dependency>\r\n                <groupId>io.cucumber</groupId>\r\n                <artifactId>cucumber-junit</artifactId>\r\n                <version>${cucumber.version}</version>\r\n                <scope>test</scope>\r\n            </dependency>\r\n            <dependency>\r\n                <groupId>io.cucumber</groupId>\r\n                <artifactId>cucumber-java8</artifactId>\r\n                <version>${cucumber.version}</version>\r\n                <scope>test</scope>\r\n            </dependency>\r\n            <dependency>\r\n                <groupId>io.cucumber</groupId>\r\n                <artifactId>cucumber-spring</artifactId>\r\n                <version>${cucumber.version}</version>\r\n                <scope>test</scope>\r\n            </dependency>\r\n```\r\n\r\nOur project is using an internal parent project, which includes `Spring Boot (1.5.10.RELEASE)`\r\n\r\nHoping the stacktrace means anything to you. Not sure I'd be able to provide an example project from this work project... Let me know if there's additional information I could provide."}}
{"actor":{"display_login":"mlvandijk"}}