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: can't run berp/berp on linux #692

Closed
ehuelsmann opened this issue Aug 29, 2019 · 6 comments
Closed

perl: can't run berp/berp on linux #692

ehuelsmann opened this issue Aug 29, 2019 · 6 comments
Labels
⌛ stale Will soon be closed by stalebot unless there is activity language: perl library: gherkin 🔧 build Related to build / release process

Comments

@ehuelsmann
Copy link
Contributor

Summary

I'm having a look at updating the Perl implementation. I'm trying to run the first step: generating the parser using Berp, however, it fails.

Expected Behavior

After cloning the cucumber/cucumber repository and changing the directory to cucumber/gherkin/perl, I expect the command berp/berp.exe -t gherkin-perl.razor -g gherkin.berp -o p.pm to complete successfully.

Current Behavior

The command fails with the following output:

$ berp/berp.exe -t gherkin-perl.razor -g gherkin.berp -o p.pm
Berp Parser Generator 1.0.1.0
Copyright (C) 2014, Gaspar Nagy (http://gasparnagy.com)
Licensed under the Apache License, Version 2.0 (the "License")
    http://www.apache.org/licenses/LICENSE-2.0

Generating parser for grammar 'gherkin.berp' using template 'gherkin-perl.razor'.
Loading grammar...
The grammar was loaded with 14 tokens and 19 rules.
Calculating parser states...
50 states calculated for the parser.
Generating parser class...

Generation failed.
Could not load file or assembly or one of its dependencies.

Context & Motivation

I'm unable to determine whether or not I'm able to provide an update to the Perl implementation.

Your Environment

  • Version used: commit id: 3155c83
  • Operating System and version: Linux Mint (uname -a: Linux myhost 4.15.0-58-generic Update living-documentation.md #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux)
RELEASE=19.1
CODENAME=tessa
EDITION="Cinnamon"
DESCRIPTION="Linux Mint 19.1 Tessa"
@ehuelsmann
Copy link
Contributor Author

ehuelsmann commented Sep 1, 2019

After:

$ sudo aptitude install libmono-microsoft-csharp4.0-cil

I now get a different error:

Generating parser class...

Generation failed.
Error running mcs: Cannot find the specified file
System.SystemException: Error running mcs: Cannot find the specified file
  at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00176] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00011] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at Mono.CSharp.CSharpCodeCompiler.CompileFromDomBatch (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] ea) [0x00101] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromDomBatch (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] ea) [0x00011] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromDom (System.CodeDom.Compiler.CompilerParameters options, System.CodeDom.CodeCompileUnit[] compilationUnits) [0x00014] in <bd46d4d4f7964dfa9beea098499ab597>:0 
  at RazorEngine.Compilation.DirectCompilerServiceBase.Compile (RazorEngine.Compilation.TypeContext context) [0x001c5] in <8627fecbadd3475ba4687594d70b7e0f>:0 
  at RazorEngine.Compilation.DirectCompilerServiceBase.CompileType (RazorEngine.Compilation.TypeContext context) [0x00017] in <8627fecbadd3475ba4687594d70b7e0f>:0 
  at RazorEngine.Templating.TemplateService.CreateTemplateType (System.String razorTemplate, System.Type modelType) [0x000eb] in <8627fecbadd3475ba4687594d70b7e0f>:0 
  at RazorEngine.Templating.TemplateService.CreateTemplate (System.String razorTemplate, System.Type templateType, System.Object model) [0x00029] in <8627fecbadd3475ba4687594d70b7e0f>:0 
  at RazorEngine.Templating.TemplateService.Parse (System.String razorTemplate, System.Object model, RazorEngine.Templating.DynamicViewBag viewBag, System.String cacheName) [0x0000d] in <8627fecbadd3475ba4687594d70b7e0f>:0 
  at RazorEngine.Razor.Parse[T] (System.String razorTemplate, T model) [0x00006] in <8627fecbadd3475ba4687594d70b7e0f>:0 
  at Berp.Generator.Generate (System.String templatePath, Berp.RuleSet ruleSet, System.Collections.Generic.Dictionary`2[TKey,TValue] states, System.String outputPath) [0x00033] in <5e950d979c7e46288417a40fc7adb336>:0 
  at Berp.Program.GenerateParserInternal (Berp.Options options) [0x001af] in <5e950d979c7e46288417a40fc7adb336>:0 
  at Berp.Program.Main (System.String[] args) [0x0001e] in <5e950d979c7e46288417a40fc7adb336>:0 

The big question is: Which file????

@ehuelsmann
Copy link
Contributor Author

Ok. So, after

$ sudo aptitude install mono-mc

I'm now able to generate the parser. Would have been good to provide the list of prerequisites. Consider this a request to add better documentation for those who want to start contributing. This is currently quite discouraging.

@ehuelsmann
Copy link
Contributor Author

@aslakhellesoy in which file should I add the documentation about the berp dependencies?

@aslakhellesoy aslakhellesoy added library: gherkin 🔧 build Related to build / release process language: perl labels Sep 17, 2019
@ehuelsmann
Copy link
Contributor Author

@aslakhellesoy, ping?

@stale
Copy link

stale bot commented Nov 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Nov 25, 2019
@stale
Copy link

stale bot commented Dec 2, 2019

This issue has been automatically closed because of inactivity. You can support the Cucumber core team on opencollective.

@stale stale bot closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌛ stale Will soon be closed by stalebot unless there is activity language: perl library: gherkin 🔧 build Related to build / release process
Projects
None yet
Development

No branches or pull requests

2 participants