-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix enum and type resolution #309
Open
Mingun
wants to merge
12
commits into
kaitai-io:master
Choose a base branch
from
Mingun:fix-type-resolution
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The same names makes it difficult to recognize where which function is used even with help from IDE Also make some functions private to not pollute public namespace. The other methods will be tested so cannot be made private because it creates difficulties to test them
…ssage is a type name Especially when the type name is something very generic, like 'test'
Error text does not checked yet, because it will be changed and even those tests which passed now, would fail due to that Failures (12): [info] ClassTypeProvider$Test: [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:287) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:324) [info] - doesn't resolve 'two::one' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:336) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:361) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:398) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:435) [info] - doesn't resolve 'two::one' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:447) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:472) [info] - doesn't resolve 'two::one' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:484) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:509) [info] - doesn't resolve 'one::two' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:546) [info] - doesn't resolve 'two::one' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.TypeNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:558)
Error text does not checked yet, because it will be changed and even those tests which passed now, would fail due to that Failures (6): [info] ClassTypeProvider$Test: [info] - doesn't resolve 'one::e' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.EnumNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:690) [info] - doesn't resolve 'one::e' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.EnumNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:740) [info] - doesn't resolve 'one::e' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.EnumNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:765) [info] - doesn't resolve 'one::e' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.EnumNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:790) [info] - doesn't resolve 'one::e' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.EnumNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:815) [info] - doesn't resolve 'one::e' *** FAILED *** [info] Expected exception io.kaitai.struct.precompile.EnumNotFoundError to be thrown, but no exception was thrown (ClassTypeProvider$Test.scala:840)
This commit also unify enum resolution in expression language and in `enum` keys Fixes kaitai-io/kaitai_struct#1028
This commit also unify type resolution in expression language and in `type` keys Fixes kaitai-io/kaitai_struct#786
It not so big and this unifies handling of types and enums
Mingun
force-pushed
the
fix-type-resolution
branch
from
October 4, 2024 17:23
6efa01a
to
3e68dcc
Compare
Mingun
added a commit
to Mingun/kaitai_struct_tests
that referenced
this pull request
Oct 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
type
/enum
keys and expression language