Skip to content

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Oct 25, 2025

The Symbol.ranges attribute in kconfiglib returns 4-tuples (low, high, cond, loc), but menuconfig and guiconfig were using the old 3-tuple unpacking pattern, causing ValueError when processing integer/hex symbols with range properties.

Changes:

  • Update all sym.ranges unpacking to handle 4-tuple format
  • Use underscore (_) for unused location parameter to indicate intent
  • Standardize on sym.orig_type instead of sym.type for consistency with kconfiglib internals and to avoid potential issues with type transformations

Summary by cubic

Fix crashes in menuconfig and guiconfig when handling INT/HEX symbol ranges by aligning with kconfiglib’s current API. Users can now enter values without ValueError.

  • Bug Fixes
    • Unpack sym.ranges as (low, high, cond, _) to match the 4-tuple format and prevent ValueError.
    • Use sym.orig_type for INT/HEX validation and range display to stay consistent with kconfiglib.

The Symbol.ranges attribute in kconfiglib returns 4-tuples (low, high,
cond, loc), but menuconfig and guiconfig were using the old 3-tuple
unpacking pattern, causing ValueError when processing integer/hex symbols
with range properties.

Changes:
- Update all sym.ranges unpacking to handle 4-tuple format
- Use underscore (_) for unused location parameter to indicate intent
- Standardize on sym.orig_type instead of sym.type for consistency with
  kconfiglib internals and to avoid potential issues with type transformations
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@jserv jserv merged commit da6ffc3 into main Oct 25, 2025
10 checks passed
@jserv jserv deleted the fix-range branch October 25, 2025 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants