Skip to content

Switch to official YAML extension by default#1678

Open
krystof-k wants to merge 21 commits intomarcoroth:mainfrom
cloudaper:support-yaml-config-extension
Open

Switch to official YAML extension by default#1678
krystof-k wants to merge 21 commits intomarcoroth:mainfrom
cloudaper:support-yaml-config-extension

Conversation

@krystof-k
Copy link
Copy Markdown

@krystof-k krystof-k commented Apr 23, 2026

Love the work you're doing on Herb — it's a great tool and I'm enjoying using it!

I ran into a small friction point: when I created .herb.yaml instead of .herb.yml, it didn't work — it was actually actively rejected with an error asking me to rename it. Since .yaml is the official YAML extension, it should be the supported (and preferred) variant.

This PR:

  • Removes the .herb.yaml rejection
  • Supports both .herb.yaml and .herb.yml across all three runtimes (JS, Ruby, Rust)
  • Prefers .herb.yaml over .herb.yml if both exist (since it's the official extension)
  • Updates all user-facing strings, docs, READMEs and --init
  • Fully backwards compatible — existing .herb.yml files continue to work without any changes
  • Tests updated across all three languages, including precedence tests

Hope this absolutely unimportant but preventing-many-confusions change will be helpful!

krystof-k and others added 20 commits April 23, 2026 13:25
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Kryštof Korb <krystof@korb.cz>
Copy link
Copy Markdown
Owner

@marcoroth marcoroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @krystof-k, thanks for the pull request.

I have been following the convention established by most Ruby tools and configuration files that also Rails ships with, which all use .yml.

So I'm not sure if we should be using .yaml, as that might be unusual and unexpected for most users.

@krystof-k
Copy link
Copy Markdown
Author

Hi @marcoroth, so at least someone needs to have it right ;)

Jokes aside, fair point — I understand the Ruby/Rails convention around .yml. My thinking here was less about forcing a switch and more about reducing friction: .yaml is the official YAML extension and some people (like me) reach for it first and are surprised it doesn't work. Supporting both feels like the least surprising behavior, while keeping full backwards compatibility with existing .yml files.

Whether Herb should prefer .yaml in generated examples/docs is totally your call. I intentionally kept those changes isolated in a separate commit so they can be reverted easily.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants