Replace generated include folder with src-gen/include#2223
Open
petervdonovan wants to merge 8 commits into
Open
Replace generated include folder with src-gen/include#2223petervdonovan wants to merge 8 commits into
include folder with src-gen/include#2223petervdonovan wants to merge 8 commits into
Conversation
These changes to the includes actually were not necessary in order to eliminate the generated include directory in the project root. However I changed them anyway because they were a code smell (making assumptions about the relative locations of files instead of using the include path properly).
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the need for a generated include directory outside of src-gen by placing generated/runtime headers directly under each program’s src-gen/.../include directory and updating test C sources to include headers via the include search path instead of relative ../include/... paths.
Changes:
- Update C test helper sources to include generated/runtime headers using
"Pkg/Header.h"style paths (no../include/...). - Stop copying header artifacts into
src-gen/includeduring header generation (now written/copied there directly). - Simplify C target include path configuration to always use
<src-gen>/.../include.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/C/c/sendreceive.c | Switch includes from ../include/... to include-path-based "...". |
| test/C/c/multiport_to_reaction_no_inlining.c | Same include-path cleanup for generated header include. |
| test/C/c/count_hierarchy.c | Same include-path cleanup for generated header include. |
| test/C/c/count.c | Same include-path cleanup for generated header include. |
| test/C/c/bank_to_reaction_no_inlining.c | Same include-path cleanup for generated header include. |
| test/C/c/bank_multiport_to_reaction_no_inlining.c | Same include-path cleanup for generated header include. |
| core/src/main/java/org/lflang/generator/c/CGenerator.java | Remove redundant copy step now that includes live under src-gen/.../include. |
| core/src/main/java/org/lflang/generator/c/CFileConfig.java | Point includePath directly at getSrcGenPath()/include. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes to the includes actually were not necessary in order to eliminate the generated include directory in the project root. However I changed them anyway because they were a code smell (making assumptions about the relative locations of files instead of using the include path properly).