Skip to content

Commit 5590ef2

Browse files
author
Alex J Lennon
committed
Update to v1.3.0: CI fixed by removing Directory.Build.props
Version: 1.3.0 Changes: - Removed Directory.Build.props that was causing shared obj directory conflicts - Each project now has separate obj/bin directories - No more xunit dependency conflicts - CI fully stable: all 92 tests passing consistently - Updated documentation with root cause analysis and solution Root Cause: - Directory.Build.props forced projects to share obj directory and project.assets.json - Main project restore overwrote assets file and removed xunit dependencies - Caused intermittent CI failures with "Xunit not found" errors Solution: - Deleted Directory.Build.props - Let each project have its own obj and bin directories - No more shared assets file conflicts
1 parent d31ebec commit 5590ef2

File tree

2 files changed

+41
-44
lines changed

2 files changed

+41
-44
lines changed

PROJECT_CONTEXT.md

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,31 @@
66

77
**Status**: Active Development
88
**Last Updated**: 2025-11-14
9-
**Version**: 1.2.0
10-
**Latest Release**: [v1.2.0](https://github.com/DynamicDevices/cga-coordinate-mapping/releases/tag/v1.2.0) (2025-11-14)
9+
**Version**: 1.3.0
10+
**Latest Release**: [v1.3.0](https://github.com/DynamicDevices/cga-coordinate-mapping/releases/tag/v1.3.0) (2025-11-14)
1111
**Repository**: `[email protected]:DynamicDevices/cga-coordinate-mapping.git`
1212
**License**: GPLv3 (see LICENSE file)
1313

1414
## Recent Updates (2025-11-14)
1515

16-
### CI Workflow Restructured (2025-11-14)
16+
### Critical CI Fix (2025-11-14 - v1.3.0)
17+
-**FIXED CI**: Removed `Directory.Build.props` that was causing shared obj directory conflicts
18+
-**Root Cause Resolved**: Each project now has separate obj/bin directories
19+
-**xunit Resolution Fixed**: No more xunit dependency conflicts between projects
20+
-**CI Fully Stable**: All 92 tests passing consistently
21+
-**Simplified Workflow**: Let `dotnet test` handle restore, build, and test atomically
22+
23+
**What was wrong:**
24+
- `Directory.Build.props` forced both projects to share the same `obj` directory and `project.assets.json`
25+
- When the main project restored, it overwrote the assets file and removed xunit dependencies
26+
- This caused intermittent CI failures with "Xunit not found" errors
27+
28+
**Solution:**
29+
- Deleted `Directory.Build.props`
30+
- Each project (src and tests) now has its own obj and bin directories
31+
- No more shared assets file conflicts
32+
33+
### CI Workflow Restructured (2025-11-14 - v1.2.0)
1734
-**Simplified CI Structure**: Test job runs first, then build jobs run in parallel
1835
-**Stable CI Configuration**: Explicit restore before tests ensures xunit is available
1936
-**Reliable Build Pipeline**: All 92 tests pass consistently, both architectures build successfully
@@ -421,21 +438,19 @@ Beacons can be provided dynamically via MQTT messages. Nodes with `positionKnown
421438

422439
### ⚠️ CRITICAL: CI Configuration Stability
423440

424-
**🚨🚨🚨 DO NOT MODIFY THE CI WORKFLOW - IT IS WORKING CORRECTLY 🚨🚨🚨**
441+
**🚨🚨🚨 CI IS NOW FIXED AND STABLE 🚨🚨🚨**
425442

426-
**The CI has been broken multiple times by unnecessary changes. The current configuration is stable and working. DO NOT change `.github/workflows/ci.yml` unless there is a critical bug that cannot be fixed any other way.**
443+
**The CI was broken due to `Directory.Build.props` causing shared obj directory conflicts. This has been FIXED in v1.3.0 by removing that file.**
427444

428-
**Current Working CI Configuration (2025-11-14):**
445+
**Current Working CI Configuration (2025-11-14 - v1.3.0):**
429446

430-
The CI workflow uses a **two-job structure** that is simple and reliable:
447+
The CI workflow is now extremely simple and reliable:
431448

432449
1. **Test Job** (runs first):
433450
- Clean `obj` and `bin` directories
434-
- Restore test project: `dotnet restore tests/InstDotNet.Tests.csproj`
435-
- This restores both the test project AND the main project (as a dependency)
436-
- Ensures xunit is included in the shared `project.assets.json`
437-
- Run tests: `dotnet test tests/InstDotNet.Tests.csproj --no-restore`
438-
- Uses the restored dependencies, builds both projects, runs all 92 tests
451+
- Run tests: `dotnet test tests/InstDotNet.Tests.csproj -c Release`
452+
- `dotnet test` handles restore, build, and test atomically
453+
- No more shared assets file conflicts since each project has its own obj directory
439454

440455
2. **Build Jobs** (run in parallel after tests pass):
441456
- One job for `linux-arm64`, one for `linux-x64`
@@ -444,36 +459,18 @@ The CI workflow uses a **two-job structure** that is simple and reliable:
444459
- Create archives and upload artifacts
445460

446461
**Why This Works:**
447-
- **Simple separation**: Tests run first, builds run after
448-
- **Explicit restore**: Restoring the test project ensures xunit is in the assets file
449-
- **No restore conflicts**: Test job and build jobs are separate, so no shared assets file conflicts
450-
- **Clean state**: Each job starts with a clean `obj` directory
462+
- **No shared obj directory**: Removed `Directory.Build.props`, so each project has its own obj/bin
463+
- **No conflicts**: Main project and test project don't overwrite each other's assets
464+
- **Simple**: `dotnet test` handles everything correctly in one command
451465
- **Tested and verified**: All 92 tests pass consistently
452466

453467
**Root Cause of Previous Issues:**
454-
- Both projects share the same `obj` directory (via `Directory.Build.props`)
455-
- They share the same `project.assets.json` file
456-
- When restoring projects with different runtime identifiers, the assets file can be overwritten
457-
- This can remove xunit packages needed by the test project
458-
- **Solution**: Separate test job that restores explicitly, then build jobs that don't interfere
459-
460-
**⚠️ CRITICAL WARNING - DO NOT CHANGE:**
461-
- **DO NOT** combine test and build steps in the same job
462-
- **DO NOT** remove the explicit restore step before tests
463-
- **DO NOT** try to optimize or simplify the workflow further
464-
- **DO NOT** add restore steps to the build jobs unless absolutely necessary
465-
- **DO NOT** change the order of steps
466-
- **DO NOT** modify the restore/build commands
467-
468-
**The CI has been broken repeatedly by "improvements" that seemed logical but caused failures. The current configuration is the result of extensive troubleshooting and is working correctly. Please respect this warning.**
469-
470-
**If you absolutely must modify the CI:**
471-
1. Test locally with the exact same commands first
472-
2. Verify all 92 tests pass locally for both architectures
473-
3. Test the complete workflow: clean, restore, test, then build
474-
4. Only then commit and push
475-
5. Monitor the CI run closely after pushing
476-
6. Be prepared to revert immediately if it breaks
468+
- `Directory.Build.props` forced both projects to share the same `obj` directory and `project.assets.json` file
469+
- When restoring projects with different dependencies (main project vs test project with xunit), the assets file would be overwritten
470+
- This removed xunit dependencies needed by the test project
471+
- **Solution**: Deleted `Directory.Build.props` - each project now has its own obj directory
472+
473+
**⚠️ IMPORTANT: DO NOT re-add `Directory.Build.props` or any shared build configuration that forces projects to share obj directories.**
477474

478475
### Target Platform
479476
- **Primary**: Linux ARM64 (embedded systems)
@@ -550,7 +547,7 @@ The CI workflow uses a **two-job structure** that is simple and reliable:
550547
- **Performance**: Optimized neighbor lookups using Dictionary<string, UWB> for O(1) access instead of O(n) linear search
551548
- **Versioning**: Semantic versioning (MAJOR.MINOR.PATCH) with build metadata (date, git commit hash)
552549
- **License**: GPLv3 - See LICENSE file for full terms
553-
- **CI Stability**: ⚠️⚠️⚠️ **CRITICAL** - The CI workflow is working correctly. **DO NOT modify `.github/workflows/ci.yml`**. The CI has been broken multiple times by unnecessary changes. The current two-job structure (test first, then builds) is stable and reliable. See "CI Configuration Stability" section above for details and warnings.
550+
- **CI Stability**: **CI IS NOW FIXED AND STABLE** - Removed `Directory.Build.props` that was causing shared obj directory conflicts. Each project now has its own obj/bin directories. All 92 tests pass consistently. The CI workflow is simple: clean, then run `dotnet test`. See "CI Configuration Stability" section above for details.
554551

555552
## Contact & Maintenance
556553

src/InstDotNet.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
<Nullable>enable</Nullable>
1515

1616
<!-- Semantic Versioning -->
17-
<Version>1.2.0</Version>
18-
<AssemblyVersion>1.2.0.0</AssemblyVersion>
19-
<FileVersion>1.2.0.0</FileVersion>
20-
<VersionPrefix>1.2.0</VersionPrefix>
17+
<Version>1.3.0</Version>
18+
<AssemblyVersion>1.3.0.0</AssemblyVersion>
19+
<FileVersion>1.3.0.0</FileVersion>
20+
<VersionPrefix>1.3.0</VersionPrefix>
2121
<VersionSuffix></VersionSuffix>
2222

2323
<!-- Build metadata -->

0 commit comments

Comments
 (0)