Releases: ozanh/ugo
Releases · ozanh/ugo
v0.4.0
What's Changed
Version 0.4.0 by @ozanh in #26
- Added Go 1.20 to GitHub workflow.
- Added new call API with
NameCallerObject
andExCallerObject
interfaces. - Added new OpCode CALLNAME for the method call.
- Added Invoker to run CompiledFunction and any other callable by using new call API.
- Refactored builtins and stdlib for new call API.
- Added methods to time object.
- Added deprecation notices to some time module functions in favor of methods.
- Added registry package to let external packages register their types to convert from/to Go types.
- Registered stdlib modules’ types with registry package on init.
- Preserved backward compatibility of source code, but encoded byte code will not work on versions less than v0.4.0 due to added OpCode.
- Added new functions to the strings module, which accepts any callable.
- Refactored mkcallable for new API to generate wrappers.
- Fixed string formatting of built-in types, which affected prints.
- Fixed a parser bug.
- Fixed minor issues and typos.
- Updated copyright year.
Full Changelog: v0.3.2...v0.4.0
v0.3.2
v0.3.1
v0.3.0
v0.2.3
v0.2.2
v0.2.1
Changelog
Features
- Shebang line is parsed as a comment with ugo CLI program
- Added helpers in
importers
package to comment Shebang in scripts/modules
Changes
- Replace github.com/c-bata/go-prompt with github.com/peterh/liner for REPL
- Remove overlooked unnecessary OpNull instruction from the return statement in compiler
Full Changelog: v0.2.0...v0.2.1
v0.2.0
Changelog
Features
- Add
json
module to stdlib - Move ugodoc package from ugodev repository to cmd/ugodoc package
- Add file module import feature to
ModuleMap
usingFileImporter
in importers
package - Add file module import feature to ugo CLI (cmd/ugo)
- Add new interfaces IndexDeleter and LengthGetter to be used in builtin
delete
andlen
functions - Add
mkcallable
in cmd/mkcallable package to generare wrapper helper
functions to check the number of arguments and convert to required types provided
with a function signature in comments. See stdlib/stdlib.go as an example.
Changes
- Improve github workflow to build and test with Go 1.15, 1.16, 1.17 and 1.18
and Linux, macOS, and Windows - Remove golint linter from Makefile
- Improve Compiler to handle provided global symbols
Undefined
's type is exported to be used in type switches in other packages- Export mutex methods of
SyncMap
for other packages - Remove context from Optimizer for simplicity and other minor API changes
Breaking Changes
- Move encoding library to a separate package, encoder with a new API.
- Rename type names including dash (-) e.g. sync-map, compiled-function to
syncMap, compiledFunction. - time.Location is not embedded but has a field name
Value
in Location type in
stdlib/time. - Map is not embedded but has a field name
Value
in SyncMap type. - Generated functions using
mkcallable
are used in ugo and stdlib packages and
they use generic converters which may break the backward compatibility of some
programs. - Some structs used in Compiler are not exported for simplicity and clarity.