Stranger6667/jsonschema-rs

Allow compiling only with resolve-file feature

Closed this issue · 1 comments

qdot commented

If jsonschema is included using the following file:

jsonschema = { version = "0.15.2", default-features = false, features = ["resolve-file"] }

builds will fail at https://github.com/Stranger6667/jsonschema-rs/blob/master/jsonschema/src/resolver.rs#L85 because of the compile_error. I'm in a situation where I only want to load schemas off local storage and do not need http resolution access.

The same check happens at line 102 (https://github.com/Stranger6667/jsonschema-rs/blob/master/jsonschema/src/resolver.rs#L102) in order to throw an error, but we'll never reach that because of the compile error so we can't even build in the first place.

#359 is most likely same as this one.