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

chore: fix method redefinition warnings #730

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

casperisfine
Copy link

These are harmless but I'm trying to get my application warning free because warnings tend to point nasty bugs.

lib/twilio-ruby/util/configuration.rb:8: warning: method redefined; discarding old account_sid=
lib/twilio-ruby/util/configuration.rb:12: warning: method redefined; discarding old auth_token=
lib/twilio-ruby/util/configuration.rb:16: warning: method redefined; discarding old http_client=
lib/twilio-ruby/util/configuration.rb:20: warning: method redefined; discarding old region=
lib/twilio-ruby/util/configuration.rb:24: warning: method redefined; discarding old edge=
lib/twilio-ruby/util/configuration.rb:28: warning: method redefined; discarding old logger=

There are a number of warnings left but I can't fix them because they are in generated code.

Almost all of them have to do witht the context method:

lib/twilio-ruby/rest/studio/v1/flow/engagement.rb:321: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement.rb:282: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb:162: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb:143: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb:293: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb:249: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb:170: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb:150: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution.rb:367: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution.rb:328: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb:163: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb:144: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb:299: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb:255: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb:173: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb:153: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution.rb:360: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution.rb:327: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb:163: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb:144: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb:299: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb:255: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb:173: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb:153: warning: previous definition of context was here
lib/twilio-ruby/twiml/voice_response.rb:794: warning: method redefined; discarding old initialize
lib/twilio-ruby/twiml/messaging_response.rb:50: warning: previous definition of initialize was here

@casperisfine
Copy link
Author

Update: My initial PR wasn't properly rebased, there's now a tons of warnings about mis-matching indentation, but also in the autogenerated code.

These are harmless but I'm trying to get my application warning free because warnings tend to
point nasty bugs.

```
lib/twilio-ruby/util/configuration.rb:8: warning: method redefined; discarding old account_sid=
lib/twilio-ruby/util/configuration.rb:12: warning: method redefined; discarding old auth_token=
lib/twilio-ruby/util/configuration.rb:16: warning: method redefined; discarding old http_client=
lib/twilio-ruby/util/configuration.rb:20: warning: method redefined; discarding old region=
lib/twilio-ruby/util/configuration.rb:24: warning: method redefined; discarding old edge=
lib/twilio-ruby/util/configuration.rb:28: warning: method redefined; discarding old logger=
```

There are a number of warnings left but I can't fix them because they are in generated code.

Almost all of them have to do witht the `context` method:

```
lib/twilio-ruby/rest/studio/v1/flow/engagement.rb:321: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement.rb:282: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb:162: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb:143: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb:293: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb:249: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb:170: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb:150: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution.rb:367: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution.rb:328: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb:163: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb:144: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb:299: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb:255: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb:173: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb:153: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution.rb:360: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution.rb:327: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb:163: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb:144: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb:299: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb:255: warning: previous definition of context was here
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb:173: warning: method redefined; discarding old context
lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb:153: warning: previous definition of context was here
lib/twilio-ruby/twiml/voice_response.rb:794: warning: method redefined; discarding old initialize
lib/twilio-ruby/twiml/messaging_response.rb:50: warning: previous definition of initialize was here
```
@casperisfine casperisfine changed the title Fix method redefinition warnings chore: fix method redefinition warnings Sep 18, 2024
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