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

scripts: Add C++11 headers to c_library_v2 #714

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vooon
Copy link
Member

@vooon vooon commented Apr 29, 2017

With that change c_library_v2 will also provide C++11 headers.
C++ generator also call C gen, so all what need to be changed is --lang.

@TSC21
Copy link
Member

TSC21 commented Jun 28, 2017

Is this addressed already with dc41593, @tridge?

@LorenzMeier
Copy link
Member

@vooon Could you rebase and is this still up to date?

@vooon
Copy link
Member Author

vooon commented May 26, 2018

@LorenzMeier rebased. Yes, it still should work.

@TSC21
Copy link
Member

TSC21 commented Sep 15, 2018

@vooon still relevant, right? Can you rebase? @LorenzMeier should we bring this in?

@julianoes
Copy link
Collaborator

What about having a different repo for C++? Is that something that has been considered?

@hamishwillee
Copy link
Collaborator

What about having a different repo for C++? Is that something that has been considered?

I assume that adding C++11 header to c_library_v2 will not break a C build?

FWIW C and C++ are quite different and it makes sense to let these evolve differently. I'd be tempted to generate separate cpp_library_v2 repo for now.

In future it might make sense to separate generator core and language specific bindings, in which case cpp would also have its own binding repo.

@julianoes
Copy link
Collaborator

I'd be tempted to generate separate cpp_library_v2 repo for now.

I agree but we need to give it a better name, e.g. mavlink_v2_generated_cpp.

@vooon
Copy link
Member Author

vooon commented Sep 27, 2018

C++ is not standalone, it uses same C utils, e.g. parser.
Only different part is serdes.

@hamishwillee
Copy link
Collaborator

@vooon

C++ is not standalone, it uses same C utils, e.g. parser.

Yes, we know that. The questions are whether it should be allowed to evolve separately, and whether including those headers causes problems for people developing in C.

@vooon
Copy link
Member Author

vooon commented Sep 27, 2018

  1. Reuse of existing utils reduce support cost, e.g. extensions to protocol do not require changes on two places, so i don't think that separation is actually required.
  2. Placing hpp files along with h should not be a problem for C. Developer can choose what it needs H or HPP.
    And note that C headers with required modifications for C++ already used everywhere.

@hamishwillee
Copy link
Collaborator

All true, but it is possible to write much better code using designed C++ APIs. This is not my call and it isn't a decision that needs to be made now.

@amilcarlucas
Copy link
Collaborator

Can this one be discussed at the dev meeting ?

@hamishwillee hamishwillee added the Dev Call Issues to be discussed during the Dev Call label Mar 27, 2019
@hamishwillee
Copy link
Collaborator

@amilcarlucas I added the dev call label. Note however that we rarely get through more than a couple of issues, so it actually being looked at depends on having a sponsor. Specifically, someone there who cared about it and can argue the case for or against.

@LorenzMeier
Copy link
Member

Would it make sense to add a 2nd repo just for C++? I presume you're not using C and C++ in the same project?

@stale
Copy link

stale bot commented Apr 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 23, 2020
@stale
Copy link

stale bot commented Jun 22, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Jun 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev Call Issues to be discussed during the Dev Call stale wontfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants