fix: declare gen_smtp as a runtime application dependency - #16
Merged
Merged
Conversation
hikyaku_adapter_smtp calls gen_smtp_client:send_blocking/2 and mimemail:encode/1, but gen_smtp was only a build-time rebar dep, never listed in hikyaku.app.src's applications list. relx uses that list to resolve which apps get bundled into a release, so gen_smtp compiled fine locally but was silently absent from any release built from this library, causing error:undef the first time the SMTP adapter actually ran in production.
🟡 Code Coverage — 78%284 of 364 lines covered. ℹ️ 30 OTP CVEs auto-ignored (already fixed in running version)These CVEs are patched in the installed OTP version but NVD data
|
Asserts gen_smtp is present in application:get_key(hikyaku, applications) directly, the same list relx reads to assemble a release, so this fails on the previous state and passes now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hikyaku_adapter_smtpcallsgen_smtp_client:send_blocking/2andmimemail:encode/1, both fromgen_smtp.gen_smtpwas only declared as a rebar build dependency, never listed inhikyaku.app.src'sapplicationslist.applicationslist, sogen_smtpcompiled fine but was never bundled into any release built from this library.error:undefthe first timehikyaku_adapter_smtp:deliver/2actually ran in a deployed release (surfaced in asobi_saas production today, first real exercise of the SMTP adapter since it was written).Test plan
rebar3 fmt --checkcleanrebar3 xrefclean (only pre-existing deprecation warnings inranch/gen_smtpinternals, not introduced by this change)rebar3 eunit- 75 tests, 0 failuresrebar3 dialyzerclean