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

Fix issues when built or run on Windows #1466

Merged
merged 8 commits into from
Aug 9, 2018

Conversation

johnsonshih
Copy link
Contributor

No description provided.

@@ -59,7 +59,12 @@ def findCaller(self, dummy=False): # Dummy second arg to match Python3 function
f = inspect.currentframe()
if f is not None:
f = f.f_back
else:
return file_name, lineno, func_name
Copy link
Member

Choose a reason for hiding this comment

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

Can you please provide some context why this change was necesary? The same for the break a few lines below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

without this, roscore won't run on Windows. I need to investigate more about this change, will revert it from this PR for now.

const unsigned source_cnt = _sources.size();
pollfd fds[source_cnt];
XmlRpcSource * sources[source_cnt];
unsigned source_cnt = _sources.size();
Copy link
Member

Choose a reason for hiding this comment

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

Why can't this variable be const anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on MSVC compiler will complain that _sources.size() is not an constant, so I need to remove the const. I'll investigate to see if we can add it back

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after switching to use std::vector, I'm able to declare source_cnt as a const variable, will add it back.

@dirk-thomas
Copy link
Member

Thank you for the patch. The failing test is known to be flaky so this could be merged.

Do you want to keep iterating on this for the logging (if necessary?) or address that in a separate PR?

@johnsonshih
Copy link
Contributor Author

I will do a separate PR for the change in logging.

@dirk-thomas dirk-thomas merged commit 6b9efd5 into ros:melodic-devel Aug 9, 2018
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.

2 participants