All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Unified IR Pipeline: Complete DAG-based compilation pipeline with symbol tables and dependency graphs
- Two-Phase Compilation: Analysis phase builds global symbol table, synthesis phase generates code with full dependency knowledge
- Special Case Registry: TOML-driven configuration system for edge cases, eliminating all hardcoded special logic
- Module Registry: Centralized module resolution with lexical scoping and cross-module dependency tracking
- Compilation Unit: Intermediate representation between analysis and synthesis phases for clean separation of concerns
- Pattern-Based Module Aliases: Intelligent module alias generation (e.g.,
metav1,corev1,storagev1) to avoid naming conflicts - Consistent mod.ncl Structure: Every directory now includes a
mod.nclfile that imports all types in that directory
- Major Architecture Overhaul: Migrated from ad-hoc processing to structured two-phase compilation with proper symbol tables
- Module System: Complete rewrite with hierarchical
mod.nclgeneration and proper import hoisting - Import Resolution: All imports now hoisted to module level, eliminating inline imports throughout generated code
- Import Paths: All import paths now use consistent
mod.nclstructure (e.g.,../core/v1/mod.nclinstead of../core/v1.ncl) - Module Alias Generation: Replaced hardcoded if-else chains with pattern-based alias extraction from import paths
- Special Cases: Moved all K8s and Crossplane special handling from code to declarative TOML configuration files
- Directory Structure: Eliminated redundant subdirectories in package generation (e.g.,
crossplane/apiextensions.crossplane.io) - Test Infrastructure: Moved test package generation to system temporary directory instead of cluttering examples folder
- Code Quality: Removed ~300 lines of legacy code, fixed all compilation warnings and clippy lints
- Error Types: Large PipelineError variants now boxed to reduce stack allocation pressure
- K8s Core Type Imports: Fixed incorrect import paths for TypedLocalObjectReference, PodTemplateSpec, and other core types
- Duplicate Module Variables: Resolved naming conflicts by using unique module aliases (metav1, corev1) instead of duplicate v1Module declarations
- Cross-Module References: Properly resolved through two-phase compilation and dependency analysis
- Import Path Consistency: All imports now use proper relative paths calculated via ModuleRegistry
- Circular Dependencies: Added detection and proper error reporting via petgraph
- Test Failures: Fixed naming convention tests, module registry tests, and snapshot tests
- Memory Safety: Eliminated all
unwrap(),expect(), andpanic!()calls in favor of proper Result types - Memory Optimization: Reduced PipelineError stack footprint from 184 bytes to ~16 bytes by boxing large error variants
- Clippy Warnings: Fixed all warnings including
needless_borrow,manual_flatten,vec_init_then_push, and function argument count issues - Code Quality: Fixed all clippy warnings including
result_large_err,derivable_impls, andshould_implement_trait - Error Handling: Improved error message formatting and Display implementations for better debugging experience
- Hardcoded Logic: Eliminated all hardcoded K8s and Crossplane special cases (now in TOML configuration)
- Inline Imports: All imports now properly hoisted to module level
- Hardcoded Module Aliases: Replaced with pattern-based extraction from import paths
- Recursive Type Discovery: Replaced hardcoded namespace lists with intelligent recursive discovery that automatically finds all referenced types
- Comprehensive Type Coverage: Expanded from 199 to 321 Kubernetes types through recursive discovery including versioned APIs (v1alpha1, v1beta1, v2)
- Support for unversioned k8s types (e.g.,
RawExtension,IntOrString) placed in v0 directory to avoid conflicts - Reserved keyword escaping for field names starting with
$(like$ref,$schema) in generated Nickel code
- Required Field Usability Issue: Made all fields optional by default to enable gradual object construction (e.g.,
k8s.v1.LabelSelector & {}now works) - Cross-Package Import Resolution: Fixed imports to use full package IDs from manifest configuration instead of bare package names
- Missing type references (e.g.,
RawExtension,NodeSelector) now properly discovered and generated - Cross-version imports for unversioned runtime types (v0 → other versions)
- Syntax errors from unescaped special field names in JSON Schema types
- Reserved keyword escaping in JSON object field names within default values
- Breaking: All generated fields are now optional by default instead of required, enabling practical usage patterns
- k8s type extraction now uses seed-based recursive discovery instead of fixed namespace lists
- Updated to Kubernetes v1.33.4 schema version (from v1.31.0)
- Unversioned types are placed in v0 to distinguish from versioned APIs
- Enhanced import logic handles both v1 core types and v0 unversioned types
- Package imports now use full package IDs like
"github:seryl/nickel-pkgs/pkgs/k8s_io"for consistency
- Recursive Type Discovery: Replaced hardcoded namespace lists with intelligent recursive discovery that automatically finds all referenced types
- Comprehensive Type Coverage: Expanded from 199 to 321 Kubernetes types through recursive discovery including versioned APIs (v1alpha1, v1beta1, v2)
- Support for unversioned k8s types (e.g.,
RawExtension,IntOrString) placed in v0 directory to avoid conflicts - Reserved keyword escaping for field names starting with
$(like$ref,$schema) in generated Nickel code
- Required Field Usability Issue: Made all fields optional by default to enable gradual object construction (e.g.,
k8s.v1.LabelSelector & {}now works) - Cross-Package Import Resolution: Fixed imports to use full package IDs from manifest configuration instead of bare package names
- Missing type references (e.g.,
RawExtension,NodeSelector) now properly discovered and generated - Cross-version imports for unversioned runtime types (v0 → other versions)
- Syntax errors from unescaped special field names in JSON Schema types
- Reserved keyword escaping in JSON object field names within default values
- Breaking: All generated fields are now optional by default instead of required, enabling practical usage patterns
- k8s type extraction now uses seed-based recursive discovery instead of fixed namespace lists
- Updated to Kubernetes v1.33.4 schema version (from v1.31.0)
- Unversioned types are placed in v0 to distinguish from versioned APIs
- Enhanced import logic handles both v1 core types and v0 unversioned types
- Package imports now use full package IDs like
"github:seryl/nickel-pkgs/pkgs/k8s_io"for consistency
- Fixed missing cross-version imports in k8s_io packages (e.g., v1alpha1/v1beta1 types now properly import ObjectMeta, Condition, etc. from v1)
- Consolidated duplicate
handle_k8s_core_importimplementations between lib.rs and main.rs
- Test suite for cross-version k8s type imports to prevent regression
- Smart workspace dependency management tool (
workspace-deps) for switching between local and remote dependencies - Python-based version bump tool (
version-bump) for reliable version management - Python-based tooling infrastructure in
nix/packages/for better maintainability - SmartError pattern for actionable error messages in development tools
- Replaced hardcoded dev-mode script with dynamic workspace dependency discovery
- Updated release script to use new Python-based version-bump tool
- Improved development environment by removing unnecessary cargo tools (cargo-workspaces, cargo-release)
- Fixed Python linting issues by using shell wrapper approach
- Test fixture inclusion in Nix builds with custom source filter
- Workspace dependency publishing workflow for crates.io
- Release script version bumping now works correctly
- BREAKING: Changed package output directory from
packages/topkgs/ - BREAKING: Updated base package ID to
github:seryl/nickel-pkgs/pkgsto match nickel-pkgs structure - Updated manifest to use latest stable versions: Kubernetes v1.33.4, Crossplane v2.0.2
- Validation now exclusively uses the Nickel CLI binary, not the library
- nickel-with-packages is exposed in flake for external users
- Removed nickel-lang-core dependency to avoid API instability issues
- Simplified Nickel validation tests to use CLI instead of library API
- Fixed compilation errors with external projects using amalgam
- Enhanced fingerprinting to properly detect version changes in manifests
- URL sources now properly lock to specific versions instead of tracking main branch
--versionflag to display amalgam version information- Workspace metadata for crane to silence warnings
- CI can now be disabled via GitHub repository variable
ENABLE_CI(disabled by default)
- Updated GitHub Actions to use latest versions (upload-artifact v4, install-nix-action v30)
- Resolved all clippy warnings and formatting issues
- Added missing k8s-openapi dependency to amalgam-daemon
- Fixed redundant guards and iterator usage in dependency analyzer
- Corrected file extension checking to use
is_some_and
- Made CLI command optional to support version flag without subcommand
- GitHub Actions workflow for Nix flake CI/CD with devshell integration
- Support for
--package-pathoption in validation command for local package resolution - Generic package dependency resolution using manifest-based registry
- Git ref tracking for URL-based package sources (e.g.,
v1.17.2) - Package fingerprinting with SHA256 for intelligent change detection
- Comprehensive test suite for manifest generation
- Library interface (
lib.rs) for better testing support
- BREAKING: Package dependencies now always use Index format instead of Path
- All packages reference upstream repositories via
'Index { package = "...", version = "..." } - Removed special-case handling for k8s_io, crossplane, and other packages
- All packages reference upstream repositories via
- Updated reqwest from 0.11 to 0.12 (workspace-wide)
- Improved manifest generation with metadata preservation in comments
- Validation now uses absolute paths for nickel binary resolution
- CI pipeline now uses
ci-runnercommand from devshell
- Duplicate hyper and h2 dependency versions resolved
- Reserved keyword escaping in generated Nickel code
- Import resolution for k8s core types
- Package validation with proper NICKEL_IMPORT_PATH environment variable
- Hardcoded package ID generation for specific packages
- Local Path dependencies in favor of Index dependencies
- Unused test directories and duplicate files in examples/
- Core amalgam functionality for generating Nickel packages from:
- Kubernetes CRDs
- OpenAPI specifications
- Go type definitions
- Manifest-based package generation system
- Incremental compilation with fingerprinting
- Support for complex type mappings and imports
- Package validation with Nickel typecheck
- Vendor management system