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

Benchmarks task not working #130

Open
renedeproge opened this issue Jan 5, 2023 · 1 comment
Open

Benchmarks task not working #130

renedeproge opened this issue Jan 5, 2023 · 1 comment

Comments

@renedeproge
Copy link
Contributor

renedeproge commented Jan 5, 2023

Hello,

rake benchmarks is not working. I fixed some file requirements but looks like something is still wrong:

panko_serializer/benchmarks/type_casts/bm_panko.rb:7:in panko_type_convert': undefined method _type_cast' for Panko:Module (NoMethodError)

I was unable to locate a working version :(

@yosiat
Copy link
Owner

yosiat commented Jan 5, 2023

Hey,

This is really bad that all benchmarks doesn't run.. I will think about adding to the CI.

Anyway, I did a branch to fix some of my local issues I had (https://github.com/panko-serializer/panko_serializer/tree/benchmarks-fixes) and I can get type_casts/bm_panko to run:

> export RAILS_VERSION=7.0
> ruby --version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
> bundle install
> bundle exec rake
> bundle exec ruby 

BTW, In your branch I see you removed this line - require "panko/panko_serializer" which is the line responsible for loading the C-extension code.. so it makes sense you won't have the _type_cast method (defined here - https://github.com/panko-serializer/panko_serializer/blob/master/ext/panko_serializer/attributes_writer/type_cast/type_cast.c#L362)

I'll work later today to get the all benchmarks running.

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

No branches or pull requests

2 participants