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: add dialyzer to pipeline #82

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

Conversation

yordis
Copy link
Contributor

@yordis yordis commented Jan 6, 2023

No description provided.

@yordis yordis force-pushed the improve-ci branch 2 times, most recently from 01f4e28 to 092dd2a Compare January 6, 2023 17:23
@coveralls
Copy link

coveralls commented Jan 6, 2023

Pull Request Test Coverage Report for Build 4b7c6eefe2d152d4cb26f9b4103e8ec8e2693453-PR-82

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 31 unchanged lines in 16 files lost coverage.
  • Overall coverage decreased (-4.1%) to 95.926%

Files with Coverage Reduction New Missed Lines %
lib/spear/cluster_member.ex 1 75.0%
lib/spear/connection.ex 1 98.86%
lib/spear/connection/keep_alive_timer.ex 1 93.75%
lib/spear/connection/request.ex 1 98.46%
lib/spear/filter.ex 1 96.97%
lib/spear/persistent_subscription/settings.ex 1 96.67%
lib/spear/user.ex 1 75.0%
lib/spear/batch_append_result.ex 2 81.82%
lib/spear/event.ex 2 96.0%
lib/spear.ex 2 98.94%
Totals Coverage Status
Change from base Build 90f7c2354426e0164eea7e64777ef9da5806e69e: -4.1%
Covered Lines: 730
Relevant Lines: 761

💛 - Coveralls

@yordis yordis force-pushed the improve-ci branch 3 times, most recently from 19a8320 to b6e6071 Compare January 8, 2023 20:32
@yordis yordis marked this pull request as draft January 8, 2023 20:32
@yordis
Copy link
Contributor Author

yordis commented Jan 8, 2023

lib/spear/reading/stream.ex:50:pattern_match
The pattern can never match the type.

Pattern:

  {{:"event_store.client.streams.ReadResp",
    {:stream_not_found, {:"event_store.client.streams.ReadResp.StreamNotFound", _}}},
   __rest}


Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:54:pattern_match
The pattern can never match the type.

Pattern:
{_message = {:"event_store.client.streams.ReadResp", {:event, _}}, __rest}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:60:pattern_match
The pattern can never match the type.

Pattern:
{{:"event_store.client.streams.ReadResp", {_content_case, _}}, __rest}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:100:pattern_match
The pattern can never match the type.

Pattern:
{_, _rest = <<__head, _ / binary>>}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:113:pattern_match
The pattern can never match the type.

Pattern:
{_message = {:"event_store.client.streams.ReadResp", {:event, _}}, _remaining_buffer}

Type:
nil

________________________________________________________________________________
lib/spear/reading/stream.ex:118:pattern_match
The pattern can never match the type.

Pattern:
{{:"event_store.client.streams.ReadResp", _}, _remaining_buffer}

Type:
nil

________________________________________________________________________________
done (warnings were emitted)
Halting VM with exit status 2

Got stuck with these issues!

@the-mikedavis
Copy link
Collaborator

Ah I think Spear.Reading.Stream.unfold_chunk/1 is spec'd incorrectly: it should be tuple() instead of struct() since each message is decoded by gpb as a record

@yordis yordis marked this pull request as ready for review February 12, 2023 05:56
@yordis
Copy link
Contributor Author

yordis commented Feb 22, 2023

I think it is ready now 😄

Copy link
Collaborator

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this just needs a run of the formatter too to pass CI

mix.exs Outdated Show resolved Hide resolved
lib/spear/connection/response.ex Outdated Show resolved Hide resolved
@yordis yordis force-pushed the improve-ci branch 6 times, most recently from a282de2 to b319e08 Compare June 13, 2023 01:47
description: description()
description: description(),
dialyzer: [
plt_add_apps: [:jason],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

Comment on lines +1 to +2
elixir 1.14.5-otp-26
erlang 26.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥺🥺🥺🥺 please 🥺🥺🥺🥺

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this to the CI and using it locally is ok but we should also test against earlier Elixir versions as far back as 1.9

@yordis yordis force-pushed the improve-ci branch 5 times, most recently from eb9f5e1 to 94b739a Compare June 13, 2023 02:41
@yordis yordis force-pushed the improve-ci branch 7 times, most recently from 905c237 to 7ea4094 Compare June 13, 2023 03:01
Comment on lines -38 to 35
otp-version: ${{ matrix.beam.otp }}
elixir-version: ${{ matrix.beam.elixir }}
version-file: .tool-versions
version-type: strict

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compatibility workflow should check a range of old/new Elixir and Erlang/OTP versions rather than use the main .tool-versions. Removing credo and updating to the new actions v3 versions looks good though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, my understanding is that it is valuable to check against a range of Event Store DB versions, but since Elixir 1.10, there is not much value in adding such a matrix IMO.

Being said, sure I can add it back

priv/plts/.gitignore Show resolved Hide resolved
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