Skip to content

Document event struct modules (fix ExDoc warnings)#3

Merged
mhsdef merged 1 commit into
mainfrom
docs/document-event-structs
Jun 30, 2026
Merged

Document event struct modules (fix ExDoc warnings)#3
mhsdef merged 1 commit into
mainfrom
docs/document-event-structs

Conversation

@mhsdef

@mhsdef mhsdef commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

mix docs emitted ~30 warnings of the form "documentation references type Segmentry.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, and Segmentry's @type segment_event plus every Segmentry.Analytics spec reference their t() types. ExDoc can't link a type whose module is hidden, hence the warnings.

Changes

  • Add a concise @moduledoc to each of the seven event/context structs, linking to the relevant Segment spec.
  • Group them under "Event structs" in the docs sidebar (groups_for_modules in mix.exs) so the module list stays tidy.
  • The internal Segmentry.Analytics.Types helper stays @moduledoc false — nothing public references it.

Verification

  • mix docs0 warnings (was ~30).
  • mix format --check-formatted clean.
  • mix test → 75 passed.

No behavior change — documentation only.

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>
@mhsdef mhsdef self-assigned this Jun 30, 2026
@mhsdef mhsdef merged commit d326766 into main Jun 30, 2026
8 checks passed
@mhsdef mhsdef deleted the docs/document-event-structs branch June 30, 2026 17:00
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.

2 participants