Melange v0.4.0 - Preview
The final pre-release before v1.0.0, restructuring the project for language-agnostic use and multi-language client support.
What’s Next
This is the final pre-release. The next version will be v1.0.0, marking the first stable release of Melange.
Highlights
Language-Agnostic Restructuring
Major reorganization to support multiple target languages:
- Go runtime extracted into a dedicated
melange/module with minimal dependencies - Tooling split into
pkg/(public API) andinternal/(implementation details) - Schema package moved into tooling as a subpackage
This separation keeps the runtime lightweight while allowing the tooling to support code generation for any language.
Multi-Language Client Generation
New generate client CLI subcommand with a pluggable generator registry. This enables generating type-safe authorization clients from your schema for multiple target languages.
Go-Driven SQL Generation
Refactored SQL generation from text templates to a Go-driven DSL approach. The new sqlgen package builds SQL programmatically with typed column references and a feature-driven builder pattern, improving maintainability and correctness.
CLI Rewrite with Config File Support
The CLI has been rebuilt with Cobra/Viper, adding support for melange.yaml configuration files. Common settings like schema path and database URL can now be configured once instead of passed on every command.
Doctor Command
New doctor CLI command for health checks on your authorization infrastructure.
Automated Releases
GoReleaser integration for automated binary builds and releases.
Other Improvements
- Simplified schema path configuration (single
schemaoption replacesschema/schemas_dir) - Fixed exclusion handling for wildcard and complex closure relations
- GitHub Actions test pipeline
- Expanded documentation
