Document event struct modules (fix ExDoc warnings)#3
Merged
Conversation
The Track/Identify/Screen/Page/Group/Alias/Context structs are public API (callers construct them directly, and Segmentry's public specs reference their t() types), but each was @moduledoc false. ExDoc warned that documentation referenced types in hidden modules. Give each a concise moduledoc linking to the relevant Segment spec, and group them under "Event structs" in the docs sidebar. The internal Segmentry.Analytics.Types helper stays hidden. mix docs now builds with zero warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ahlatimer
approved these changes
Jun 30, 2026
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
mix docsemitted ~30 warnings of the form "documentation references typeSegmentry.Analytics.Track.t()but the module … is hidden."Root cause: the event struct modules (
Track,Identify,Screen,Page,Group,Alias,Context) were each@moduledoc false, yet they're public API — callers construct%Segmentry.Analytics.Track{...}directly, andSegmentry's@type segment_eventplus everySegmentry.Analyticsspec reference theirt()types. ExDoc can't link a type whose module is hidden, hence the warnings.Changes
@moduledocto each of the seven event/context structs, linking to the relevant Segment spec.groups_for_modulesinmix.exs) so the module list stays tidy.Segmentry.Analytics.Typeshelper stays@moduledoc false— nothing public references it.Verification
mix docs→ 0 warnings (was ~30).mix format --check-formattedclean.mix test→ 75 passed.No behavior change — documentation only.