Skip to content

feat: warn users when template deviates from actual variables #9

Open

Description

@aosasona

The dotenv package in Deno has a cool feature where it checks the output example env (e.g. .env.example) and warns you if it is different from your current environment file (.env or whatever you are using), would be cool to add this!

Need to check for:

  • .env.example
  • {file}.example

this is not set in stone yet

Activity

  1. changed the title [-]Warn users when template deviates from actual variables[/-] [+]feat(v1): warn users when template deviates from actual variables[/+] on Apr 5, 2024
  2. changed the title [-]feat(v1): warn users when template deviates from actual variables[/-] [+]feat: warn users when template deviates from actual variables[/+] on Jun 2, 2024
  3. devlulcas commented on Jul 29, 2025

    @devlulcas

    thats pretty interesting, is this being implemented?

  4. aosasona commented on Jul 29, 2025

    @aosasona
    OwnerAuthor

    thats pretty interesting, is this being implemented?

    @devlulcas Unfortunately not yet. I haven't written Gleam in almost two years now. Perhaps when I do again, I will find cause to finally work on this. Happy to merge a PR if you're interested though!

  5. yanshuy commented on Jun 28, 2026

    @yanshuy

    I've opened a reference implementation in #37.

    It implements support for warning when variables defined in {path}.example are missing from the loaded environment.

    One question I'd appreciate feedback on:

    • Should this be configurable via a check_example: Bool option? this would be a breaking change.
    • Or should the check happen automatically whenever a {path}.example file exists?

    Happy to go either way.

  6. aosasona commented on Jul 18, 2026

    @aosasona
    OwnerAuthor

    Hi @yanshuy

    Sorry for the late response but I am not getting updates from GitHub for whatever reason, the breaking change is fine, I will bump the version to indicate it, and optionally, people can stay/rollback to a version of this library without the feature should they prefer that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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