Skip to content

Conversation

@Schamper
Copy link
Member

This fixes TypeError: Dynamic size errors that may show up in debugging sessions or in IPython.

Also refined the void type a little more as a result of these changes.

@codecov
Copy link

codecov bot commented Apr 29, 2025

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.24%. Comparing base (610ae67) to head (35c5e0c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/cstruct/types/void.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #121      +/-   ##
==========================================
- Coverage   92.29%   92.24%   -0.05%     
==========================================
  Files          21       21              
  Lines        2465     2477      +12     
==========================================
+ Hits         2275     2285      +10     
- Misses        190      192       +2     
Flag Coverage Δ
unittests 92.24% <95.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Horofic Horofic self-assigned this May 6, 2025
@Horofic Horofic requested review from Horofic and Copilot May 6, 2025 14:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes dynamic size errors for MetaType by refining the void type behavior and its associated array handling. Key changes include updates to void type tests, the introduction of a dedicated VoidArray class, and adjustments to the compiler to account for both Void and VoidArray types.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_types_void.py Updated tests to reflect the revised truthiness and default behavior of void types and arrays.
tests/test_types_base.py Added tests for truthy behavior on both static and dynamic uint32 types.
dissect/cstruct/types/void.py Introduced VoidArray and updated Void type methods/annotations.
dissect/cstruct/types/base.py Added bool implementation on type classes to always be truthy.
dissect/cstruct/types/init.py Exported the new VoidArray in the package API.
dissect/cstruct/compiler.py Adjusted the void type filtering to include VoidArray.

twiggler
twiggler previously approved these changes May 6, 2025
@Schamper Schamper merged commit e990b53 into main May 7, 2025
23 of 24 checks passed
@Schamper Schamper deleted the fix-dynamic-size-error branch May 7, 2025 08:42
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.

5 participants