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

Fix error: can't modify frozen String: "decimal" #895

Merged
merged 3 commits into from
Apr 23, 2023
Merged

Fix error: can't modify frozen String: "decimal" #895

merged 3 commits into from
Apr 23, 2023

Conversation

n-rodriguez
Copy link
Contributor

This PR fixes these errors due to the presence of # frozen_string_literal: true in files :

Unable to annotate app/models/camping.rb: can't modify frozen String: "decimal"
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:875:in `get_attributes'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:151:in `block in get_schema_info'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:149:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:149:in `get_schema_info'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:481:in `annotate'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `annotate_model_file'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:658:in `block in do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/tasks/annotate_models.rake:56:in `block in <main>'
Unable to annotate app/models/camping.rb: no implicit conversion of nil into Array
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `concat'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `annotate_model_file'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:658:in `block in do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/tasks/annotate_models.rake:56:in `block in <main>'
Unable to annotate app/models/camping_raw.rb: can't modify frozen String: "decimal"
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:875:in `get_attributes'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:151:in `block in get_schema_info'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:149:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:149:in `get_schema_info'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:481:in `annotate'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `annotate_model_file'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:658:in `block in do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/tasks/annotate_models.rake:56:in `block in <main>'
Unable to annotate app/models/camping_raw.rb: no implicit conversion of nil into Array
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `concat'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `annotate_model_file'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:658:in `block in do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/tasks/annotate_models.rake:56:in `block in <main>'
Unable to annotate app/models/user_profile.rb: can't modify frozen String: "decimal"
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:875:in `get_attributes'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:151:in `block in get_schema_info'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:149:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:149:in `get_schema_info'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:481:in `annotate'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `annotate_model_file'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:658:in `block in do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/tasks/annotate_models.rake:56:in `block in <main>'
Unable to annotate app/models/user_profile.rb: no implicit conversion of nil into Array
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `concat'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:682:in `annotate_model_file'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:658:in `block in do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `each'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/annotate/annotate_models.rb:657:in `do_annotations'
  /home/nicolas/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/bundler/gems/annotate_models-786394947c04/lib/tasks/annotate_models.rake:56:in `block in <main>'

@n-rodriguez
Copy link
Contributor Author

See #834

@n-rodriguez
Copy link
Contributor Author

hi there! any news?

@n-rodriguez
Copy link
Contributor Author

Hi there! Any change to get this merged?

@n-rodriguez
Copy link
Contributor Author

ping @ctran

@n-rodriguez
Copy link
Contributor Author

ping @ctran

About the failing specs : there must be some leaking states somewhere. Errors now appear because of #787.

@n-rodriguez
Copy link
Contributor Author

ping @ctran

@ctran ctran self-assigned this Oct 24, 2022
@ctran ctran added this to the v3.2.1 milestone Oct 24, 2022
@ctran
Copy link
Owner

ctran commented Oct 24, 2022

I think there's something else causing the CI failures, not your changes. I've been trying to figure out where the problem lies but it's taking me some time since I've been away from this for some time.

@n-rodriguez
Copy link
Contributor Author

ping @ctran

@ctran
Copy link
Owner

ctran commented Apr 23, 2023

Hi, the CI issue is now fixed on the develop branch. Did you rebase with the recent changes?

@ctran ctran merged commit 3a78787 into ctran:develop Apr 23, 2023
@n-rodriguez
Copy link
Contributor Author

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants