This commit is contained in:
1 file changed
+159
@@ -0,0 +1,159 @@
|
||||
# GitHub Copilot Instructions: Strict Migration Task for `Lts/DDS`
|
||||
|
||||
Migrate only:
|
||||
|
||||
- `./qt-migration-legatus/qt5-before/qt5-legatus-legacy/Lts/DDS`
|
||||
- to `./qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/DDS`
|
||||
|
||||
## Execute
|
||||
- Work autonomously.
|
||||
- Do not stop after editing.
|
||||
- Continue through analysis, fixes, Docker validation, and final reporting.
|
||||
- Do not ask for confirmation unless the task is impossible, destructive, or source material is missing.
|
||||
|
||||
## Do Not Overreach
|
||||
- Do not modify the legacy tree.
|
||||
- Do not migrate sibling modules.
|
||||
- Touch other files only if `Lts/DDS` cannot be configured, generated, compiled, linked, or validated without a minimal directly related fix.
|
||||
- No cleanup, no opportunistic refactors, no unrelated modernization.
|
||||
|
||||
## Main Objective
|
||||
Make `Lts/DDS` correctly integrated in the Qt6 build with deterministic RTI/codegen behavior.
|
||||
|
||||
## Mandatory Technical Checks
|
||||
Verify and fix if needed:
|
||||
|
||||
- Qt5 -> Qt6 API compatibility in touched code
|
||||
- C++17 compatibility in touched code
|
||||
- local and parent `CMakeLists.txt`
|
||||
- target inclusion
|
||||
- include paths
|
||||
- generated source/header registration
|
||||
- RTI/codegen/KTextTemplate wiring
|
||||
- generation-to-compilation dependency order
|
||||
- build-tree output placement
|
||||
- incremental rebuild triggers
|
||||
|
||||
## RTI / Codegen Rules
|
||||
If `Lts/DDS` depends on generated files:
|
||||
|
||||
- reconstruct the legacy generation flow
|
||||
- verify the Qt6 port preserves that flow
|
||||
- ensure required generated `.h` / `.cpp` are produced automatically
|
||||
- ensure they exist before consuming target compilation starts
|
||||
- ensure generated `.cpp` are added to targets
|
||||
- ensure generated headers are reachable through include paths
|
||||
- ensure no stale source-tree or developer-local generated artifacts are required
|
||||
|
||||
Inspect and fix if needed:
|
||||
|
||||
- `add_custom_command(OUTPUT ...)`
|
||||
- `BYPRODUCTS`
|
||||
- `DEPENDS`
|
||||
- `MAIN_DEPENDENCY`
|
||||
- `WORKING_DIRECTORY`
|
||||
- `COMMAND`
|
||||
- `VERBATIM`
|
||||
- `target_sources(...)`
|
||||
- `add_dependencies(...)`
|
||||
- `GENERATED`
|
||||
|
||||
Prefer build-tree outputs such as `${CMAKE_CURRENT_BINARY_DIR}` unless the repository clearly requires otherwise.
|
||||
|
||||
## No Stub / No Placeholder Rule for Missing Codegen Outputs
|
||||
Do **not** create stub, dummy, placeholder, mock-generated, hand-written replacement, or minimally compilable substitute files for missing generated `.h` or `.cpp` outputs.
|
||||
|
||||
If required generated files are missing and cannot be produced by the real build-integrated generator flow, then:
|
||||
- do not fabricate replacement files
|
||||
- do not bypass the dependency by removing or weakening the integration
|
||||
- do not claim build validation success
|
||||
- report the exact missing files
|
||||
- report the exact blocked generator step and root cause
|
||||
- stop after applying only safe, reviewable fixes that do not simulate success
|
||||
|
||||
Any build that depends on invented stand-in files instead of real code-generated outputs must be reported as **not validated**.
|
||||
|
||||
## Hard Validation Rule for `BUILD_RTI=ON`
|
||||
Do not declare `BUILD_RTI=ON` successful unless all of the following are proven:
|
||||
|
||||
- the build ran inside Docker
|
||||
- old generated artifacts relevant to `Lts/DDS` were removed, invalidated, or proven irrelevant
|
||||
- the generator actually ran during the Docker build if required
|
||||
- new generated files were created in the current build
|
||||
- consuming targets compiled against those newly generated files
|
||||
- success did not depend on stale source-tree outputs, cached build outputs, or developer-local artifacts
|
||||
|
||||
If not proven, report `BUILD_RTI=ON` as **not fully validated**.
|
||||
|
||||
Before final validation, remove or invalidate any pre-existing generated artifacts relevant to `Lts/DDS` and prove regeneration happens from the build itself.
|
||||
|
||||
## Docker Authority
|
||||
There are many Dockerfiles in the repo. For this task, only this one is authoritative:
|
||||
|
||||
- `./app/Dockerfile`
|
||||
|
||||
## Container Mount Rules
|
||||
Use repository root mounted as:
|
||||
|
||||
- `/repo`
|
||||
|
||||
Required availability inside the container:
|
||||
|
||||
- repo root at `/repo`
|
||||
- external dependencies at `/repo/external`
|
||||
- RTI 7.7 at `/repo/external/rti_connext_dds-7.7.0`
|
||||
- license file from `./rti_license.dat`, mapped read-only
|
||||
|
||||
If RTI requires environment variables or explicit license-path configuration, set them minimally and explicitly.
|
||||
|
||||
## Required Validation
|
||||
Validate in Docker. If supported, validate both:
|
||||
|
||||
- `BUILD_RTI=ON`
|
||||
- `BUILD_RTI=OFF`
|
||||
|
||||
For each relevant variant:
|
||||
1. configure
|
||||
2. build
|
||||
3. verify generation
|
||||
4. run tests if relevant
|
||||
5. report result
|
||||
|
||||
Also verify:
|
||||
- clean build from empty build directory
|
||||
- incremental rebuild after changing a generator input/template/dependency
|
||||
- non-RTI build does not require RTI/license if RTI is optional
|
||||
|
||||
## Start From
|
||||
Use `/repo`-based paths. Adapt only if repository inspection proves it is required.
|
||||
|
||||
- `cmake -S /repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus -B /repo/build -G Ninja -DCMAKE_BUILD_TYPE=Debug`
|
||||
- `cmake --build /repo/build --parallel`
|
||||
- `ctest --test-dir /repo/build --output-on-failure`
|
||||
|
||||
Add explicit `BUILD_RTI=ON` / `BUILD_RTI=OFF` configure flags if supported.
|
||||
|
||||
## If Tools Are Missing
|
||||
- identify the exact missing dependency
|
||||
- update only what is minimally required for the migration build
|
||||
- rerun validation
|
||||
|
||||
## Final Response
|
||||
Report only the essentials:
|
||||
|
||||
- validated or blocked
|
||||
- whether RTI/codegen/KTextTemplate was involved
|
||||
- whether generation timing was correct
|
||||
- whether output placement was correct
|
||||
- whether `BUILD_RTI=ON` succeeded
|
||||
- whether `BUILD_RTI=OFF` succeeded
|
||||
- whether `/repo/external/rti_connext_dds-7.7.0` worked
|
||||
- whether `./rti_license.dat` mapping worked
|
||||
- exact Docker commands used
|
||||
- files changed
|
||||
- each failure with:
|
||||
- command
|
||||
- key error
|
||||
- environment vs project
|
||||
- fix
|
||||
- remaining blocker/risk
|
||||
Reference in new issue
Block a user