gleam icon indicating copy to clipboard operation
gleam copied to clipboard

New "private members in public API" check fails for re-export

Open rawhat opened this issue 10 months ago • 0 comments

Hello!

Just testing the v1.1 RC against some of my repos. In mist I am re-exporting some types from an internal module in my public main module. I added some documentation comments to them just so it's not quite so opaque.

Unfortunately, the new check marks those as a warning. Example:

/// Re-exported type that represents the default `Request` body type. See
/// `mist.read_body` to convert this type into a `BitString`. The `Connection`
/// also holds some additional information about the request. Currently, the
/// only useful field is `client_ip` which is a `Result` with a tuple of
/// integers representing the IPv4 address.
pub type Connection =
  InternalConnection

The errors come from public functions that actually use this type. I've been trying to avoid the whole "make a new type to export and convert between them" where possible. I suspect this would/will be an issue if we ever get constructor re-exports as well.

rawhat avatar Apr 09 '24 13:04 rawhat