CHORUS-REQ-001: Fix Critical Compilation Error in hypercore.go #1

Closed
opened 2025-09-21 06:12:23 +00:00 by tony · 2 comments
Owner

Problem

Critical compilation error blocking CHORUS build due to duplicate type cases in hypercore.go.

Location

File: internal/logging/hypercore.go
Lines: 376-386

Error Details

internal/logging/hypercore.go:378:7: duplicate case map[string]any in type switch
	internal/logging/hypercore.go:376:7: previous case
internal/logging/hypercore.go:386:7: duplicate case []any in type switch
	internal/logging/hypercore.go:384:7: previous case

Root Cause

The cloneLogValue function has duplicate type cases:

  • map[string]interface{} and map[string]any (same type, different syntax)
  • []interface{} and []any (same type, different syntax)

In Go 1.18+, interface{} and any are identical types.

Required Fix

  1. Remove duplicate cases OR merge the logic
  2. Choose either any or interface{} consistently
  3. Test compilation after fix

Priority

Critical - Blocks all CHORUS development until resolved

Requirement Traceability

@goal: CHORUS-REQ-001 - Basic compilation and build functionality

Acceptance Criteria

  • CHORUS project compiles without errors
  • No duplicate type cases in switch statements
  • Consistent type usage throughout logging module
## Problem Critical compilation error blocking CHORUS build due to duplicate type cases in hypercore.go. ## Location **File:** `internal/logging/hypercore.go` **Lines:** 376-386 ## Error Details ``` internal/logging/hypercore.go:378:7: duplicate case map[string]any in type switch internal/logging/hypercore.go:376:7: previous case internal/logging/hypercore.go:386:7: duplicate case []any in type switch internal/logging/hypercore.go:384:7: previous case ``` ## Root Cause The `cloneLogValue` function has duplicate type cases: - `map[string]interface{}` and `map[string]any` (same type, different syntax) - `[]interface{}` and `[]any` (same type, different syntax) In Go 1.18+, `interface{}` and `any` are identical types. ## Required Fix 1. Remove duplicate cases OR merge the logic 2. Choose either `any` or `interface{}` consistently 3. Test compilation after fix ## Priority **Critical** - Blocks all CHORUS development until resolved ## Requirement Traceability @goal: CHORUS-REQ-001 - Basic compilation and build functionality ## Acceptance Criteria - [ ] CHORUS project compiles without errors - [ ] No duplicate type cases in switch statements - [ ] Consistent type usage throughout logging module
tony added the
bzzz-task
label 2025-09-21 06:32:37 +00:00
Author
Owner

Assigned to: Claude AI Assistant

Status: Starting implementation

Plan:

  1. Fix duplicate type cases in internal/logging/hypercore.go:376-386
  2. Remove either interface{} or any type cases (will use any for Go 1.18+ consistency)
  3. Test compilation
  4. Create pull request

ETA: Immediate implementation

**Assigned to**: Claude AI Assistant **Status**: Starting implementation **Plan**: 1. Fix duplicate type cases in `internal/logging/hypercore.go:376-386` 2. Remove either `interface{}` or `any` type cases (will use `any` for Go 1.18+ consistency) 3. Test compilation 4. Create pull request **ETA**: Immediate implementation
Author
Owner

Implementation Complete

Status: Fixed and ready for review

Changes Made:

  • Fixed duplicate type cases in cloneLogValue function
  • Standardized on any type for Go 1.18+ consistency
  • Added proper type conversion for cloneLogMap compatibility
  • Included @goal: CHORUS-REQ-001 requirement traceability

Testing: Compilation passes without errors

Pull Request: #4 - Ready for review and merge
URL: #4

Impact: CHORUS development is no longer blocked - compilation works correctly

Next Steps: Pull request review and merge to close this issue

✅ **Implementation Complete** **Status**: Fixed and ready for review **Changes Made**: - Fixed duplicate type cases in `cloneLogValue` function - Standardized on `any` type for Go 1.18+ consistency - Added proper type conversion for `cloneLogMap` compatibility - Included `@goal: CHORUS-REQ-001` requirement traceability **Testing**: ✅ Compilation passes without errors **Pull Request**: #4 - Ready for review and merge **URL**: https://gitea.chorus.services/tony/CHORUS/pulls/4 **Impact**: CHORUS development is no longer blocked - compilation works correctly **Next Steps**: Pull request review and merge to close this issue
tony closed this issue 2025-09-21 07:38:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tony/CHORUS#1
No description provided.