Skip to content
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

KSC warnings are perceived as errors #102

Closed
KOLANICH opened this issue Apr 26, 2021 · 8 comments
Closed

KSC warnings are perceived as errors #102

KOLANICH opened this issue Apr 26, 2021 · 8 comments
Labels
core plugin Related to one of the core plugins integration
Milestone

Comments

@KOLANICH
Copy link
Contributor

Such unneeded and undisableable warnings as violations of the badly-designed style guide.

@hello-adam
Copy link
Member

Are you talking about the kaitai plugin naively printing ksc output? What style guide are you referring to?

@KOLANICH
Copy link
Contributor Author

Latest (nightly) versions of KSC contain a built-in linter that emits warnings when a creator of a spec has violated the style guide.

@hello-adam
Copy link
Member

Ah, ok, you're saying that if there's stderr output from KSC, the hobbits plugin should not bomb out (it should wait to see if there is a generated ".py" parser file.)

@hello-adam hello-adam added core plugin Related to one of the core plugins integration labels Apr 30, 2021
@hello-adam hello-adam added this to the 1.0 milestone Apr 30, 2021
@KOLANICH
Copy link
Contributor Author

KOLANICH commented May 1, 2021

Why not to use the information in structured JSON form? In CLI backend for kaitaiStructCompile I use that, works fine.

@hello-adam
Copy link
Member

can you give an example of the --ksc-json-output JSON output that has the warning in a section that will be distinct from errors? Maybe also an example of how failure condition errors will look?

@KOLANICH
Copy link
Contributor Author

KOLANICH commented May 18, 2021

Currently it doesn't emit any warnings into JSON repr at all.
Errors look like:

{"./lto.ksy": {"errors": [{"file": "./lto.ksy","path": ["seq","8"],"message": "string type, but no encoding found"}]}}

@hello-adam
Copy link
Member

let me know if b2fafbf solves this for you. I was able to test with error and non-error conditions, but I don't have a nightly build of ksc to test the warning situation (also, I'm not sure how robust my parsing of the errors is...)

@KOLANICH
Copy link
Contributor Author

Yeah, that works. I had to rebase it over master though because devel is still broken - it doesn't detect plugins properly.

hello-adam pushed a commit that referenced this issue May 21, 2021
# [0.48.0](v0.47.0...v0.48.0) (2021-05-21)

### Bug Fixes

* [plugin] json error parsing for  kaitai compilers ([#102](#102)) ([b2fafbf](b2fafbf))
* correctly load config in standalone builds ([8e5e97e](8e5e97e))
* correctly register Range and RangeHighlight meta types ([bb90767](bb90767))
* correctly resize BitArrays when setBytes is called ([5611e18](5611e18))
* prevent potential QFutureWatcher race conditions ([d5a72d8](d5a72d8))

### Features

* add basic "What's This?" help for plugin widgets ([#63](#63)) ([7c3bec2](7c3bec2))
* arbitrary view splitting and full view persistence for [#100](#100) ([6e665a6](6e665a6))
goldest-star added a commit to goldest-star/binary-analysis-tool that referenced this issue Jun 4, 2023
# [0.48.0](Mahlet-Inc/hobbits@v0.47.0...v0.48.0) (2021-05-21)

### Bug Fixes

* [plugin] json error parsing for  kaitai compilers ([#102](Mahlet-Inc/hobbits#102)) ([b2fafbf](Mahlet-Inc/hobbits@b2fafbf))
* correctly load config in standalone builds ([8e5e97e](Mahlet-Inc/hobbits@8e5e97e))
* correctly register Range and RangeHighlight meta types ([bb90767](Mahlet-Inc/hobbits@bb90767))
* correctly resize BitArrays when setBytes is called ([5611e18](Mahlet-Inc/hobbits@5611e18))
* prevent potential QFutureWatcher race conditions ([d5a72d8](Mahlet-Inc/hobbits@d5a72d8))

### Features

* add basic "What's This?" help for plugin widgets ([#63](Mahlet-Inc/hobbits#63)) ([7c3bec2](Mahlet-Inc/hobbits@7c3bec2))
* arbitrary view splitting and full view persistence for [#100](Mahlet-Inc/hobbits#100) ([6e665a6](Mahlet-Inc/hobbits@6e665a6))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core plugin Related to one of the core plugins integration
Projects
None yet
Development

No branches or pull requests

2 participants