-
Notifications
You must be signed in to change notification settings - Fork 132
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
Format all files to current ns-3 .clang-format rules #136
Conversation
Ideally, I would opt for merging this last, and first merge the commits that introduce the support for the latest version of ns-3. In this way, I could at least check that no tests are broken and that compilation works, while now my review would be almost worthless (15K + lines of changes are obviously too many to manually go through) |
Ok, I'll do that first. I started with this because, technically, the codestyle is an integral part of ns-3, so it would have been nice to bring it up to date before bumping the ns-3 version. On the topic of tests, I have a future MR planned that also adds "running the examples" to the tasks executed by ./test.py for this module. This improves the test coverage, that is currently not ideal. |
As previously mentioned in the mailing list. I suggest doing this first. If you set a remote repository forked from ns-3-dev gitlab master you can make use of the ns-3-dev gitlab pipeline (I don't know if there is such option fo ther github repository, maybe there is). Using this pipeline will check for any clang style mismatches and ensure that your code is up to rule not only with this MR but with any subsequent merges. Furthermore, you can constantly update your repository with the latest ns-3 changes. That is how we do it in ns-3 and makes keeping the code "updated" a painless process. If using the ci pipeline is not an option, then yes, this MR should be the last. |
Sorry all, I meant to keep this last as in simply merging the support for the latest ns-3 version first, so that we can at least start testing compilation and tests. In my opinion, this has the utmost priority, as it allows reviewers to setup at least some basic tests, and check that the coding style changes do not break those. |
Note: already before our intervention (e8f7a21), the module was compiling and the existing tests were passing. @pagmatt, do you suggest we add more tests before applying code formatting? Otherwise I can proceed to open a new MR with code formatting on the current repo state. @albertogara in this repo there are 2 github ci pipelines for tests and documentation. Unfortunately they are outdated so they constantly fail. I agree that being able to use the ones already in place for ns-3 would be a nice time-saver. |
What about opening a fork of ns-3-dev on Gitlab, with this repo as a submodule? In my opinion as a next step we could update the formatting and setup an updated CI, ideally using the same tests performed in the mainline ns-3 repo. Then, we can start adding more lorawan-specific tests. |
@non-det-alle Yes, I asked around in ns-3 to Gabriel Ferreira who is one of the persons who handle the ci pipeline. Apparently, there is a minimalistic ci pipeline for the github repository but it only checks for compilation in some OS. It does not make the full checks the ci pipeline does in gitlab. So yes I recommend using the forked repo from gitlab. @pagmatt Yes, in my opinion, the best option would be for you to fork from gitlab and we can start adding the submodule. I say "you" because ultimately you approve all the merges while we just participate on the sidelines :D. Also, I recommend you to maintain this new gitlab repository updated(once or twice per week) with the ns-3-dev changes. In this way, Alessandro will be always doing its MR with the bleeding edge version of ns-3-dev, and no coding style issues will arise in the future or they will be detected on each MR. These are just suggestions, but I am ok with any way you both think is more comfortable. |
Hello @albertogara, me and @pagmatt continued the discussion on CI here: #138 In the past days I've started working on creating a Github CI pipeline (also based on the one from Gabriel Ferreira already present in ns-3). I'm aiming to at least have a subset of the checks present in the Gitlab pipeline that cover building, testing, formatting and documentation in ubuntu with gcc. You can check my current progress here. My point is that having both option would be better (a reduced Gitlab pipeline for contributors' MRs + the full Gitlab pipeline that can be run by maintainers by committing to the ns-3 fork) |
@albertogara Regarding the timing of the updates, I believe that following the mmwave and 5G NR approach makes more sense, i.e., update the module whenever a new version of ns-3 is released, or in case there are significant changes that are particularly relevant for the lorawan submodule. In the meantime, we point to the latest ns-3 release as the version of ns-3 to use the module with. |
I think updating with every ns-3 release like you mentioned is very reasonable. |
@non-det-alle raised some valid points against the Gitlab fork, so I believe that keeping the repository here in Github might be the way forward, at least for the time being. |
Apply ns-3 .clang-format rules to all C++ files of the module. No additional changes beyond formatting.
This merge is meant to break up a previous huge pull request into more digestible pieces.