-
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
[C] do not generate code without main reactor #1000
Conversation
How does this PR relate to #913? Not generating code when there is no main reactor means that we cannot generate any pure library code. Is that really what we want? |
The error outlined in #913 is due to The |
I think we should really generate a library if there is no main reactor. In fact, I think we should create a library for all LF files and only generate a small binary that uses this library if there is a main reactor. Note that for C++ we have a long open issue: #83. For the short term solution, though, it might be better to just forbid compilation without a main reactor. Without a package system, it does not make much sense to compile LF programs as libraries. |
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.
Looks like a good quick fix. Like @cmnrd said, more work would be needed for the generation of library code. I've made suggestions for the removal of checks that I think are unnecessary.
Oh, and congrats on filing PR #1000 🥳 |
Co-authored-by: Marten Lohstroh <marten@berkeley.edu>
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.
One more suggestion.
Co-authored-by: Marten Lohstroh <marten@berkeley.edu>
Do not generate code when there is no main reactor
Fixes #913