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

JSON::Validator 3.20 breaks installation of Mojolicious::Plugin::OpenAPI #193

Closed
rkleemann opened this issue Feb 13, 2020 · 4 comments
Closed
Assignees
Labels
bug

Comments

@rkleemann
Copy link

@rkleemann rkleemann commented Feb 13, 2020

  • JSON::Validator version: 3.20
  • Mojolicious::Plugun::OpenAPI version: 2.21
  • Operating system: Linux, OSX

Steps to reproduce the behavior

See steps below.

Expected behavior

Installing Mojolicious::Plugin::OpenAPI with the previous version of JSON::Validator does install correctly.

$ cpanm JSON-Validator-3.19.tar.gz Mojolicious-8.33.tar.gz Mojolicious-Plugin-OpenAPI-2.21.tar.gz
...
3 distributions installed

Actual behavior

Installing Mojolicious::Plugin::OpenAPI with the current version of JSON::Validator does not install correctly.

$ cpanm JSON-Validator-3.20.tar.gz Mojolicious-8.33.tar.gz Mojolicious-Plugin-OpenAPI-2.21.tar.gz
...
--> Working on Mojolicious-Plugin-OpenAPI-2.21.tar.gz
Fetching file:///./Mojolicious-Plugin-OpenAPI-2.21.tar.gz ... OK
Configuring Mojolicious-Plugin-OpenAPI-2.21 ... OK
Building and testing Mojolicious-Plugin-OpenAPI-2.21 ... FAIL
! Installing Mojolicious-Plugin-OpenAPI-2.21.tar.gz failed. See ~/.cpanm/work/1581630149.51481/build.log for details. Retry with --force to force install it.

The relevant section from the build.log

t/v2-file.t ........................... ok
Format rule for 'unknown' is missing at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 717.
t/v2-formats.t ........................ ok
t/v2-readonly.t ....................... ok
t/v2-security.t ....................... ok
api.yml could not be found in __DATA__ section of . at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 268.
        JSON::Validator::_load_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fe02772df80), "data:///api.yml") called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 409
        JSON::Validator::_resolve(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fe02772df80), "data:///api.yml") called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/JSON/Validator/OpenAPI/Mojolicious.pm line 61
        JSON::Validator::OpenAPI::Mojolicious::load_and_validate_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fe02772df80), "data:///api.yml", HASH(0x7fe02986ec50)) called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/Mojolicious/Plugin/OpenAPI.pm line 35
        Mojolicious::Plugin::OpenAPI::register(Mojolicious::Plugin::OpenAPI=HASH(0x7fe02986e9f8), Mojolicious::Lite=HASH(0x7fe029860028), HASH(0x7fe02801feb0)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Plugins.pm line 46
        Mojolicious::Plugins::register_plugin(Mojolicious::Plugins=HASH(0x7fe028cfa7f0), "OpenAPI", Mojolicious::Lite=HASH(0x7fe029860028), HASH(0x7fe02801feb0)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious.pm line 187
        Mojolicious::plugin(Mojolicious::Lite=HASH(0x7fe029860028), "OpenAPI", HASH(0x7fe02801feb0)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Lite.pm line 46
        main::plugin("OpenAPI", HASH(0x7fe02801feb0)) called at t/v3-body.t line 13
t/v3-body.t ...........................
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/v3-default.t ........................ ok
t/v3-invalid_file_refs.t .............. ok
Use of uninitialized value in string eq at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/JSON/Validator/OpenAPI/Mojolicious.pm line 58.
Use of uninitialized value in string eq at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/JSON/Validator/OpenAPI/Mojolicious.pm line 58.
t/v3-invalid_file_refs_no_path.t ...... ok
nullable.json could not be found in __DATA__ section of . at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 268.
        JSON::Validator::_load_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fe216a1d5f0), "data:///nullable.json") called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 409
        JSON::Validator::_resolve(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fe216a1d5f0), "data:///nullable.json") called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/JSON/Validator/OpenAPI/Mojolicious.pm line 61
        JSON::Validator::OpenAPI::Mojolicious::load_and_validate_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fe216a1d5f0), "data:///nullable.json", HASH(0x7fe216a1d920)) called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/Mojolicious/Plugin/OpenAPI.pm line 35
        Mojolicious::Plugin::OpenAPI::register(Mojolicious::Plugin::OpenAPI=HASH(0x7fe216a1d6c8), Mojolicious::Lite=HASH(0x7fe219122410), HASH(0x7fe216029188)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Plugins.pm line 46
        Mojolicious::Plugins::register_plugin(Mojolicious::Plugins=HASH(0x7fe2174b23f0), "OpenAPI", Mojolicious::Lite=HASH(0x7fe219122410), HASH(0x7fe216029188)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious.pm line 187
        Mojolicious::plugin(Mojolicious::Lite=HASH(0x7fe219122410), "OpenAPI", HASH(0x7fe216029188)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Lite.pm line 46
        main::plugin("OpenAPI", HASH(0x7fe216029188)) called at t/v3-nullable.t line 14
t/v3-nullable.t .......................
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/v3-security.t ....................... ok
parameters.json could not be found in __DATA__ section of . at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 268.
        JSON::Validator::_load_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fb3b280e220), "data:///parameters.json") called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 409
        JSON::Validator::_resolve(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fb3b280e220), "data:///parameters.json") called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/JSON/Validator/OpenAPI/Mojolicious.pm line 61
        JSON::Validator::OpenAPI::Mojolicious::load_and_validate_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7fb3b280e220), "data:///parameters.json", HASH(0x7fb3b280e5c8)) called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/Mojolicious/Plugin/OpenAPI.pm line 35
        Mojolicious::Plugin::OpenAPI::register(Mojolicious::Plugin::OpenAPI=HASH(0x7fb3b280e298), Mojolicious::Lite=HASH(0x7fb3b32fe228), HASH(0x7fb3b28036b0)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Plugins.pm line 46
        Mojolicious::Plugins::register_plugin(Mojolicious::Plugins=HASH(0x7fb3b48da1f0), "OpenAPI", Mojolicious::Lite=HASH(0x7fb3b32fe228), HASH(0x7fb3b28036b0)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious.pm line 187
        Mojolicious::plugin(Mojolicious::Lite=HASH(0x7fb3b32fe228), "OpenAPI", HASH(0x7fb3b28036b0)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Lite.pm line 46
        main::plugin("OpenAPI", HASH(0x7fb3b28036b0)) called at t/v3-style-array.t line 44
t/v3-style-array.t ....................
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
t/v3-valid_file_refs.t ................ ok
petstore.json could not be found in __DATA__ section of . at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 268.
        JSON::Validator::_load_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7f95bd13cd00), "data:///petstore.json") called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/JSON/Validator.pm line 409
        JSON::Validator::_resolve(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7f95bd13cd00), "data:///petstore.json") called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/JSON/Validator/OpenAPI/Mojolicious.pm line 61
        JSON::Validator::OpenAPI::Mojolicious::load_and_validate_schema(JSON::Validator::OpenAPI::Mojolicious=HASH(0x7f95bd13cd00), "data:///petstore.json", HASH(0x7f95bd13d030)) called at /Users/bkleemann/.cpanm/work/1581630149.51481/Mojolicious-Plugin-OpenAPI-2.21/blib/lib/Mojolicious/Plugin/OpenAPI.pm line 35
        Mojolicious::Plugin::OpenAPI::register(Mojolicious::Plugin::OpenAPI=HASH(0x7f95bd13cdd8), Mojolicious::Lite=HASH(0x7f95bd063610), HASH(0x7f95bd067a20)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Plugins.pm line 46
        Mojolicious::Plugins::register_plugin(Mojolicious::Plugins=HASH(0x7f95bd0673f0), "OpenAPI", Mojolicious::Lite=HASH(0x7f95bd063610), HASH(0x7f95bd067a20)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious.pm line 187
        Mojolicious::plugin(Mojolicious::Lite=HASH(0x7f95bd063610), "OpenAPI", HASH(0x7f95bd067a20)) called at /Users/bkleemann/.plenv/versions/5.30.0/lib/perl5/site_perl/5.30.0/Mojolicious/Lite.pm line 46
        main::plugin("OpenAPI", HASH(0x7f95bd067a20)) called at t/v3.t line 39
t/v3.t ................................
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
@rkleemann rkleemann changed the title JSON::Validator 3.20 breaks Mojolicious::Plugin::OpenAPI JSON::Validator 3.20 breaks installation of Mojolicious::Plugin::OpenAPI Feb 13, 2020
@karenetheridge

This comment has been minimized.

Copy link
Contributor

@karenetheridge karenetheridge commented Feb 13, 2020

@rkleeman if you escape the build log snippets with ``` (three backticks) above and below, the log lines will be more readable -- some characters are being lost in markdown rendering.

@karenetheridge

This comment has been minimized.

Copy link
Contributor

@karenetheridge karenetheridge commented Feb 13, 2020

It looks like something went wrong with the new implementation of data_section.

@rkleemann

This comment has been minimized.

Copy link
Author

@rkleemann rkleemann commented Feb 13, 2020

@karenetheridge: Thanks for the tip, updated for readability.

@jhthorsen jhthorsen closed this in d158704 Feb 14, 2020
@jhthorsen jhthorsen self-assigned this Feb 14, 2020
@jhthorsen jhthorsen added the bug label Feb 14, 2020
@jhthorsen

This comment has been minimized.

Copy link
Member

@jhthorsen jhthorsen commented Feb 14, 2020

Indeed something was wrong with data_section(). Will be fixed in 3.21. Going to hold the release off for a little while, since @karenetheridge has some changes I want to include, but it will be released today.

jhthorsen added a commit that referenced this issue Feb 14, 2020
 - Fix data_section() without a class #193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.