-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added AlarmClock example #780
Conversation
Why not add the actual example? |
Did you take a look at the repository. Opinions ? Feedback ? I just figured I would be less of a hustle in the future when I change / add things that I don't need to update the example here. The other point is that I use Crow as my networking library and I include it as a git sub-module therefore it won't build in this repository because of the missing dependency. But sure I can add the source files no problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since, apparently, this is not your actual clock but a simplified version, I agree that it is probably better to avoid the submodule and add all your sources directly.
Could you also add a README with brief usage instructions? What do I need to do to try this out? Also some high level comments on what this does and how it works would be nice.
I think I spotted a syntax error here
Also I cannot compile the example. i get this strange error:
ava.util.NoSuchElementException
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1000)
at org.lflang.generator.ReactorInstance.establishPortConnections(ReactorInstance.java:1197)
at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:1056)
at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:919)
at org.lflang.generator.ReactorInstance.<init>(ReactorInstance.java:80)
at org.lflang.ModelInfo.update(ModelInfo.java:116)
at org.lflang.validation.LFValidator.checkModel(LFValidator.java:785)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:129)
at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:337)
at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:72)
at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:151)
at org.eclipse.emf.ecore.util.Diagnostician.doValidate(Diagnostician.java:257)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:244)
at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:41)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:201)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:143)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:147)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:125)
at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:91)
at org.lflang.lfc.Main.getValidatedResource(Main.java:325)
at org.lflang.lfc.Main.runGenerator(Main.java:268)
at org.lflang.lfc.Main.main(Main.java:206)
lfc: fatal error: An unexpected error occurred:
java.lang.NullPointerException
at org.lflang.FileConfig.toIPath(FileConfig.java:707)
at org.lflang.FileConfig.toPath(FileConfig.java:690)
at org.lflang.lfc.Main.getValidatedResource(Main.java:333)
at org.lflang.lfc.Main.runGenerator(Main.java:268)
at org.lflang.lfc.Main.main(Main.java:206)
This indicates some problem in the compiler, but I suspect that it is triggered by the syntax error.
@cmnrd ok so only the sources. But then it won't compile because cmake wont find the crow library (the http lib that I use). |
Signed-off-by: revol-xut <revol-xut@protonmail.com>
That is not a problem. With our current CI configuration, we only run the LF code generation in all examples, but we don't invoke the target compiler (since multiple examples have external dependencies). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this does not compile for me because the include of shared_header.hpp
cannot be resolved. See my comments for a proposed fix.
added crow to dependencies Co-authored-by: Christian Menard <Christian.Menard@gmx.de>
What was done ?
Added a short description and reference to the projects repository. This will be helpful to many which want to learn lingua franca or want to see how other people solved some issues or structured their project.