swarm icon indicating copy to clipboard operation
swarm copied to clipboard

Roadmap

Open frederic-mahe opened this issue 3 years ago • 8 comments

For complete transparency, this is the roadmap I have in mind for swarm. Of course, this is completely open for discussion.

Semantic Versioning 2.0.0

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards compatible manner, and
PATCH version when you make backwards compatible bug fixes.

~Assuming that supporting a new architecture adds a functionality:~

  • ~swarm 3.0.1 (fix issue #160),~
  • ~swarm 3.1.0 (macOS ARM64 release)~

swarm 3.1.x:

  • ~much faster input file reading (for normal files, not streams),~
  • use more C++11 and STL features,
  • eliminate 99% of clang-tidy's warnings,
  • measure the effect of code modernization on compilation time, binary size and run-time performances

swarm 3.1.y:

  • refactor to reduce cyclomatic complexity (simpler and shorter functions),
  • reduce/eliminate linuxisms to improve portability

swarm 3.2.0:

  • swarm can be compiled on a BSD or a Windows system

long term goals:

  • no more pending issues!

frederic-mahe avatar Feb 19 '21 11:02 frederic-mahe

Looks good to me!

I think I've solved the problem with the 16-bit alignment code (issue #160) now. I hope to push out the fixes later today after more testing.

It works on macOS on arm64 as well now. The small necessary changes were in commit d4b26047ab0dd2606259aa1aea2d2a4809bd9872. I think it can be released directly as 3.1.0 without any 3.0.1 version.

torognes avatar Feb 25 '21 09:02 torognes

Fantastic! I am sorry I was not able to help more on issue #160. ASM still looks daunting to me.

frederic-mahe avatar Feb 25 '21 09:02 frederic-mahe

Pushed the bug fix now.

I have some problems with the mingw64-gcc-c++ compiler that I use to cross-compile the code for Windows. It seems to fail to initialize some data that is initialized in the declarations and not within functions. It causes crashes and strange errors on Windows only.

torognes avatar Feb 25 '21 17:02 torognes

I can try mingw-w64-x86-64 v8.3 on my computer in the next coming days. I hope this is something we can fix, I'd be sad to have to revert to pre-C++11 code standard.

frederic-mahe avatar Feb 25 '21 18:02 frederic-mahe

I've set up another development server in our research cloud with Debian 10 and x86_64-w64-mingw32-g++ version 8.3. Seems to work better!

torognes avatar Feb 26 '21 11:02 torognes

cd ./swarm/src/

make clean ; make CXX=x86_64-w64-mingw32-g++

It works with v8.3, if I replace #include <regex.h> with #include <regex>, which seems ok (regex seems to be gone anyway with the latest bug fix).

(also make fails to move the exe named swarm.exe as it expects a binary file named swarm)

frederic-mahe avatar Feb 26 '21 17:02 frederic-mahe

Yes, regex.h has been removed as it not used anymore. Have also updated name of binary on Windows to swarm.exe in commit f480695992a0a28a4f902b179dc154833a8c473f.

torognes avatar Feb 26 '21 21:02 torognes

using more C++11 features and eliminating clang-tidy warnings: current state

Mid-January, I've spent several days refactoring. The number of clang-tidy warnings went from 5,170 to 3,186. Eliminated warnings were mostly about global variables and short variable names. I was also able to extract and isolate a few functions, thus reducing code duplication and complexity.

Interestingly, using C++ features such as new/delete instead of malloc/free allowed static analyzers to dig deeper and to report 118 new warnings regarding memory ownership [cppcoreguidelines-owning-memory]. Ideally, direct memory allocations should be replaced with standard containers where possible. Doing so should shorten and simplify swarm's code greatly.

During refactoring, I make sure to check that all tests from our test suite are still passing. I also test compilation on older GCC versions, and every now and then, I run a benchmark to make sure that refactoring does not reduce performances.

frederic-mahe avatar Feb 16 '22 16:02 frederic-mahe

A roadmap section has been added to the README file. Future updates regarding the roadmap will be mentioned there. That issue can be closed.

frederic-mahe avatar Sep 22 '22 07:09 frederic-mahe