Tiny v0.2.0 - The Lockfile and Tooling Update
Tiny v0.2.0 - The Lockfile and Tooling Update
This major update introduces the lockfile system for reproducible builds, significant performance optimizations through dependency caching, and a vastly improved developer experience with documentation hovers and smarter LSP integrations.
Dependency Management and Lockfiles
The package management system has been overhauled to provide better stability and performance.
- Lockfile Support: Introduction of
tiny.lockto track and pin exact dependency versions. This ensures consistent builds across different machines by resolving unpinned versions to a fixed state. - Dependency Caching: The installation process now checks for cached versions of libraries. This skips redundant downloads and prevents unnecessary rebuilds of native plugins.
- Target-Aware Installation: Native plugin dependencies are now tracked by target architecture (e.g., windows-amd64, linux-amd64), ensuring that cached assets match the current execution environment.
- Package Ignore Rules: Added an
ignorefield totiny.json, allowing developers to exclude files and directories (such as documentation or tests) from distribution packages using glob patterns.
LSP and Developer Tooling
The language server has been enhanced with features typically found in mature ecosystems.
- Documentation Hovers: The LSP now extracts
//comments preceding declarations. These are displayed as formatted Markdown hovers when inspecting functions, classes, interfaces, and enums. - Context-Aware Completions: Improved object literal completions. The LSP now understands when the cursor is inside an object being passed to a function or assigned to a typed variable, offering precise key suggestions even when using quoted string keys.
- Enhanced Stubs: Standard library stubs have been updated with comprehensive documentation comments, providing immediate context for built-in functions during development.
- Signature Intelligence: Improved parameter inference for functions with default arguments.
Compiler and Language Features
The compiler and parser received updates to expand the language's expressiveness.
- Array Default Parameters: Functions can now define array literals as default values for parameters.
- Obfuscated Bytecode Metadata: Function names are now XOR-obfuscated within the
.tbcstream, matching the protection level of strings and binary assets. - Bytecode Versioning: Bytecode version bumped to
21to support new metadata structures.
Runtime and Standard Library
Critical stability fixes and behavior refinements have been implemented.
- Stack Integrity Fixes: Resolved a bug in
process.setEnvandprocess.unsetEnvwhere the VM stack was left in an inconsistent state. These functions now correctly push anullreturn value. - Return Type Enforcement: Class methods now strictly preserve and enforce their declared return types at the bytecode level.
- Standard Library Documentation: Added documentation comments to all standard library stubs for better discoverability.
Maintenance and Testing
- Version Bump: Tiny version updated to
0.2.0. - Regression Coverage: Added comprehensive tests for lockfile generation, dependency caching, object literal completion contexts, and array default parameter parsing.
- Cleanup: Refined the
copyDirectorylogic to support recursive ignore patterns.
Note: This update changes the bytecode format. All existing .tinycache and .tbc files should be recompiled.