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

Moves ostream_operators.hpp include to all implementation files #485

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

michelle-vu19
Copy link
Contributor

Resolves issue #484

@michelle-vu19
Copy link
Contributor Author

@trittsv Good morning, can you take a look at this?

@trittsv
Copy link
Contributor

trittsv commented Apr 15, 2024

Hey @michelle-vu19, seems that i missed that case described in #484.

I put the include of the ostream_operators.hpp explicitly into the cpp file.
Because this file modifies the users std namespace and that is dangerous.
So i chose to encapsulate it in the cpp files.

I strongly recommend to keep it in the cpp files.

My suggestion is:
Iterate all the included idl files and check if they are using std types and include the ostream_operators.hpp in the cpp files there too.

@michelle-vu19
Copy link
Contributor Author

michelle-vu19 commented Apr 15, 2024

@trittsv Thank you for the suggestion, I can get to this later today.

@michelle-vu19
Copy link
Contributor Author

@trittsv From a first glance, it seems like getting information from included IDL files is not something that can be done with the way the generator is set up (not saving information after parsing a single file). Is there a way to get information about an include file without reparsing?

@jkav77
Copy link

jkav77 commented Jul 23, 2024

I'm running into this problem as well. Manually adding #include <org/eclipse/cyclonedds/util/ostream_operators.hpp> to the files that need it seem to help. I have almost 700 IDL files in my project so this is suboptimal. Is there a fix for this?

@michelle-vu19
Copy link
Contributor Author

@trittsv @reicheratwork @eboasson Sorry for taking so long to apply this suggestion :) Can I get a review on this? I am currently in the process of compiling CPP types just to verify that this works.

@trittsv
Copy link
Contributor

trittsv commented Sep 10, 2024

hey @michelle-vu19, looks good, you still need to sign the eclipsefdn/eca to be able to merge

@michelle-vu19
Copy link
Contributor Author

@trittsv Done!

@michelle-vu19 michelle-vu19 changed the title Moves ostream_operators.hpp include to header file Moves ostream_operators.hpp include to all implementation files Sep 10, 2024
@michelle-vu19
Copy link
Contributor Author

Update: my code generated successfully with the new changes :)

Copy link
Contributor

@reicheratwork reicheratwork left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Copy link

@yaniswav yaniswav left a comment

Choose a reason for hiding this comment

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

This change works fine for me! Resolving ostream_operators issues

@michelle-vu19
Copy link
Contributor Author

When can this be merged? :)

Copy link
Contributor

@eboasson eboasson left a comment

Choose a reason for hiding this comment

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

I am so sorry to have kept you waiting for so long @michelle-vu19

@eboasson eboasson merged commit 5942fce into eclipse-cyclonedds:master Oct 1, 2024
15 of 18 checks passed
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

Successfully merging this pull request may close these issues.

6 participants