Skip to content

Prevent publishing packages with empty modules. #4093

@hayleigh-dot-dev

Description

@hayleigh-dot-dev

Empty modules are "valid" Gleam in the sense they won't block compilation, but they are useless for a package to publish because they don't do anything! I can see two scenarios for why a package might have been published with empty modules:

  1. to stub out the package's API before it is complete.
  2. as a mistake

The first scenario is confusing for users and will waste folks' time as they work out what parts of the API actually exist. The second scenario is an unfortunate accident that the compiler could have prevented!

I propose Gleam refuses to publish any package if it contains empty modules, and emits warnings when building a project with empty modules.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions