Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature Request: Add configuration option to suppress "will treat types as any()" messagesΒ #35

@dogweather

Description

@dogweather

Hi! First, thank you for creating Domo - it's a great library that helps ensure type safety in Elixir applications.

Feature Request

I'd like to request a configuration option to suppress the compile-time message:

Domo will treat the following types as any() globally: Ecto.Schema.Metadata.t().

Motivation

While I appreciate the transparency about which types Domo cannot fully validate, seeing this message on every
compilation creates "warning fatigue." This is a well-documented phenomenon where developers become desensitized to
warnings when they see the same benign messages repeatedly. In critical systems, this has led to real incidents
where important warnings were missed because operators had grown accustomed to ignoring routine messages.

As developers, we should own our developer experience. When we've acknowledged that certain types will be treated as
any() and configured them appropriately with remote_types_as_any, we should have the option to silence the
informational message.

Proposed Solution

Add a configuration option like:

  config :domo,
    remote_types_as_any: [{Ecto.Schema.Metadata, :t}],
    suppress_type_treatment_messages: true  # New option

This would:

  • Still treat the specified types as any() (current behavior)
  • But suppress the compile-time informational message
  • Default to false to maintain current behavior for existing users

Benefits

  1. Cleaner compilation output
  2. Reduced warning fatigue
  3. More attention paid to actual warnings that need action
  4. Developers maintain control over their console output

Would you be open to a PR implementing this feature? I'd be happy to contribute if you think this aligns with the
project's goals.

Thanks for considering this request!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions