Skip to content

Class Autopilot has multiple different ancestors #560

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

Closed
hlascelles opened this issue Jul 1, 2021 · 5 comments
Closed

Class Autopilot has multiple different ancestors #560

hlascelles opened this issue Jul 1, 2021 · 5 comments
Labels
status: help wanted requesting help from the community type: bug bug in the library

Comments

@hlascelles
Copy link

hlascelles commented Jul 1, 2021

Issue Summary

Depending on how you require the gem (or parts of it) you can cause an error as some classes have different ancestor chains.

Steps to Reproduce

  1. Use gem 5.56.0 (for example)
  2.  require "twilio-ruby"
     require "twilio-ruby/rest/autopilot"
    
  3. See error:
    twilio-ruby-5.56.0/lib/twilio-ruby/rest/autopilot/v1/assistant.rb:13:in `<module:REST>': 
          superclass mismatch for class Autopilot (TypeError)
    

Technical details:

  • twilio-ruby version: 5.56.0
  • ruby version: Any

Cause

This line declares Autopilot with no ancestors:


This line declares Autopilot with ancestor Domain:
class Autopilot < Domain

Is this a bug in the code generator?

@hlascelles
Copy link
Author

Possibly related: #558

@hlascelles
Copy link
Author

Confirmed 5.55.0 works fine.

@thinkingserious
Copy link
Contributor

Thank you for reporting this @hlascelles!

I was able to reproduce this issue locally.

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

With best regards,

Elmer

@thinkingserious thinkingserious added status: help wanted requesting help from the community type: bug bug in the library labels Jul 2, 2021
@lauratpa
Copy link

I can see that lib/twilio-ruby/rest/autopilot/v1.rb file is the only one that seems to miss the inheritance from Domain class.

lib/twilio-ruby/rest/autopilot.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1.rb:    class Autopilot
lib/twilio-ruby/rest/autopilot/v1/assistant.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb:    class Autopilot < Domain
lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb:    class Autopilot < Domain

I created a PR #573 to add the inheritance there as well.

@kridai
Copy link
Contributor

kridai commented Mar 28, 2023

This is issue is fixed now.

@kridai kridai closed this as completed Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted requesting help from the community type: bug bug in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants