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 all dependencies for the dialyzer #7196

Merged
merged 1 commit into from
Feb 14, 2023
Merged

Conversation

binarin
Copy link
Contributor

@binarin binarin commented Feb 6, 2023

This is the latest commit in the series, it fixes (almost) all the problems with missing and circular dependencies for typing.

The only 3 unsolved problems are:

  • lg dependency for rabbit - the problem is that it's the only dependency that contains NIF. And there is no way to make dialyzer ignore it - looks like unknown check is not suppressable by dialyzer directives. In the future making lg a proper dependency can be a good thing anyway.

  • some missing elixir function in rabbitmq_cli (CSV, JSON and logging related).

  • eetcd dependency for rabbitmq_peer_discovery_etcd - this one uses sub-directories in src/, which confuses dialyzer (or our bazel machinery is not able to properly handle it). I've tried the latest rules_erlang which flattens directory for .beam files, but it wasn't enough for dialyzer - it wasn't able to find core erlang files. This is a niche plugin and an unusual dependency, so probably not worth investigating further.

@binarin binarin marked this pull request as draft February 6, 2023 17:01
@mergify mergify bot added the bazel label Feb 6, 2023
@binarin binarin force-pushed the dialyzer-enable-Wunkown branch 2 times, most recently from bf0de8b to db58dfa Compare February 13, 2023 16:35
This is the latest commit in the series, it fixes (almost) all the
problems with missing and circular dependencies for typing.

The only 2 unsolved problems are:

- `lg` dependency for `rabbit` - the problem is that it's the only
  dependency that contains NIF. And there is no way to make dialyzer
  ignore it - looks like unknown check is not suppressable by dialyzer
  directives. In the future making `lg` a proper dependency can be a
  good thing anyway.

- some missing elixir function in `rabbitmq_cli` (CSV, JSON and
  logging related).

- `eetcd` dependency for `rabbitmq_peer_discovery_etcd` - this one
  uses sub-directories in `src/`, which confuses dialyzer (or our bazel
  machinery is not able to properly handle it). I've tried the latest
  rules_erlang which flattens directory for .beam files, but it wasn't
  enough for dialyzer - it wasn't able to find core erlang files. This
  is a niche plugin and an unusual dependency, so probably not worth
  investigating further.
@binarin binarin marked this pull request as ready for review February 14, 2023 11:10
@pjk25
Copy link
Contributor

pjk25 commented Feb 14, 2023

The eetcd issue should be fixed by re-importing the dep with rules_erlang 3.9.5, but I will have to verify that.

@michaelklishin michaelklishin merged commit 8ac0829 into main Feb 14, 2023
@michaelklishin michaelklishin deleted the dialyzer-enable-Wunkown branch February 14, 2023 16:41
pjk25 added a commit that referenced this pull request Feb 15, 2023
`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196
mergify bot pushed a commit that referenced this pull request Feb 16, 2023
`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
mergify bot pushed a commit that referenced this pull request Feb 16, 2023
`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

# Conflicts:
#	MODULE.bazel
#	WORKSPACE
pjk25 added a commit that referenced this pull request Feb 17, 2023
Fix all dependencies for the dialyzer (backport #7196) (backport #7291)
pjk25 added a commit that referenced this pull request Feb 17, 2023
`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

# Conflicts:
#	MODULE.bazel
#	WORKSPACE
@michaelklishin michaelklishin added this to the 3.11.10 milestone Feb 17, 2023
pjk25 added a commit that referenced this pull request Feb 17, 2023
* Regenerate bazel/BUILD.eetcd with the latest rules_erlang

`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

# Conflicts:
#	MODULE.bazel
#	WORKSPACE

* Remove extra erlc_opts from BUILD.eetcd

Should be unnecessary once
rabbitmq/rules_erlang#140 is available in a
release

(cherry picked from commit b6e145c)
(cherry picked from commit d646ea4)

* Update the note about eetcd and dialyzer

now that the original issue has been resolved. We cannot bump gun just
yet, as eetcd is not yet compatible with gun 2.0.0

zhongwencool/eetcd#28
zhongwencool/eetcd#55
(cherry picked from commit 185e910)
(cherry picked from commit 31f5eec)

* Adjust the size of //deps/rabbit:bindings_SUITE to medium

generally speaking, rabbitmq_integration_suite tests do not reliably
run in under the 60s timeout implied by "small", at least in CI

(cherry picked from commit 60093ee)
(cherry picked from commit d56f004)

# Conflicts:
#	deps/rabbit/BUILD.bazel

* Add missing dep to //deps/rabbitmq_aws:eunit test

(cherry picked from commit 1bef97a)
(cherry picked from commit 60d09a3)

* Additional conflict resolution

---------

Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
mergify bot added a commit that referenced this pull request Feb 17, 2023
* Regenerate bazel/BUILD.eetcd with the latest rules_erlang

`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

# Conflicts:
#	MODULE.bazel
#	WORKSPACE

* Remove extra erlc_opts from BUILD.eetcd

Should be unnecessary once
rabbitmq/rules_erlang#140 is available in a
release

(cherry picked from commit b6e145c)
(cherry picked from commit d646ea4)

* Update the note about eetcd and dialyzer

now that the original issue has been resolved. We cannot bump gun just
yet, as eetcd is not yet compatible with gun 2.0.0

zhongwencool/eetcd#28
zhongwencool/eetcd#55
(cherry picked from commit 185e910)
(cherry picked from commit 31f5eec)

* Adjust the size of //deps/rabbit:bindings_SUITE to medium

generally speaking, rabbitmq_integration_suite tests do not reliably
run in under the 60s timeout implied by "small", at least in CI

(cherry picked from commit 60093ee)
(cherry picked from commit d56f004)

# Conflicts:
#	deps/rabbit/BUILD.bazel

* Add missing dep to //deps/rabbitmq_aws:eunit test

(cherry picked from commit 1bef97a)
(cherry picked from commit 60d09a3)

* Additional conflict resolution

---------

Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
(cherry picked from commit 6be0b49)

# Conflicts:
#	deps/rabbitmq_peer_discovery_etcd/BUILD.bazel
pjk25 added a commit that referenced this pull request Feb 17, 2023
… (backport #7295) (#7349)

* Fix all dependencies for the dialyzer

This is the latest commit in the series, it fixes (almost) all the
problems with missing and circular dependencies for typing.

The only 2 unsolved problems are:

- `lg` dependency for `rabbit` - the problem is that it's the only
  dependency that contains NIF. And there is no way to make dialyzer
  ignore it - looks like unknown check is not suppressable by dialyzer
  directives. In the future making `lg` a proper dependency can be a
  good thing anyway.

- some missing elixir function in `rabbitmq_cli` (CSV, JSON and
  logging related).

- `eetcd` dependency for `rabbitmq_peer_discovery_etcd` - this one
  uses sub-directories in `src/`, which confuses dialyzer (or our bazel
  machinery is not able to properly handle it). I've tried the latest
  rules_erlang which flattens directory for .beam files, but it wasn't
  enough for dialyzer - it wasn't able to find core erlang files. This
  is a niche plugin and an unusual dependency, so probably not worth
  investigating further.

(cherry picked from commit 949b535)
(cherry picked from commit 3a3ff30)

# Conflicts:
#	deps/rabbit/BUILD.bazel
#	deps/rabbit/src/rabbit_access_control.erl
#	deps/rabbit/src/rabbit_exchange.erl
#	deps/rabbit_common/src/rabbit_misc.erl
#	deps/rabbitmq_consistent_hash_exchange/BUILD.bazel
#	deps/rabbitmq_mqtt/BUILD.bazel
(cherry picked from commit 2ae27f2)

# Conflicts:
#	deps/rabbit_common/src/rabbit_misc.erl

* Resolve conflicts

(cherry picked from commit b205ac9)

# Conflicts:
#	deps/rabbit_common/src/rabbit_misc.erl

* Avoid using a type from rabbit in rabbit_common to avoid a dep cycle

(cherry picked from commit bca40c6)

* Resolved additional errors from merge

Leaving MQTT alone, as this branch does not contain
#5895, which fixed a
great many dialyzer warnings.

(cherry picked from commit 3f9e6f9)

* fixup merge artifacts

* Avoid referencing unexported types from jsx

* Additional dialyzer fixes

---------

Co-authored-by: Alexey Lebedeff <binarin@binarin.ru>
Co-authored-by: Michael Klishin <klishinm@vmware.com>
Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
pjk25 pushed a commit that referenced this pull request Feb 17, 2023
* Regenerate bazel/BUILD.eetcd with the latest rules_erlang

`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

# Conflicts:
#	MODULE.bazel
#	WORKSPACE

* Remove extra erlc_opts from BUILD.eetcd

Should be unnecessary once
rabbitmq/rules_erlang#140 is available in a
release

(cherry picked from commit b6e145c)
(cherry picked from commit d646ea4)

* Update the note about eetcd and dialyzer

now that the original issue has been resolved. We cannot bump gun just
yet, as eetcd is not yet compatible with gun 2.0.0

zhongwencool/eetcd#28
zhongwencool/eetcd#55
(cherry picked from commit 185e910)
(cherry picked from commit 31f5eec)

* Adjust the size of //deps/rabbit:bindings_SUITE to medium

generally speaking, rabbitmq_integration_suite tests do not reliably
run in under the 60s timeout implied by "small", at least in CI

(cherry picked from commit 60093ee)
(cherry picked from commit d56f004)

# Conflicts:
#	deps/rabbit/BUILD.bazel

* Add missing dep to //deps/rabbitmq_aws:eunit test

(cherry picked from commit 1bef97a)
(cherry picked from commit 60d09a3)

* Additional conflict resolution

---------

Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
(cherry picked from commit 6be0b49)

# Conflicts:
#	deps/rabbitmq_peer_discovery_etcd/BUILD.bazel
pjk25 pushed a commit that referenced this pull request Feb 17, 2023
* Regenerate bazel/BUILD.eetcd with the latest rules_erlang

`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

* Remove extra erlc_opts from BUILD.eetcd

Should be unnecessary once
rabbitmq/rules_erlang#140 is available in a
release

(cherry picked from commit b6e145c)
(cherry picked from commit d646ea4)

* Update the note about eetcd and dialyzer

now that the original issue has been resolved. We cannot bump gun just
yet, as eetcd is not yet compatible with gun 2.0.0

zhongwencool/eetcd#28
zhongwencool/eetcd#55
(cherry picked from commit 185e910)
(cherry picked from commit 31f5eec)

* Adjust the size of //deps/rabbit:bindings_SUITE to medium

generally speaking, rabbitmq_integration_suite tests do not reliably
run in under the 60s timeout implied by "small", at least in CI

(cherry picked from commit 60093ee)
(cherry picked from commit d56f004)

* Add missing dep to //deps/rabbitmq_aws:eunit test

(cherry picked from commit 1bef97a)
(cherry picked from commit 60d09a3)

* Additional conflict resolution

---------

Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
(cherry picked from commit 6be0b49)
pjk25 added a commit that referenced this pull request Feb 17, 2023
#7329) (#7352)

* Use the latest rules_erlang (backport #7315) (backport #7327) (#7329)

* Regenerate bazel/BUILD.eetcd with the latest rules_erlang

`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196

(cherry picked from commit 2dc0236)
(cherry picked from commit 733aad5)

* Remove extra erlc_opts from BUILD.eetcd

Should be unnecessary once
rabbitmq/rules_erlang#140 is available in a
release

(cherry picked from commit b6e145c)
(cherry picked from commit d646ea4)

* Update the note about eetcd and dialyzer

now that the original issue has been resolved. We cannot bump gun just
yet, as eetcd is not yet compatible with gun 2.0.0

zhongwencool/eetcd#28
zhongwencool/eetcd#55
(cherry picked from commit 185e910)
(cherry picked from commit 31f5eec)

* Adjust the size of //deps/rabbit:bindings_SUITE to medium

generally speaking, rabbitmq_integration_suite tests do not reliably
run in under the 60s timeout implied by "small", at least in CI

(cherry picked from commit 60093ee)
(cherry picked from commit d56f004)

* Add missing dep to //deps/rabbitmq_aws:eunit test

(cherry picked from commit 1bef97a)
(cherry picked from commit 60d09a3)

* Additional conflict resolution

---------

Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
(cherry picked from commit 6be0b49)

* thoas -> jsx

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants