-
Notifications
You must be signed in to change notification settings - Fork 208
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
Add json_schemer
gem
#4969
Comments
No problem. This is a pure ruby gem, no native ext, so we shouldn't need any patching because MSVC doesn't support C99 etc. @wenyikuang Do you want to take this one? |
Added the PR at NREL/openstudio-gems#64. Assuming it works, packages should be uploaded to S3 and OpenStudio's CMakeLists.txt should be updated to match. (I'll have to build the mac M1 one myself and have @wenyikuang upload it to s3 as well, unless the arm64 mac CI machines are ready. Edit: built and hosted on google drive, link on slack) |
Sure, let me take a look. |
Fix #4969 - add `json_schemer` to embedded ruby gems
@shorowit reported this error, that I can reproduce on Ubuntu 20.04
The test is actually failing, even though Ctest / minitest says it's fine.
|
This works: |
I realize that the conan-openstudio-ruby test_package works fine. Which made me realize this is a regression that dates to when we added python measures and made the CLI non statically linked to ruby
|
With ruby3 I'm having an issue due to this gem on windows. It depends on simpleidn, which depends on unf_ext, which is a native C++ extension (and And it bakes some directives into the unf_ext.lib such as |
That couldn't have been more wrong :) |
…llows linking debug Disabled, see NREL#72 and NREL/OpenStudio#4969 (comment)
…llows linking debug Disabled, see NREL#72 and NREL/OpenStudio#4969 (comment)
@jmarrec what do you think about this in 3.9? Is there a path to do that? Could a Python measure in the workflow do this instead of Ruby. Maybe OS add a JSON validation Python library to our Python |
If we went the python route, which would probably work fine for our use case, I think the library we'd want added to OS is jsonschema. |
Enhancement Request
OpenStudio includes the
json-schema
gem, but it is barely maintained and many users recommend switching tojson_schemer
gem. Not only is thejson_schemer
gem well maintained, but it supports newer drafts of the JSON schema that are heavily utilized these days. Thejson-schema
gem has no current progress towards supporting newer drafts of the schema.For DOE's Home Energy Score project, we are unable to use the current
json-schema
gem because it doesn't support JSON Schema draft-07. This means that we can't validate JSON files submitted and has occasionally led to issues.(Perhaps OpenStudio should consider replacing the
json-schema
gem, but that would be a breaking change.)The text was updated successfully, but these errors were encountered: