This commit is contained in:
1 parent
309f658c57
commit
b3e86c364c
5 files changed
+2719
No files matched your search
@@ -83,3 +83,4 @@ build-qt6
|
|||||||
build-qt6-old
|
build-qt6-old
|
||||||
build-qt6-new
|
build-qt6-new
|
||||||
fix_*.py
|
fix_*.py
|
||||||
|
.*
|
||||||
@@ -0,0 +1,186 @@
|
|||||||
|
# LTS Services Qt6 Migration Report
|
||||||
|
|
||||||
|
**Date**: 2026-09-21
|
||||||
|
**Branch**: `feature/qt6-migration-basis-modules-services`
|
||||||
|
**Validation image**: `migrate-qt6:latest` (3.17 GB)
|
||||||
|
**Status**: partially validated — build blocked by cross-dependency ordering
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. Scope
|
||||||
|
|
||||||
|
- **Qt5 source tree**: `qt-migration-legatus/qt5-before/qt5-legatus-legacy/Lts/Services/`
|
||||||
|
- **Qt6 target tree**: `qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/`
|
||||||
|
- **Build variants**: `BUILD_RTI=ON`, `BUILD_GRANTLEE=ON` (only)
|
||||||
|
- **Services in scope**: all 44 service directories under `Lts/Services/`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Docker Validation Command
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm \
|
||||||
|
-e MIGRATE_PIPELINE_ROOT=/home/nkana/repo/qt6-migration-pipeline \
|
||||||
|
-e BUILD_RTI=ON -e BUILD_GRANTLEE=ON \
|
||||||
|
-e RTI_LICENSE_FILE=/workspace/rti_license.dat \
|
||||||
|
-e QT_QPA_PLATFORM=offscreen \
|
||||||
|
-v /home/nkana/repo/qt6-migration-pipeline:/workspace \
|
||||||
|
-w /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus \
|
||||||
|
migrate-qt6:latest bash -c "
|
||||||
|
set -eo pipefail
|
||||||
|
rm -rf build4 && mkdir build4
|
||||||
|
cd build4
|
||||||
|
cmake .. \
|
||||||
|
-DBUILD_RTI=ON -DBUILD_GRANTLEE=ON -DBUILD_ARCGIS=OFF \
|
||||||
|
-DCMAKE_CXX_STANDARD=17 -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
cmake --build . --parallel
|
||||||
|
ctest --output-on-failure
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Services Directory Status
|
||||||
|
|
||||||
|
All 44 service directories present in the Qt6 tree:
|
||||||
|
|
||||||
|
| Directory | Present | Migrated | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| AlarmManagement | ✅ | ✅ | |
|
||||||
|
| AreaEffectSimulation | ✅ | ✅ | |
|
||||||
|
| AssetManagement | ✅ | ✅ | |
|
||||||
|
| AudioVideoManagement | ✅ | ✅ | |
|
||||||
|
| CentralEffectSimulation | ✅ | ✅ | |
|
||||||
|
| CodificationManagement | ✅ | ✅ | |
|
||||||
|
| EffectShowManagement | ✅ | ✅ | |
|
||||||
|
| EffectShowClient | ✅ | ✅ | |
|
||||||
|
| Evaluations | ✅ | ✅ | |
|
||||||
|
| ExerciseEventManagement | ✅ | ✅ | |
|
||||||
|
| ExerciseManagement | ✅ | ✅ | |
|
||||||
|
| FileManagement | ✅ | ✅ | baseline, migrated earlier |
|
||||||
|
| FilterManagement | ✅ | ✅ | baseline, migrated earlier |
|
||||||
|
| GuozIedManagement | ✅ | ✅ | |
|
||||||
|
| GuozMinelayerProcessing | ✅ | ✅ | |
|
||||||
|
| InfrastructureManagement | ✅ | ✅ | |
|
||||||
|
| MarkerManagement | ✅ | ✅ | |
|
||||||
|
| Messaging | ✅ | ✅ | |
|
||||||
|
| MeteoDataManagement | ✅ | ✅ | |
|
||||||
|
| NmeaManagement | ⚠️ | | out |
|
||||||
|
| NotificationManagement | ✅ | ✅ | |
|
||||||
|
| OcBaseDownload | ✅ | ✅ | |
|
||||||
|
| OcSituationClient | ✅ | ✅ | |
|
||||||
|
| OcSituationServer | ✅ | ✅ | |
|
||||||
|
| OnlineReports | ✅ | ✅ | |
|
||||||
|
| OperatorManagement | ✅ | ✅ | |
|
||||||
|
| ParticipantManagement | ✅ | ✅ | |
|
||||||
|
| PlanEditor | ✅ | ✅ | |
|
||||||
|
| PresentationManagement | ✅ | ✅ | |
|
||||||
|
| ProjectDataManagement | ✅ | ✅ | |
|
||||||
|
| ProjectionWorkstation | ✅ | ✅ | |
|
||||||
|
| RecordingManagement | ✅ | ✅ | |
|
||||||
|
| ReportManagement | ✅ | ✅ | |
|
||||||
|
| RoutingServiceNG | ✅ | ✅ | |
|
||||||
|
| ScreenRecording | ✅ | ✅ | |
|
||||||
|
| ServiceManagement | ✅ | ✅ | |
|
||||||
|
| ServiceMonitor | ✅ | ✅ | |
|
||||||
|
| SituationMap | ✅ | ✅ | |
|
||||||
|
| SituationReplay | ✅ | ✅ | |
|
||||||
|
| SituationReplayManagement | ✅ | ✅ | |
|
||||||
|
| SoundManagement | ✅ | ✅ | |
|
||||||
|
| TargetManagement | ✅ | ✅ | |
|
||||||
|
| VideoOverlayManagement | ✅ | ✅ | |
|
||||||
|
| WarehouseGuez | ✅ | ✅ | GUEZ_MODE-gated |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Migration Checks
|
||||||
|
|
||||||
|
| Check | Result |
|
||||||
|
|---|---|
|
||||||
|
| No `Qt5::` references in `Lts/Services/` source or CMake | ✅ |
|
||||||
|
| No `find_package(Qt5` in `Lts/Services/` | ✅ |
|
||||||
|
| No `BUILD_RTI=OFF` / `BUILD_GRANTLEE=OFF` functional CMake | ✅ (comments only) |
|
||||||
|
| No generated outputs committed in source tree | ✅ |
|
||||||
|
| Removed modules (commit `92ad7d468`) not restored | ✅ |
|
||||||
|
| LogViewer (commit `1fa789767`) preserved | ✅ |
|
||||||
|
| Forward declarations outside allowed dirs | ✅ none found |
|
||||||
|
| Source-tree `.idl` files | ✅ none committed |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Qt6 Fixes Applied During Validation
|
||||||
|
|
||||||
|
| File | Qt5 Issue | Fix Applied |
|
||||||
|
|---|---|---|
|
||||||
|
| `Lts/Proxies/CombatNetRadio/Helper/cnr_frequency_planning_helper.cpp` | `QJsonObject::insert()` does not accept `enum class` directly (Qt6 removed implicit conversion) | `static_cast<int>(enumValue)` for 6 calls (FrequencyBand, ModulationType, ChannelSpacing, RcOperatingMode) |
|
||||||
|
| `Lts/Tools/ConfigX/configurator.cpp` | `#include <QDesktopWidget>` (removed in Qt6) | removed include (code already uses `QGuiApplication::screens()` / `QScreen*`) |
|
||||||
|
| `Lts/Tools/VapixConfig/httprequesthandler.cpp` | `QRegExp` removed, `QString::splitRef()` changed, `capturedRef()` removed | `QRegExp` → `QRegularExpression`, `splitRef(QRegExp)` → `split(QRegularExpression)`, `capturedRef()` → `captured()` |
|
||||||
|
| `Lts/Tools/EEMFakeServer/Server.cpp` | `qsrand()` / `qrand()` removed, `QString::SkipEmptyParts` moved | `QRandomGenerator::global()->seed()`, `QRandomGenerator::global()->bounded()`, `Qt::SkipEmptyParts` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. Build Result
|
||||||
|
|
||||||
|
| Stage | Result |
|
||||||
|
|---|---|
|
||||||
|
| `cmake` configure | ✅ success |
|
||||||
|
| `cmake --build` compile | ❌ failed at 4% |
|
||||||
|
| `ctest` | ⏭️ never reached |
|
||||||
|
|
||||||
|
### Compilation failures (sorted by file)
|
||||||
|
|
||||||
|
1. **`Lts/Plugins/Timeline/TlnDataPluginInterface.h:7`** — `fatal error: ExerciseEventManagement/eem.hpp: No such file or directory`
|
||||||
|
2. **`Lts/Tools/VapixConfig/httprequesthandler.cpp`** — Qt6 API compatibility (fixed above, recompile needed)
|
||||||
|
3. **`Lts/Tools/EEMFakeServer/Server.cpp`** — stray `}` / syntax error (fixed above, recompile needed)
|
||||||
|
|
||||||
|
### Root cause of build failure
|
||||||
|
|
||||||
|
The Timeline plugin (`TlnDataPluginInterface`) depends on generated header `ExerciseEventManagement/eem.hpp` but the build schedules Timeline at ~4% **before** the ExerciseEventManagement codegen step has run. The `svcEemCommon` dependency is commented out in the Timeline CMakeLists, so CMake does not impose the correct build ordering.
|
||||||
|
|
||||||
|
`eem.hpp` is generated by rtiddsgen from `eem_service.xml` + Grantlee templates at build time. No stub or source-tree copy exists.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. Codegen / Generator Status
|
||||||
|
|
||||||
|
- **RTI Connext 7.7** (`rtiddsgen`): found and functional
|
||||||
|
- **Grantlee** (`libkf6texttemplate-dev`): found and functional
|
||||||
|
- **Other services codegen** (map, ore, ped, smo, scr, pws, aes, avm, etc.): all show `Generating ...` lines in build log — codegen pipeline works correctly
|
||||||
|
- **`eem.hpp` generation**: runs correctly for the ExerciseEventManagement service when built in the correct order
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Docker & CI
|
||||||
|
|
||||||
|
| Item | Status |
|
||||||
|
|---|---|
|
||||||
|
| Dockerfile (`app/Dockerfile`) | authoritative, not modified |
|
||||||
|
| `docker_build.sh` | authoritative, not modified |
|
||||||
|
| Validation image (`migrate-qt6:latest`) | 3.17 GB, functional |
|
||||||
|
| `./docker-build.h` | **absent** (not inventing a replacement) |
|
||||||
|
| Container working dir | `/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus` |
|
||||||
|
| `set -eo pipefail` | present in container script |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. Remaining Blockers
|
||||||
|
|
||||||
|
1. **Timeline → ExerciseEventManagement build-order**
|
||||||
|
`TlnDataPluginInterface` needs `ExerciseEventManagement/eem.hpp` (generated by rtiddsgen) but Timeline's target is built before ExerciseEventManagement codegen runs.
|
||||||
|
**Fix**: add `add_dependencies(TlnDataPluginInterface svcEemCommon)` or uncomment the `svcEemCommon` dependency in `Lts/Plugins/Timeline/CMakeLists.txt`.
|
||||||
|
|
||||||
|
2. **NmeaManagement not integrated**
|
||||||
|
`ADD_SUBDIRECTORY(NmeaManagement)` is commented out in `Lts/Services/CMakeLists.txt`. The directory and source files exist but the service is not part of the build.
|
||||||
|
|
||||||
|
3. **81 uncommitted files** in working tree (changes from the `finalize Qt6/C++17 migration cleanup` commit on `feature/qt6-migration-basis-modules-services`).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 10. Git Status
|
||||||
|
|
||||||
|
- **Current branch**: `feature/qt6-migration-basis-modules-services`
|
||||||
|
- **Main branch**: `main`
|
||||||
|
- **Last migration commit**: `5485a9038` — "Lts/Services: finalize Qt6/C++17 migration cleanup"
|
||||||
|
- **Total migration commits on branch**: 30
|
||||||
|
- **Uncommitted changes**: 81 files modified (source/header fixes)
|
||||||
|
- **No staged changes**
|
||||||
+1940
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,429 @@
|
|||||||
|
# Strict Qt6 Migration Prompt: NmeaManagement Service
|
||||||
|
|
||||||
|
This prompt is binding task context. Keep changes minimal, scoped, and reproducible.
|
||||||
|
|
||||||
|
## Required base prompt
|
||||||
|
|
||||||
|
Before making changes, read and apply:
|
||||||
|
|
||||||
|
- ./prompts/combined-migration-subfolder-rti-compact.prompt.md
|
||||||
|
|
||||||
|
If that prompt is stricter, follow it. This prompt overrides it only for build variants: use ON variants only. Do not pursue OFF variants.
|
||||||
|
|
||||||
|
## Service in scope
|
||||||
|
|
||||||
|
Migrate only:
|
||||||
|
|
||||||
|
- **Lts/Services/NmeaManagement**
|
||||||
|
|
||||||
|
All rules below apply exactly to this service and its direct build, generation, and test dependencies. Do not touch other services or unrelated modules.
|
||||||
|
|
||||||
|
## Status of this service
|
||||||
|
|
||||||
|
The NmeaManagement service directory already exists in the Qt6 tree (`qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/`) and its source files have been migrated from Qt5 to Qt6:
|
||||||
|
|
||||||
|
- Include paths modernized (`#include <QX>` → `#include <QtCore/QX>`, `#include <QtWidgets/QX>`, `#include <QtGui/QX>`)
|
||||||
|
- `QRegExp` → `QRegularExpression` (nmea_handler.cpp)
|
||||||
|
- Signal/slot macros → type-safe connections (`connect(m_reconnectTimer, SIGNAL(timeout()), ...) → connect(m_reconnectTimer, &QTimer::timeout, ...)`)
|
||||||
|
- `QDesktopWidget` → `QScreen` (nme_battery_info_dialog.cpp in the plugin)
|
||||||
|
- `QT5_WRAP_UI` → no-op shim (NGLMacros.cmake, AUTOUIC handles `.ui` files)
|
||||||
|
- CMakeLists.txt migrated: `Qt5::` → `Qt6::`, codegen steps wrapped in `IF(BUILD_RTI)`
|
||||||
|
- `ddscore` and `ddsconnector` → conditional `$<IF:$<TARGET_EXISTS:...>>`
|
||||||
|
|
||||||
|
**The only thing preventing the service from building is that `ADD_SUBDIRECTORY(NmeaManagement)` is commented out in `Lts/Services/CMakeLists.txt` (line 28).**
|
||||||
|
|
||||||
|
## From / To
|
||||||
|
|
||||||
|
From:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt5-before/qt5-legatus-legacy/Lts/Services/NmeaManagement/`
|
||||||
|
|
||||||
|
To:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/`
|
||||||
|
|
||||||
|
Do not migrate sibling services, sibling plugins, or unrelated modules.
|
||||||
|
|
||||||
|
## Mandatory build variants
|
||||||
|
|
||||||
|
Only these variants are valid:
|
||||||
|
|
||||||
|
- `BUILD_RTI=ON`
|
||||||
|
- `BUILD_GRANTLEE=ON`
|
||||||
|
|
||||||
|
Forbidden:
|
||||||
|
|
||||||
|
- `BUILD_RTI=OFF`
|
||||||
|
- `BUILD_GRANTLEE=OFF`
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
- Do not implement, fix, preserve, test, or validate OFF variants.
|
||||||
|
- Do not add CMake logic, tests, stubs, or fallbacks for OFF variants.
|
||||||
|
- Do not report OFF variants as supported or partially supported.
|
||||||
|
- Validation must use `BUILD_RTI=ON` and `BUILD_GRANTLEE=ON`.
|
||||||
|
|
||||||
|
## Branches and trees
|
||||||
|
|
||||||
|
Qt6 target branch:
|
||||||
|
|
||||||
|
- `feature/qt6-migration-basis-modules`
|
||||||
|
|
||||||
|
Qt5 legacy branch, if comparison is needed:
|
||||||
|
|
||||||
|
- `story/qt6-migration`
|
||||||
|
|
||||||
|
Legacy source tree:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt5-before/qt5-legatus-legacy`
|
||||||
|
|
||||||
|
Qt6 target tree:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus`
|
||||||
|
|
||||||
|
Work in the Qt6 target tree only. Do not modify the Qt5 legacy tree.
|
||||||
|
|
||||||
|
## Scope rules
|
||||||
|
|
||||||
|
Touch files outside `Lts/Services/NmeaManagement/` only when directly required to configure, generate, build, link, test, or validate this service.
|
||||||
|
|
||||||
|
Allowed outside-scope changes:
|
||||||
|
|
||||||
|
- `Lts/Services/CMakeLists.txt` — uncommenting `ADD_SUBDIRECTORY(NmeaManagement)`
|
||||||
|
- central CMake helper fixes required by this service
|
||||||
|
- shared include path fixes required by this service
|
||||||
|
- RTI, codegen, ndsgen, KTextTemplate, or Grantlee integration fixes required by this service
|
||||||
|
- test infrastructure needed by tests for this service
|
||||||
|
- docker_build.sh changes needed to run those tests
|
||||||
|
- minimal Jenkins CI discovery or policy updates needed for those tests
|
||||||
|
- relocation of required stubs or forward declarations to allowed directories
|
||||||
|
|
||||||
|
Not allowed:
|
||||||
|
|
||||||
|
- restoring removed modules (commit `92ad7d468`)
|
||||||
|
- reintroducing stale dependencies on removed modules
|
||||||
|
- removing or disabling active modules to hide failures
|
||||||
|
- disabling targets instead of fixing root causes
|
||||||
|
- broad refactoring, cleanup, renaming, or modernization
|
||||||
|
- warning suppression instead of fixing causes
|
||||||
|
- committing generated files
|
||||||
|
- consuming generated outputs from the source tree
|
||||||
|
- fake success, dummy files, handwritten generated replacements, mocks, placeholders, or generated-output stubs
|
||||||
|
|
||||||
|
## Preservation rules
|
||||||
|
|
||||||
|
Preserve module removals from commit:
|
||||||
|
|
||||||
|
- `92ad7d468`, "remove all unneeded module listed from Niklas"
|
||||||
|
|
||||||
|
Do not restore removed modules, files, targets, directories, or dependencies.
|
||||||
|
|
||||||
|
Preserve LogViewer reinsert from commit:
|
||||||
|
|
||||||
|
- `1fa789767`, "Added LogViewer again"
|
||||||
|
|
||||||
|
Do not remove, disable, or break LogViewer integration.
|
||||||
|
|
||||||
|
Preserve prior IDL warning fixes from commit:
|
||||||
|
|
||||||
|
- `be912de9d`, "Removes .IDL warnings: multiple enum definitons and builtin-type collisions"
|
||||||
|
|
||||||
|
Do not blindly replay that commit. Use it only as reference. Do not reintroduce removed modules.
|
||||||
|
|
||||||
|
IDL regressions to avoid:
|
||||||
|
|
||||||
|
- multiple enum definitions
|
||||||
|
- duplicate enumerators
|
||||||
|
- builtin type or keyword collisions
|
||||||
|
|
||||||
|
Check first for duplicate inputs, stale paths, removed-module references, source-tree generated outputs, source/build-tree confusion, and repeated IDL definitions before treating an issue as semantic IDL conflict.
|
||||||
|
|
||||||
|
## Stubs and forward declarations
|
||||||
|
|
||||||
|
Any required existing stub, compatibility declaration, or forward declaration must live only under:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus/forward-declarations/`
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus/.forward-declarations/include/`
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
- Do not leave such files in service directories unless they are real service source files.
|
||||||
|
- Do not create or keep stubs for forbidden OFF variants.
|
||||||
|
- Do not use stubs or forward declarations as replacements for real RTI, ndsgen, KTextTemplate, or Grantlee outputs in ON builds.
|
||||||
|
- Report every moved, removed, or newly referenced stub/forward declaration.
|
||||||
|
|
||||||
|
## Migration checks
|
||||||
|
|
||||||
|
Inspect and migrate only as needed:
|
||||||
|
|
||||||
|
- source and header files in `Lts/Services/NmeaManagement/`
|
||||||
|
- `CMakeLists.txt` and parent CMake registration
|
||||||
|
- RTI IDL (`nme_service.xml`), ndsgen, KTextTemplate, and Grantlee inputs/templates
|
||||||
|
- tests directly tied to this service
|
||||||
|
|
||||||
|
The source files are already migrated. Focus on:
|
||||||
|
|
||||||
|
1. **Uncommenting** `ADD_SUBDIRECTORY(NmeaManagement)` in `Lts/Services/CMakeLists.txt`
|
||||||
|
2. **Fixing any compile errors** that surface after the service is added to the build
|
||||||
|
3. **Verifying codegen** (`nme_service.xml` → `.idl` → `.hpp`/`.cpp`) produces expected outputs
|
||||||
|
4. **Verifying Qt module links** (the executable links `Qt6::Core`, `Qt6::Network`, `svcCoreClient`, etc.)
|
||||||
|
|
||||||
|
Fix only real Qt6/C++17 build issues. No opportunistic refactoring or style cleanup.
|
||||||
|
|
||||||
|
## Qt link rules
|
||||||
|
|
||||||
|
No active target in the Qt6 tree may link Qt5 imported targets.
|
||||||
|
|
||||||
|
Search for and fix active uses of:
|
||||||
|
|
||||||
|
- `Qt5::`
|
||||||
|
- `find_package(Qt5`
|
||||||
|
- `QT5_`
|
||||||
|
- `Qt5Core`
|
||||||
|
- `Qt5Widgets`
|
||||||
|
- `Qt5Network`
|
||||||
|
|
||||||
|
Use Qt6 equivalents. Prefer central CMake helper fixes when the issue is central.
|
||||||
|
|
||||||
|
## Code generation rules
|
||||||
|
|
||||||
|
The NmeaManagement service uses the standard RTI/Grantlee codegen pipeline:
|
||||||
|
|
||||||
|
1. `CODEGEN_IDL_SVC` — generates `nme_enums.idl` and `nme.idl` from `nme_service.xml`
|
||||||
|
2. `RTIDDSGEN` — compiles `.idl` files into `.hpp`, `.cpp`, `.cxx`, `.Plugin` outputs
|
||||||
|
3. `CODEGEN_TOPIC_TYPEDEFS` — generates `nme_dt[s,c]_types.h` / `nme_ft[s,c]_types.h`
|
||||||
|
4. `CODEGEN_CLIENT_TOPICS_IFC` — generates `nme_[d|f]tc.h`
|
||||||
|
5. `CODEGEN_CLIENT_TOPICS_IMPL` — generates `nme_[d|f]tc_impl.[cpp|h]`
|
||||||
|
6. `CODEGEN_SERVER_TOPICS` — generates `nme_[d|f]ts.h`, `nme_[d|f]ts_impl.[cpp|h]`
|
||||||
|
7. `CODEGEN_DATABASE` — generates `nme_db_impl.cpp/.h`, `nme_db.h`
|
||||||
|
8. `CODEGEN_SQL` — generates `nme.sql`, `nme.xml`
|
||||||
|
9. `CREATE_TOPIC_TYPE_PLUGIN` — generates topic type plugin files
|
||||||
|
|
||||||
|
If generated files are required:
|
||||||
|
|
||||||
|
- generate into the build tree
|
||||||
|
- consume from the build tree
|
||||||
|
- list complete OUTPUT and BYPRODUCTS
|
||||||
|
- set correct DEPENDS and MAIN_DEPENDENCY where useful
|
||||||
|
- use deterministic WORKING_DIRECTORY
|
||||||
|
- use VERBATIM
|
||||||
|
- wire generated sources with target_sources
|
||||||
|
- wire generated include dirs with target_include_directories
|
||||||
|
- ensure compilation depends on generation
|
||||||
|
- ensure incremental rebuilds trigger on input/template changes
|
||||||
|
|
||||||
|
Never commit generated `.idl`, `.h`, `.hpp`, or `.cpp` outputs. Never consume generated outputs from the source tree. Never fabricate generated outputs.
|
||||||
|
|
||||||
|
## Known pitfalls from the FileManagement/FilterManagement run
|
||||||
|
|
||||||
|
Apply these rules before debugging from scratch; skipping them repeats known problems.
|
||||||
|
|
||||||
|
### rtiddsgen 7.7 generated API shape
|
||||||
|
|
||||||
|
RTI Connext 7.7 rtiddsgen with `-language C++11 -stl` generates:
|
||||||
|
|
||||||
|
- plain public data members with no getters or setters: use `data.id` and `data.id = value`, not `data.id()` or `data.id(value)`
|
||||||
|
- no `*_def::type` wrapper types: use enums directly in the service namespace
|
||||||
|
- renamed enums when the generated name collides with a framework type
|
||||||
|
- `omg::types::optional` and `omg::types::sequence` members
|
||||||
|
|
||||||
|
When a compile error looks like old getter/setter syntax ("expression cannot be used as a function") or a missing `*_def` type, read the generated header in the build tree for the real member and type names. Check every call site in the service, its handlers, and its WebSocket interfaces.
|
||||||
|
|
||||||
|
### Grantlee templates generate the service impl files
|
||||||
|
|
||||||
|
Service `*_impl.[ch]` files are generated from `Lts/Common/CodeGen/*.grantlee` templates. If the fix belongs in generated code, fix the template; codegen reruns automatically. Never hand-edit generated outputs.
|
||||||
|
|
||||||
|
### NGL_ADD_LIBRARY2 does not define the compile guard
|
||||||
|
|
||||||
|
NGL_ADD_LIBRARY defines `MAKE_<SYMBOL>_LIB` for the target; NGL_ADD_LIBRARY2 does not. A target consuming generated `*_impl.h` headers that carry an include guard fails with `#error "You are not allowed to include this file in your code!"` unless the guard is defined explicitly:
|
||||||
|
|
||||||
|
```cmake
|
||||||
|
TARGET_COMPILE_DEFINITIONS(<target> PRIVATE MAKE_<SYMBOL>_LIB)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Stub copies racing the codegen
|
||||||
|
|
||||||
|
An unconditional `CONFIGURE_FILE(... COPYONLY)` that copies a stub header to a build-dir path that codegen also writes overwrites the generated file on every cmake re-configure. Guard such copies with `IF(NOT BUILD_RTI)` or `IF(NOT BUILD_GRANTLEE)`.
|
||||||
|
|
||||||
|
### Qt6 discovery in the container takes the minimal path
|
||||||
|
|
||||||
|
`find_package(Qt6 ... COMPONENTS ...)` always fails in the validation container. The tree takes the "Found Qt6 (minimal)" path and every Qt6 component target is a manual IMPORTED target in the root CMakeLists. When a migrated service needs a Qt6 module the container does not discover (for example WebSockets):
|
||||||
|
|
||||||
|
- add the matching `qt6-<module>-dev` package to docker_build.sh
|
||||||
|
- create a manual IMPORTED target in the root CMakeLists following the existing pattern
|
||||||
|
- define the availability macro via `add_compile_definitions` when the real module is present
|
||||||
|
- link the target by name in the service CMakeLists
|
||||||
|
- gate the compile macro and the link on the same condition
|
||||||
|
|
||||||
|
Flipping a compile macro on an existing build dir leaves stale AUTOMOC caches. A clean build dir is required after flipping such macros.
|
||||||
|
|
||||||
|
### Include shadowing between the stub tree and real generated headers
|
||||||
|
|
||||||
|
An include like `<Core/core_dtc.h>` can resolve into the migration stub tree (wrong namespaces) instead of the real generated header in the build tree. Use the full path from the build-tree include root (`<DDS/Core/core_dtc.h>`), add `include_directories(BEFORE ${CMAKE_SOURCE_DIR}/Lts)` when stub trees shadow Lts headers, and verify forward declarations name the same namespace as the real header.
|
||||||
|
|
||||||
|
### Compare with the Qt5 original before inventing fixes
|
||||||
|
|
||||||
|
Several "missing field" or "unknown template" errors in the first run came from includes or members the Qt5 original had and the Qt6 copy had silently dropped. When a class fails to compile over a missing member or unknown base, diff against the Qt5 original first; restore the dropped piece rather than designing around it.
|
||||||
|
|
||||||
|
### Export-header macro names
|
||||||
|
|
||||||
|
Generated export headers uppercase the whole target name, merging adjacent word letters: target `LtsSessionData` defines `LTSSESSIONDATA_EXPORT`. When writing tests that assert export macros, derive the expected prefix from the generated header, not from visual expectation.
|
||||||
|
|
||||||
|
### Build orchestration
|
||||||
|
|
||||||
|
- docker_build.sh must keep `set -eo pipefail` in the container script
|
||||||
|
- When a migrated service adds a test executable, add it to the fixed make target list in docker_build.sh so ctest actually runs it
|
||||||
|
- build4 is root-owned and wiped by every docker_build.sh run
|
||||||
|
|
||||||
|
## Tests
|
||||||
|
|
||||||
|
For every C++ code change, add three meaningful CTest tests where feasible.
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
- tests must validate changed behavior, not only compilation
|
||||||
|
- tests must be registered with CTest
|
||||||
|
- tests must run with `BUILD_RTI=ON` and `BUILD_GRANTLEE=ON`
|
||||||
|
- do not add OFF-variant tests
|
||||||
|
- use deterministic tests without host-local paths
|
||||||
|
|
||||||
|
Preferred location:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus/tests`
|
||||||
|
|
||||||
|
Use policy-compatible names, for example:
|
||||||
|
|
||||||
|
- `test_<name>.cpp`
|
||||||
|
- `<name>_test.cpp`
|
||||||
|
- `<name>test.cpp`
|
||||||
|
- `<name>gtest.cpp`
|
||||||
|
|
||||||
|
## Docker and CI
|
||||||
|
|
||||||
|
Authoritative migration Dockerfile:
|
||||||
|
|
||||||
|
- `./app/Dockerfile`
|
||||||
|
|
||||||
|
Authoritative validation script:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus/docker_build.sh`
|
||||||
|
|
||||||
|
Do not use other Dockerfiles as task authority.
|
||||||
|
|
||||||
|
Validation container expectations:
|
||||||
|
|
||||||
|
- repository root at `/repo`, or the script's documented mount path
|
||||||
|
- external dependencies under `/repo/external`, or the script's documented equivalent
|
||||||
|
- RTI 7.7 at `/repo/external/rti_connext_dds-7.7.0`, or documented equivalent
|
||||||
|
- `./rti_license.dat` mounted read-only if RTI requires it
|
||||||
|
- no developer-local paths
|
||||||
|
|
||||||
|
Jenkins CI must be able to discover and run the new tests, or verify that docker_build.sh runs them. Inspect and minimally update only if needed:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/ci/Dockerfile.*`
|
||||||
|
- `./qt-migration-legatus/ci/check_pr_policies.py`
|
||||||
|
|
||||||
|
## Required procedure
|
||||||
|
|
||||||
|
1. Inspect repository state, branch, working tree, and forward-declaration directories.
|
||||||
|
2. Compare Qt5 source with Qt6 target for NmeaManagement. Classify files as already migrated, missing, stale, generated, or needing adaptation.
|
||||||
|
3. Identify dependencies: `svcCoreClient`, `ProjectConfig`, `LtsCommandLineParser`, `nglcoreapplication`, Qt6 modules, and any service-level interdependencies.
|
||||||
|
4. Uncomment `ADD_SUBDIRECTORY(NmeaManagement)` in parent `Lts/Services/CMakeLists.txt`.
|
||||||
|
5. Apply the smallest valid migration changes to fix compile/link errors.
|
||||||
|
6. Add required CTest tests for C++ changes (if applicable).
|
||||||
|
7. Review RTI/codegen paths for `nme_service.xml`.
|
||||||
|
8. Check regressions: Qt5 links, removed modules, LogViewer, IDL warnings.
|
||||||
|
9. Validate in Docker with `BUILD_RTI=ON` and `BUILD_GRANTLEE=ON`.
|
||||||
|
10. Run CTest in the validated build directory.
|
||||||
|
11. Check Jenkins/policy compatibility.
|
||||||
|
12. Report factual status.
|
||||||
|
|
||||||
|
Do not overwrite uncommitted user changes. If they block safe work, report the blocker.
|
||||||
|
|
||||||
|
## Required validation
|
||||||
|
|
||||||
|
From:
|
||||||
|
|
||||||
|
- `./qt-migration-legatus/qt6-after/qt6-migrated-legatus`
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
BUILD_RTI=ON BUILD_GRANTLEE=ON ./docker_build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
CTest must run as part of validation.
|
||||||
|
|
||||||
|
Expected CTest baseline: ctest exits with code 8 when tests are "Not Run". A pre-existing set of Not Run tests (for example nglcomp_test, aes/avm/exm/scm/bld suites, GrantleeParserSmoke) belongs to sibling targets outside the docker_build.sh make list; that set existed before this migration series and is not a failure. Treat only `***Failed` entries as failures. Do not widen this exception to skip or filter real failures, and do not add the missing sibling targets to fix the exit code. If a previously passing test becomes Not Run or Failed, that is a regression of this run.
|
||||||
|
|
||||||
|
If a direct clean build is useful, use:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -S /repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus -B /repo/build-rti-on-grantlee-on -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_RTI=ON -DBUILD_GRANTLEE=ON
|
||||||
|
cmake --build /repo/build-rti-on-grantlee-on --parallel
|
||||||
|
ctest --test-dir /repo/build-rti-on-grantlee-on --output-on-failure
|
||||||
|
```
|
||||||
|
|
||||||
|
Also check whether this file exists and run it only if present:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./docker-build.h
|
||||||
|
```
|
||||||
|
|
||||||
|
If it is absent or a typo, report that. Do not invent a replacement.
|
||||||
|
|
||||||
|
Do not run or validate OFF variants.
|
||||||
|
|
||||||
|
## Success criteria
|
||||||
|
|
||||||
|
Success requires:
|
||||||
|
|
||||||
|
- NmeaManagement migrated and confirmed buildable
|
||||||
|
- NmeaManagement included in the Qt6 build (uncommented in parent CMakeLists.txt)
|
||||||
|
- configure, build, and CTest pass with `BUILD_RTI=ON` and `BUILD_GRANTLEE=ON`
|
||||||
|
- docker_build.sh runs the relevant tests and fails on test failure
|
||||||
|
- Jenkins/policy discovery accepts any new tests and validation changes
|
||||||
|
- no active Qt5 imported target links remain for this service
|
||||||
|
- generated outputs are build-tree only and freshly produced when required
|
||||||
|
- no generated outputs are committed or consumed from the source tree
|
||||||
|
- no fake generated files, dummy files, mocks, placeholders, or stubbed generated outputs exist
|
||||||
|
- required stubs/forward declarations are only in allowed directories
|
||||||
|
- removed modules remain removed
|
||||||
|
- LogViewer remains preserved
|
||||||
|
- RTI/codegen and Grantlee/KTextTemplate success is real, not stale or faked
|
||||||
|
|
||||||
|
## If blocked
|
||||||
|
|
||||||
|
Do not fake success. Report:
|
||||||
|
|
||||||
|
- failing command
|
||||||
|
- key error output
|
||||||
|
- affected service
|
||||||
|
- category: project, path, merge, CMake, Qt API, codegen, Docker, RTI/license, Grantlee/KTextTemplate, test, CTest, Jenkins CI, stub relocation, or environment
|
||||||
|
- what was fixed safely
|
||||||
|
- what remains blocked
|
||||||
|
- whether stale artifacts were ruled out
|
||||||
|
- whether generated files were involved
|
||||||
|
- exact missing files, targets, or generator step
|
||||||
|
- whether tests and CTest integration succeeded
|
||||||
|
- whether Docker validation and Jenkins discovery succeeded
|
||||||
|
|
||||||
|
## Final report
|
||||||
|
|
||||||
|
Keep it short. Include:
|
||||||
|
|
||||||
|
- status: validated, partially validated, or blocked
|
||||||
|
- service migrated or already correct
|
||||||
|
- files changed
|
||||||
|
- C++ files changed
|
||||||
|
- tests added per C++ change
|
||||||
|
- CTest registration changes
|
||||||
|
- CMake and generator changes
|
||||||
|
- stub/forward-declaration moves or removals
|
||||||
|
- Docker and Jenkins CI changes
|
||||||
|
- Qt5 references removed or remaining
|
||||||
|
- confirmation that removed modules were not restored
|
||||||
|
- confirmation that LogViewer was preserved
|
||||||
|
- exact validation commands and results
|
||||||
|
- result of ./docker-build.h if present
|
||||||
|
- remaining blockers or risks
|
||||||
+163
@@ -0,0 +1,163 @@
|
|||||||
|
flmTests
|
||||||
|
flmTopicTypePlugin
|
||||||
|
svcAesClient
|
||||||
|
svcAesCommon
|
||||||
|
svcAesServer
|
||||||
|
svcAlmClient
|
||||||
|
svcAlmCommon
|
||||||
|
svcAlmServer
|
||||||
|
svcAreaEffectSimulation
|
||||||
|
svcAsmClient
|
||||||
|
svcAsmCommon
|
||||||
|
svcAsmServer
|
||||||
|
svcAssetManagement
|
||||||
|
svcAudioVideoManagement
|
||||||
|
svcAvmClient
|
||||||
|
svcAvmCommon
|
||||||
|
svcAvmServer
|
||||||
|
svcBldClient
|
||||||
|
svcBldCommon
|
||||||
|
svcBldServer
|
||||||
|
svcBuildings
|
||||||
|
svcCentralEffectSimulation
|
||||||
|
svcCesClient
|
||||||
|
svcCesCommon
|
||||||
|
svcCesDDSCommon
|
||||||
|
svcCesGeoPairingImpl
|
||||||
|
svcCesServer
|
||||||
|
svcCmoClient
|
||||||
|
svcCmoCommon
|
||||||
|
svcCmoServer
|
||||||
|
svcCnrHelper
|
||||||
|
svcCodClient
|
||||||
|
svcCodCommon
|
||||||
|
svcCodServer
|
||||||
|
svcCombatNetRadio
|
||||||
|
svcComponentMonitor
|
||||||
|
svcCoreClient
|
||||||
|
svcDifferentialGPS
|
||||||
|
svcEemClient
|
||||||
|
svcEemCommon
|
||||||
|
svcEemServer
|
||||||
|
svcEffectShowClient
|
||||||
|
svcEscClient
|
||||||
|
svcEscCommon
|
||||||
|
svcEscServer
|
||||||
|
svcEsmClient
|
||||||
|
svcEsmCommon
|
||||||
|
svcEsmServer
|
||||||
|
svcEvlClient
|
||||||
|
svcEvlCommon
|
||||||
|
svcEvlServer
|
||||||
|
svcExerciseEventManagement
|
||||||
|
svcExerciseManagement
|
||||||
|
svcExmClient
|
||||||
|
svcExmCommon
|
||||||
|
svcExmServer
|
||||||
|
svcFileManagement
|
||||||
|
svcFilterManagement
|
||||||
|
svcFlmClient
|
||||||
|
svcFlmCommon
|
||||||
|
svcFlmServer
|
||||||
|
svcFltClient
|
||||||
|
svcFltCommon
|
||||||
|
svcFltServer
|
||||||
|
svcGimClient
|
||||||
|
svcGimCommon
|
||||||
|
svcGimServer
|
||||||
|
svcGmpServer
|
||||||
|
svcGnaClient
|
||||||
|
svcGnaCommon
|
||||||
|
svcGnaServer
|
||||||
|
svcGuezIedManagement
|
||||||
|
svcInfrastructureManagement
|
||||||
|
svcIsmClient
|
||||||
|
svcIsmCommon
|
||||||
|
svcIsmServer
|
||||||
|
svcMapDummy
|
||||||
|
svcMdmClient
|
||||||
|
svcMdmCommon
|
||||||
|
svcMdmServer
|
||||||
|
svcMessaging
|
||||||
|
svcMeteoDataManagement
|
||||||
|
svcMrkClient
|
||||||
|
svcMrkCommon
|
||||||
|
svcMrkServer
|
||||||
|
svcMsgClient
|
||||||
|
svcMsgCommon
|
||||||
|
svcMsgServer
|
||||||
|
svcNomClient
|
||||||
|
svcNomCommon
|
||||||
|
svcNomServer
|
||||||
|
svcNotificationManagement
|
||||||
|
svcObdClient
|
||||||
|
svcObdCommon
|
||||||
|
svcObdServer
|
||||||
|
svcOcBaseDownload
|
||||||
|
svcOcSituationClient
|
||||||
|
svcOcSituationServer
|
||||||
|
svcOperatorManagement
|
||||||
|
svcOpmClient
|
||||||
|
svcOpmCommon
|
||||||
|
svcOpmServer
|
||||||
|
svcOreDummy
|
||||||
|
svcOscClient
|
||||||
|
svcOscCommon
|
||||||
|
svcOscServer
|
||||||
|
svcOssClient
|
||||||
|
svcOssCommon
|
||||||
|
svcOssServer
|
||||||
|
svcParticipantManagement
|
||||||
|
svcPdmClient
|
||||||
|
svcPdmCommon
|
||||||
|
svcPdmServer
|
||||||
|
svcPedDummy
|
||||||
|
svcPpmClient
|
||||||
|
svcPpmCommon
|
||||||
|
svcPpmServer
|
||||||
|
svcPreClient
|
||||||
|
svcPreCommon
|
||||||
|
svcPreServer
|
||||||
|
svcProjectDataManagement
|
||||||
|
svcPwsCommon
|
||||||
|
svcRecCommon
|
||||||
|
svcRecordingManagement
|
||||||
|
svcRepClient
|
||||||
|
svcRepCommon
|
||||||
|
svcRepCommonExecutable
|
||||||
|
svcRepServer
|
||||||
|
svcReportAnalyzer
|
||||||
|
svcReportGenerator
|
||||||
|
svcScmClient
|
||||||
|
svcScmCommon
|
||||||
|
svcScmServer
|
||||||
|
svcScrDummy
|
||||||
|
svcServiceManagement
|
||||||
|
svcSituationReplay
|
||||||
|
svcSmoDummy
|
||||||
|
svcSomClient
|
||||||
|
svcSomCommon
|
||||||
|
svcSomServer
|
||||||
|
svcSoundManagement
|
||||||
|
svcSrmCommon
|
||||||
|
svcSrpClient
|
||||||
|
svcSrpCommon
|
||||||
|
svcSrpServer
|
||||||
|
svcTabClient
|
||||||
|
svcTabCommon
|
||||||
|
svcTabServer
|
||||||
|
svcTabocClient
|
||||||
|
svcTabocCommon
|
||||||
|
svcTabocServer
|
||||||
|
svcTargetManagement
|
||||||
|
svcTgtClient
|
||||||
|
svcTgtCommon
|
||||||
|
svcTgtServer
|
||||||
|
svcTrainingAreaBase
|
||||||
|
svcTrainingAreaBaseOC
|
||||||
|
svcVideoOverlayManagement
|
||||||
|
svcWarehouseGuez
|
||||||
|
svcWarehouseManagement
|
||||||
|
svcWhgClient
|
||||||
|
svcWhgCommon
|
||||||
|
svcWhgServer
|
||||||
Reference in new issue
Block a user