oss-slu / oss-slu/PilotDataSynchronization

Remove dead code left over from the Rust migration

Open
#190 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4
Forks
8
Avg merge
5d 17h
Merged PRs (30d)
2

Description

Describe the bug
Several files are unreachable, uncompiled, or reference symbols that no longer exist. #103 asked for the old threading tools and TCP client and server to be removed, and #145 listed "no unused or dead code remains" as an acceptance criterion. Both are only partly done.

Confirmed dead:

  • xplane_plugin/include/plugin.h declares elevationMslRef, elevationAglRef, airspeedRef and verticalVelocityRef. None exist in either source file. Nothing includes the header.
  • xplane_plugin/include/threading-tools.h declares ThreadQueue, generate_packet and output_xml with no definitions anywhere. Its only includer is a test that shadows it, see #191.
  • xplane_plugin/subprojects/baton/main.cpp calls new_wrapper(), which no longer exists; the bridge exports new_baton_handle(). It is not referenced by the baton meson build, so it is never compiled and would fail if it were.
  • src/clientserver declares binaries at src/server.rs and src/client.rs. Neither file exists, so the crate cannot build.
  • relay/src/ipc.rs is unreferenced (mod ipc; is commented out at relay/src/main.rs:2) and would not compile if it were, because it imports crate::IpcThreadMessage, a type that does not exist.
  • src/client.rs at the repository root is orphaned. No manifest points at it.
  • xplane_plugin/tests/test.cc, headingtests.cpp, headingtests.hpp and CMakeLists.txt are tracked but referenced by no build.

Expected behavior
These are deleted, finishing #103 and #145.

Additional context
Deleting threading-tools.h requires removing the include at xplane_plugin/tests/test_threading_tools.cpp:1. Best done alongside the testing issue.

Found while writing the setup documentation in #138 / #178.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the listed orphaned headers, source files, tests, manifests, and build declarations, including xplane_plugin/tests/test_threading_tools.cpp and relay/src/main.rs. Remove the confirmed dead files and references, then run the relevant Rust, Meson, and CMake checks. Done means the named dead code is gone and no build declaration or include still points to it.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, rust
Domain
build-system, testing, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.