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

Serialization of compile definitions #1529

Merged
merged 2 commits into from
Jan 7, 2023
Merged

Serialization of compile definitions #1529

merged 2 commits into from
Jan 7, 2023

Conversation

erlingrj
Copy link
Collaborator

@erlingrj erlingrj commented Jan 7, 2023

No description provided.

@erlingrj erlingrj requested a review from lhstrh January 7, 2023 17:15
@erlingrj
Copy link
Collaborator Author

erlingrj commented Jan 7, 2023

@lhstrh @petervdonovan @arengarajan99 This PR is a proposal for how to make a generated C-target project "self contained". The compile definitions are dumped to a file called CompileDefinitions.txt which looks like:

NUMER_OF_WORKERS=0
LF_THREADED=1
LF_TRACING=1

Path.of(fileConfig.getSrcGenPath() + File.separator + "CompileDefinitions.txt")
);
} catch (IOException e) {
Exceptions.sneakyThrow(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this sneakyThrow for? I've seen these starting to appear since the port from Xtend to Java, which makes me believe this was used in the Xtend-generated Java code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know. I copied that pattern from a few lines above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@lhstrh lhstrh changed the title Dump compile defs to file Compile defs dumped to file Jan 7, 2023
@lhstrh
Copy link
Member

lhstrh commented Jan 7, 2023

@erlingrj could you add a description for the release notes?

@lhstrh lhstrh merged commit b98a1de into master Jan 7, 2023
@lhstrh lhstrh deleted the dump-compile-defs branch January 7, 2023 20:27
@lhstrh lhstrh changed the title Compile defs dumped to file Serialization of compile definitions Jan 26, 2023
@lhstrh lhstrh added the refactoring Code quality enhancement label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code quality enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants