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

[BUG] [Perl] Can't locate WWW/OpenAPIClient/Object/AnyType.pm in @INC #17650

Closed
4 of 6 tasks
bmodotdev opened this issue Jan 19, 2024 · 2 comments · Fixed by #17654
Closed
4 of 6 tasks

[BUG] [Perl] Can't locate WWW/OpenAPIClient/Object/AnyType.pm in @INC #17650

bmodotdev opened this issue Jan 19, 2024 · 2 comments · Fixed by #17654

Comments

@bmodotdev
Copy link
Contributor

bmodotdev commented Jan 19, 2024

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Running prove -l on the Perl's petstore sample, the following error is seen:

$ cd samples/client/petstore/perl
$ prove -l
[... etc ...]

#   Failed test 'use WWW::OpenAPIClient::Object::TestInlineFreeformAdditionalPropertiesRequest;'
#   at t/TestInlineFreeformAdditionalPropertiesRequestTest.t line 28.
#     Tried to use 'WWW::OpenAPIClient::Object::TestInlineFreeformAdditionalPropertiesRequest'.
#     Error:  Can't locate WWW/OpenAPIClient/Object/AnyType.pm in @INC (you may need to install the WWW::OpenAPIClient::Object::AnyType module) (@INC contains: lib /home/user/git/openapi-generator/samples/client/petstore/perl/lib /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.3/x86_64-linux-thread-multi /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.3 /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.3/x86_64-linux-thread-multi /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/5.36.3 /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.1/x86_64-linux-thread-multi /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.1 /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0 /home/user/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl) at lib/WWW/OpenAPIClient/Object/TestInlineFreeformAdditionalPropertiesRequest.pm line 33.
# BEGIN failed--compilation aborted at lib/WWW/OpenAPIClient/Object/TestInlineFreeformAdditionalPropertiesRequest.pm line 33.
# Compilation failed in require at t/TestInlineFreeformAdditionalPropertiesRequestTest.t line 28.
# BEGIN failed--compilation aborted at t/TestInlineFreeformAdditionalPropertiesRequestTest.t line 28.
# Looks like you failed 1 test of 1.
t/TestInlineFreeformAdditionalPropertiesRequestTest.t ..
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/1 subtests
t/UserApiTest.t ........................................ ok
t/UserTest.t ........................................... ok

Test Summary Report
-------------------
t/TestInlineFreeformAdditionalPropertiesRequestTest.t (Wstat: 256 (exited 1) Tests: 1 Failed: 1)
Failed test:  1
Non-zero exit status: 1
Files=57, Tests=64,  7 wallclock secs ( 0.07 usr  0.04 sys +  6.02 cusr  0.83 csys =  6.96 CPU)
Result: FAIL

The full output is available in my gist prove1.txt with master and prove2.txt with pr #17649.

I noticed docs/generators/perl.md has a table of "Data Type Feature" which "AnyType" is marked as ❌. Maybe there is some config option to disable this unimplemented type?

openapi-generator version

current master 3756c3b

Generation Details
Steps to reproduce
$ perlbrew use perl-5.36.0
$ perlbrew upgrade-perl
$ perlbrew clean
$ perl -E'say $]'
5.036003

$ sudo apt install openjdk-17-jre maven
$ ./mvnw clean package
$ /bin/rm samples/client/petstore/perl/t/*Test.t
$ ./bin/generate-samples.sh ./bin/configs/perl.yaml
$ cpanm Class::Accessor Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON
$ cd samples/client/petstore/perl/
$ prove -l
Related issues/PRs

PR: #17649

Around the same domain, PR: #14923 Issue: #14921

Suggest a fix

I am not familiar enough with the project to know the answer here. I am open to being pointed to documentation and doing some follow up work. Thank you

@wing328
Copy link
Member

wing328 commented Jan 19, 2024

filed #17651 to fix it

@bmodotdev
Copy link
Contributor Author

filed #17651 to fix it

Thank you for the quick fix, and seeing how you did it, I understand a bit more how this whole project works 🤝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants