behavioral-model
behavioral-model copied to clipboard
Update project to require C++17
The project has been requiring / supporting C++11 since its inception.
It think it may be time to bump this requirement up to C++14, so that contributors can start using features introduced in C++14. I would personally be fine with C++17, but C++14 is more conservative.
One immediate advantage would be to remove the boost/thread/shared_mutex.hpp
dependency, since C++14 includes a shared mutex (With support for RW lock) as part of the standard library.
Most of the required changes would be targeted at the build system and documentation.
Edit: based on discussion below, C++17 seems preferred to C++14. So that should be the plan unless there is a timely objection from someone.
We have updated P4C to C++17 a while ago. I think requiring C++17 at minimum is fair.
We should check with @smolkaj if that's acceptable to him, but if it's fine for p4c it should be fine for bmv2 as well.
Yes, the newer the better from my side. We're on C++20 internally at Google.
Hello ,
I would like to take this up as my very first contribution to get into open source. I've never done this before and would really appreciate it if you could help me get started. Can you tell me where to start contributing? Any pointers or links to external references would be really helpful. thank you for your time.
Hello ,
I would like to take this up as my very first contribution to get into open source. I've never done this before and would really appreciate it if you could help me get started. Can you tell me where to start contributing? Any pointers or links to external references would be really helpful. thank you for your time.
The pragmatic answer is that you simply switch this flag here: https://github.com/p4lang/behavioral-model/blob/main/configure.ac#L130 and then try to compile the behavioral model. Things will likely break and you may have to fix the issues one after the other.
@OsamaReb3 I saw an email that appears to be a question from you for Fabian, but when I try to reply-all to that email, your email address is not obviously in the list of recipients, so I am responding this way instead.
To create a pull request, you do not need any account on any web site except github.com, which it appears you already do.
The basics are:
-
Use Github's "fork" feature to create your own personally owned copy of the repository p4lang/behavioral-model, which will be called (for you) https://github.com/OsamaRab3/behavioral-model
-
Clone that repository locally on your development system
-
In your local copy, do
git checkout -b <some-branch-name-you-make-up-describing-your-changes>
to create a branch where your proposed changes will be. -
Do 1 (or more) commits to that branch in your local repository.
-
When you are ready to publish those changes, go to https://github.com/p4lang/behavioral-model, and Github should show a button near the top that lets you create a PR (Pull Request). Click that.
-
The pull request should now be visible to the public, under the "Pull Requests" "tab" visible near the top of the window at https://github.com/p4lang/behavioral-model
Before your pull request can be merged in, it must be approved by others.
Currently, you must also have digitally signed the Open Networking Foundation CLA. But let's worry about how to jump through that hoop after you get through the steps above.
@jafingerhut I suspect someone deleted the comment as it is unrelated to the issue
I've made the changes to the build system and documentation to reflect this update. Could you please guide me on the best practices for testing these changes? Specifically, I want to ensure that the upgrade does not introduce any issues and that the project remains stable and functional.
I've made the changes to the build system and documentation to reflect this update. Could you please guide me on the best practices for testing these changes? Specifically, I want to ensure that the upgrade does not introduce any issues and that the project remains stable and functional.
Just open a pull request to this repository. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
The continuous integration will automatically test your changes and we can review them.