Rules and their meaning such as implicit-type-union #775
Replies: 1 comment 3 replies
-
Hey @jonaslagoni, thanks for reaching out. To explain what's going on, JSON BinPack will apply a series of transformation rules to schemas to normalize them (we call it "canonicalizing") into a representation that makes them simpler for static analysis. One of the many (https://github.com/sourcemeta/jsonbinpack/tree/main/src/compiler/canonicalizer_rules) rules we run is the These canonicalization rules are meant to be internal and not part of the interface, thus they are not documented but you are definitely hitting a bug where the rules don't seem to agree with each other. Can you show me the schema that fails? I can probably find the root cause, but better error messages would be great for sure 😅 In any case, as you pointed out, the project is very much still in progress. I believe you are using the old, archived JavaScript PoC I presented along with my dissertation (https://github.com/jviotti/jsonbinpack-poc), while the new production-ready one is taking place here. That said, I'd still love to check if the issue is present on the new implementation. This one is C++, but compiles well to WebAssembly (though we don't provide an NPM package yet!) The main puzzle piece to complete this project is a JSON Schema compiler that preprocesses JSON Schema into a simpler representation that can be more efficiently evaluated on embedded devices to support various applicators. All of that work is happening right now on https://github.com/sourcemeta/jsontoolkit. For example: sourcemeta/jsontoolkit#600. Can you remind me what you used JSON BinPack for right now? I'd love to check what's missing for you out of this repo and hopefully prioritize that + a nice NPM package to use it. |
Beta Was this translation helpful? Give feedback.
-
I am encountering rule violations such as
implicit-type-union
but when encountering them (I assume this applies for all rules) they don't say anything about what and where the problem lies.I assume it might have something to do with the current status and missing features https://jsonbinpack.sourcemeta.com/api/ 🤔
Example stack trace:
So my question is, what do the rules mean (especially
implicit-type-union
) and is there a way to see where the problem lies?Beta Was this translation helpful? Give feedback.
All reactions