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

Error Generating Artifacts #622

Open
tuc-fmay opened this issue Feb 18, 2025 · 2 comments
Open

Error Generating Artifacts #622

tuc-fmay opened this issue Feb 18, 2025 · 2 comments

Comments

@tuc-fmay
Copy link

Hallo all,

I checked out the current master branch.

It builds through but problems arising when generating the language artifacts of SysML.xtext.

It results in the ollowing error:

As a result, alternative(s) 4 were disabled for that input
error(201): ../org.omg.sysml.xtext/src-gen/org/omg/sysml/xtext/parser/antlr/internal/InternalSysML.g:10056:2: The following alternatives can never be matched: 6

295564 [main] INFO  text.InternalParserSplitterFragment  - Reading src-gen/org/omg/sysml/xtext/parser/antlr/internal/InternalSysMLParser.java
295570 [main] ERROR text.InternalParserSplitterFragment  - java.nio.file.NoSuchFileException: src-gen/org/omg/sysml/xtext/parser/antlr/internal/InternalSysMLParser.java
295704 [main] INFO  text.xtext.generator.XtextGenerator  - Generating common infrastructure
295792 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow org.omg.sysml.xtext.GenerateSysML: 
[ERROR]: GeneratorException: (Element: -UNKNOWN-; Reported by: XtextGenerator)
	 org.eclipse.emf.common.util.WrappedException: java.lang.reflect.InvocationTargetException

It seems to be a problem finding the content for the InternalParserSplitterFragment.

I actually have some serious understanding issues :) Why is the so called template for splitting up the parser in the src-gen folder?
Why the splitting is neccessary is understandable for me.

Any hints or thoughts are welcome!

Thank you very much!

@seidewitz
Copy link
Member

The problem is that there was an error generating the parser. Since the parser was not generated, there was not anything to for the splitter to split.

I don't know why you got an error generating the SysML parser. The parser on master was successfully generated and tested before being pushed to the repository. No one else has reported any problem. Did you make any change in the grammar?

Even if you made no change in the grammar, you may need to regenerate KerMLExpressions.xtext and KerML.xtext before SysML.xtext. Note, though, that you don't actually have to regenerate the parsers before using the implementation. All the generated files are already provided in the repository.

(The need for the splitter is described in the "Technical Update" section at the end of the description of PR #608.)

@tuc-fmay
Copy link
Author

Thank you for your quick reply.

I also thought it might be a project setup issue because no one else had similar problems so far.

After your reply, I investigated a little bit further ...

It actually worked after raising the maximum heap size.

Just a hint for anyone which might stumble across that.

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