Skip to content

Conversation

@nshkrdotcom
Copy link
Contributor

Summary

  • Add explicit struct pattern matches for Context/Channel updates to satisfy Elixir 1.19 gradual typing
  • Fix test warnings (unreachable clause, rename erlpack_notypes test)
  • Update CI matrix for Elixir 1.19/OTP 28 and bump rc.2 versions/changelogs

Notes

Fixes #489

* Add struct pattern matches to fix type warnings in Connection, CLI, and Generator modules
* Update CI matrix with OTP 28.x and Elixir 1.19.x support
* Rename erlpack_notypes.ex to erlpack_notypes_test.exs
* Fix unreachable clause warning in report_exception_test.exs
* Bump version to v1.0.0-rc.2
@@ -1,5 +1,23 @@
# Changelog

## v1.0.0-rc.2 (2026-01-09)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would remove this and keep it as rc.1 since this version hasn't been released yet. Therefore, this change would fall within the scope of rc.1.

@nshkrdotcom
Copy link
Contributor Author

Doing the changelogs now

@nshkrdotcom nshkrdotcom force-pushed the fix-elixir-1.19-warnings branch from be741f9 to 26ee053 Compare January 9, 2026 22:32
@nshkrdotcom
Copy link
Contributor Author

Ugh, sorry, did a force to avoid too many commits. I'll slow down next time.


### Bug fixes

* Fix Elixir 1.19 type system warnings for struct updates in Connection module
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if I'd call these bug fixes. Definitely not a blocker

### Bug fixes

* Fix Elixir 1.19 type system warnings for struct updates in Connection module
* Rename erlpack_notypes.ex to erlpack_notypes_test.exs to follow test naming convention
Copy link
Contributor

Choose a reason for hiding this comment

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

I think changelogs should be more like "highlight reels", so we can remove this line

### Bug fixes

* Fix Elixir 1.19 type system warnings for struct updates in protoc CLI and generator
* Fix unreachable clause warning in report_exception_test.exs
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this as per the reasoning in the other changelog

Comment on lines 17 to 20
# Use Function.identity/1 to make value opaque to type inference
case Function.identity(:ok) do
:error -> :boom
end
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just convert this to an explicit raise instead? This seems like an error that will be caught again in the future.

Comment on lines 38 to 46
exclude:
- otp: 24.x
elixir: 1.19.x
- otp: 25.x
elixir: 1.19.x
- otp: 26.1.x
elixir: 1.19.x
- otp: 28.x
elixir: 1.15.x
Copy link
Contributor

Choose a reason for hiding this comment

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

probably cleaner to include the 1.19 + otp 28 pair instead

* Simplify CI matrix to use include instead of exclude for OTP 28.x/Elixir 1.19.x
* Remove changelog entries for type warning fixes
* Revert report_exception_test.exs to use direct raise
* Apply YAML formatting fixes
@polvalente polvalente requested a review from sleipnir January 11, 2026 14:38
@sleipnir sleipnir merged commit db0948a into elixir-grpc:master Jan 11, 2026
7 checks passed
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.

Elixir 1.19 compatibility: struct update type warnings and test file naming

3 participants