Skip to content

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 31, 2023

This is an automatic backport of pull request #7114 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

HoloRin and others added 2 commits January 31, 2023 17:47
* Add rabbitmq_cli dialyze to bazel

and fix a number of warnings

Because we stop mix from recompiling rabbit_common in bazel, many
unknown functions are reported, so this dialyzer analysis is somewhat
incomplete.

* Use erlang dialyzer for rabbitmq_cli rather than mix dialyzer

Since this resolves all of the rabbit functions, there are far fewer
unknown functions.

Requires yet to be released rules_erlang 3.9.2

* Temporarily use pre-release rules_erlang

So that checks can run on this PR without a release

* Fix additional dialyzer warnings in rabbitmq_cli

* rabbitmq_cli: mix format

* Additional fixes for ignored return values

* Revert "Temporarily use pre-release rules_erlang"

This reverts commit c16b5b6.

* Use rules_erlang 3.9.2

(cherry picked from commit bdb2046)

# Conflicts:
#	deps/rabbit_common/src/rabbit_misc.erl
(cherry picked from commit 6be4463)
(cherry picked from commit 0dbbcf2)
@mergify mergify bot added the bazel label Jan 31, 2023
@michaelklishin
Copy link
Collaborator

This should wait until 3.10.17 is shipped with an emergency bug fix (#7120).

@michaelklishin
Copy link
Collaborator

bazel test //deps/rabbitmq_cli:dialyze

passes for me locally on Erlang 24.3.

@HoloRin
Copy link
Contributor

HoloRin commented Feb 1, 2023

The buildbuddy logs indicate additional errors for erlang 24 only.

auto_complete.ex:50: Function complete/1 will never be called
auto_complete.ex:73: Function complete_default_opts/1 will never be called
auto_complete.ex:81: Function complete_command_name/1 will never be called
auto_complete.ex:95: Function complete_command_opts/2 will never be called
auto_complete.ex:112: Function select_starts_with/2 will never be called
auto_complete.ex:116: Function format_options/1 will never be called
parser.ex:58: Function parse/1 has no local return
parser.ex:93: Function look_up_command/2 will never be called
parser.ex:123: Function command_alias/3 will never be called
parser.ex:138: Function load_aliases/1 will never be called
parser.ex:167: Function parse_alias/5 will never be called
parser.ex:176: Function parse_command_specific/2 has no local return
parser.ex:176: Function parse_command_specific/3 has no local return
parser.ex:184: Function parse_global_head/1 has no local return
parser.ex:200: Function parse_global/1 has no local return
parser.ex:206: Function parse_generic/3 has no local return
rabbitmqctl.ex:233: Function output_device/1 will never be called
rabbitmqctl.ex:246: The pattern 
          {'error', _exit_code@1, 'nil'} can never match the type 
          'ok'
rabbitmqctl.ex:250: The pattern 
          {_, _exit_code@1, _output@1} can never match the type 
          'ok'
rabbitmqctl.ex:260: The variable _ can never match since previous clauses completely covered the type 
          'ok'
rabbitmqctl.ex:287: Function normalise_options/1 will never be called
rabbitmqctl.ex:291: Function normalise_timeout/1 will never be called

I will have a go at fixing them.

@HoloRin HoloRin force-pushed the mergify/bp/v3.10.x/pr-7114 branch from 570ab50 to 624394e Compare February 1, 2023 22:20
michaelklishin added a commit that referenced this pull request Feb 2, 2023
Forward-port dialyzer related rabbitmq_cli fixes from #7122
mergify bot pushed a commit that referenced this pull request Feb 2, 2023
@michaelklishin michaelklishin added this to the 3.10.18 milestone Feb 2, 2023
@michaelklishin michaelklishin merged commit ca3100d into v3.10.x Feb 2, 2023
@michaelklishin michaelklishin deleted the mergify/bp/v3.10.x/pr-7114 branch February 2, 2023 02:42
michaelklishin added a commit that referenced this pull request Feb 2, 2023
Forward-port dialyzer related rabbitmq_cli fixes from #7122 (backport #7149)
mergify bot pushed a commit that referenced this pull request Feb 2, 2023
(cherry picked from commit 0ac62a4)
(cherry picked from commit 844fe64)
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.

3 participants