Releases: julelang/jule
Jule 0.2.1
jule
- redesign: deferred scopes
- redesign: pass directives
- redesign:
exceptionalsas fallible functions
julec
- julec: add the
--tagscompile option - julec:
#disable nilptrdisables nil-check for anonymous functions - julec:
#disable boundarydisables boundary-check for slice expressions - julec: rename the
--opt-exceptionalcommand-line option as--opt-fallible - julec: fix
errorpluralization in error count message (#154, thanks to @pgmtx) - julec: fix
breakstatements in select statements can lead to compilation problems due to the lack of a jump-label - julec: fix code-line pointer computation of logger to prevent incorrect positioning or negative repeat count panics in
strings::Repeat - julec: fix nil-check performed when calling a method that has a reference pointer receiver on a smart pointer and in
#disable nilptrscope - julec: fix
--opt-exceptionalmay apply forwarding optimization in the wrong place - julec: fix binary have undefined behavior with no output when compiled for test with no test functions
- julec: improve and optimize float arithmetic
- parser: fix empty generic type list may cause crash
- parser: fix an edge case where expression of a variable declaration assignment placed on the next statement may cause segfault (thanks for pointing to the issue, @PHandradee)
- parser: fix an edge case where expression of a short variable declaration assignment placed on the next statement may cause segfault
- parser: disallow tuple expressions in while and while-next iterations
- parser: fix the error keyword is considered syntax error in assignment statements
- parser: fix missing type error is silently ignored in function return type declarations
- sema: fix import path analysis may log an invalid import path error for import path without a submodule
- sema: fix
Scope.ChildIndexis not set for error-forwarding expressions - sema: fix blank identifier may trigger duplicated identifier error when used in global scope multiple times
- sema: fix goto statements can lead to false positive results in missing return statement analysis
- sema: fix when the builtin
appendfunction is used with incompatible types, such as(dest=[]str,src=[][]str...), the runtime implementation is instantiated, and relevant internal implementation error will show up along with the type error
std
- add: std/jule/resource
- builtin: update documentation and behavior constraints of
ponic - std/bufio: remove
ErrBufferFull - std/comptime: add
IncludeStrandIncludeBytes(#128) - std/comptime: rename
comptimeDecl.ExceptionalascomptimeDecl.Fallible - std/conv: fix
ParseCmplxerror may be invalid - std/encoding/base64: reimplement
- std/encoding/csv: reimplement
- std/encoding/json: fix
Validmay reporttruefor some invalid JSON encoding - std/encoding/json: fix struct decoding may ignore some fields due to escape sequences in key literals
- std/encoding/json: fix the decoder may scan invalid data as if it were valid, or make scanning errors on valid data
- std/errors: reimplement
- std/integ/c: add
SSize,ConstChar - std/io: reimplement EOF handling
- std/jule/importer: add
CompileInfo.Tags - std/jule/sema: add
ST_ERROR_HANDLER - std/jule/sema: add
GetFile,IncludeFile, andIncludedFilemethods toImporter - std/math/big: add
Int.Rem,Int.SetBytes,Int.FillBytes,Int.Bytes,Int.AppendBytes - std/net:
TCPConn.Readwill not close the connection automatically when reached to EOF - std/os: add
File.RawFD,File.SetReadDeadline,File.SetWriteDeadline - std/os: add
Cmd.Kill - std/os: fix
Cmdignores given stderr file and uses stdout as stderr - (linux) std/sys: add
Fstat - std/unicode: reimplement with Unicode 17.0.0
API
- rename:
exceptional.hppasfallible.hpp - rename:
__jule_VoidExceptionalas__jule_VoidFallible - rename:
__jule_Exceptionalas__jule_Fallible
Legacy Support
This release includes mostly significant changes. Some of Jule's standard library packages have been reimplemented. The handling of EOF (end of file) status for I/O operations is based on errors, not read counts. Some of the C++ API declarations have been renamed.
Also, deferred scopes have been redesigned and behave differently. Therefore, if you have a program with deferred scopes, its behavior may be very different than before.
Jule 0.2.0
jule
- rename:
cppkeyword asextern - rename:
bindterm of the Integrated Jule asextern - add: async runtime and update to the new concurrency model
- add: assignment and short variable declaration support for select statements
julec
- add: the
--COMAXPROCScommand-line argument - add: Assembly file support for extern use declarations
- remove: support for C++ versions
cpp14andcpp17 - update: default C++ version to
cpp20 - fix: code generation for single-case select statements
- fix: code generation for channel receive and send may be invalid when optimizations applied
- fix: deferred calls may not be executed before exceptional forwarding
- fix: use expression in exception handler scopes may ignore dynamic type casting
- fix: type-enums might be casted to a dynamic-type like non-dynamic types and cause dynamic type issues
- fix: the
--opt-stroptimization flag may cause segfault or unexpected results - parser: fix void function type handling in expressions
- sema: fix tuples allowed in type inference of generic constraints
std
- remove:
std/jule/integrated - add:
std/integ - add:
std/integ/c - add:
std/testing/iotest - reimplement:
std/encoding/base32 - reimplement:
std/math/big - runtime: reimplement channels and select statements
- runtime: add
Yield,COMAXPROCS,Blocking - (windows) runtime: fix
nanotimeworks inconsistent - std/bufio: update as async-first
- std/bufio: add
Reader,Writer - std/io: update as async-first
- std/io: add
ReadSeeker,WriteSeeker,ByteScanner,RuneScanner,ReadWriteSeeker,ReaderFrom,MultiReader,LimitedReader,NopCloser - std/io: rename
StreamasReadWriteCloser - std/io: remove
LimitReader - std/jule/build: add
AssemblyExts,IsValidAssemblyExt - std/jule/mod: fix unsafe string handling causes dangling memory
- std/net: update as async-first
- std/net: add
RawFDtoConn,TCPConn,UDPConn - std/net: use the system's maximum backlog by default for
TCPListener - std/os: update as async-first
- std/slices: add
Grow
API
- fix:
—disable-safetymay cause compile errors __jule_Ptr: fix the memory leak caused by rvalue handling
Legacy Support
This release is almost entirely breaking. Jule's concurrency model has been completely redesigned, and a new runtime model has been introduced. Common operations such as I/O are no longer sync-first and thread-friendly; instead, they are designed to be async-first by default. This means that using std/io and all related packages largely requires running under the async runtime.
In addition, with the new coroutine model, the OS thread has become merely a tool used by the runtime, not for developers. The co keyword creates a coroutine now, not a thread. For this reason, if you have a concurrent program, its behavior may be very different from before.
Jule 0.1.7
Language
- add: module names
- add: the tilde
~operator - add the
nilptrargument to thedisabledirective - add:
uintptrcasting support for functions (low-level programming purposes) - runtime: channels are optimized for high-frequency messaging
- remove:
&,|,^,<,<=,>=and>operators for enums - update: the new
buildcommand compiles a program instead of implicit compile commands
Compiler
- fix: define ordering may iterate infinitely when bind dependency exist
- fix: context data pointer is missing for entry point call when entry point used as anonymous function
- fix: the
--opt-mathoptimizations does not play well with complex numbers - fix: the
mod initcommand overwrites existing module file - rename: the
julenvcommand asenv - improve: the
helpcommand - update: compiler generates output with name
mainby default - parser: fix constant bind variables allowed
- sema: fix variable shadowing analysis
- sema: improve missing return statement analysis for select statements
- sema: improve and fix missing return statement analysis for goto statements
Standard Library
- runtime: add channel type support to the built-in
capfunction - runtime: add map type support to the built-in
makefunction - runtime: fix bind type may cause compile errors when used in built-in string conversion
- runtime: fix reserved Str function will not be handled if value is nil when using built-in string conversion
- std/io: add
ReadAtLeast, andReadFull - std/jule/constant: reimplement API
- std/jule/constant: fix
Const.Divdoes not reports false for divide-by-zero on complex numbers - std/net: add
IPAddr,ParseIP,Resolver,DefaultResolver, andDNSError - std/net: add DNS and port resolve to
TCPAddr.ResolveandUDPAddr.Resolve - (windows) std/net: fix timeout support of
TCPConnandUDPConn - std/net: timeout precision is milliseconds and limited with 40 days for
TCPConnandUDPConn - std/os: add
Hostname - std/slices: add
SortStableFunc - std/sync/atomic:
CompareAndSwaptakes separate memory ordering for success and fail - syd/sync/atomic: add
CompareAndSwapWeak - (macOS) std/sys: fix
GetsockoptandSetsockoptsyscalls - (linux) std/sys: fix
Setsockoptsyscall - std/time: add
Time.UnixMilli,Time.UnixMicro,Time.UnixNano
API
- reimplement
jule::Str: fix string equality comparison for strings with zero-bytesjule::Ptr: fix reference-counting
Legacy Support
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Renaming and reimplementations on the standard library
- New API
Jule 0.1.6
Language
- jule: add the
exportfile tag compiler directive - jule: add the short function literals
- jule: add exceptional forwarding operator
- jule: add the
disabledirective - jule: add the
integer, andcmplxgeneric constraints - jule: add generic type support to strict type aliases
- jule: update module behavior and import paths
- jule: update reference variables to reference pointers
- jule: update receiver parameter syntax
- jule: remove the
statickeyword and update logic of static declarations - jule: allow variable shadowing for anonymous functions
- runtime: fix hash implementation may crash with segfault
Compiler
- various optimizations, improvements and bug fixes
- remove: the
--opt-std-math-cmplxoptimization flag - add: the
--opt-variadicoptimization flag - fix: exception forwarding optimization may optimize non-forwarding expressions as forwarding
- fix: code generation for string literals may represent bytes wrong such as zero-byte
- fix: function call data handling of concurrent calls
- fix: handling of
errorvariable captured for closure - fix: optimizations on next-statement of the while-next iteration may remove the iteration completely
- improve: error handling for type aliases, use type alias name as type-name even for soft type aliases
- parser: fix binary operator handling may handle map type declarations as expressions
- parser: fix variable declaration without type declaration and expression allowed
- parser: fix pointless else block allowed
- parser: switch to scan-based parsing for expressions
- sema: fix dynamic type annotation of generic function calls may leave some types unresolved
- sema: fix some comptime methods returns typed constant expression instead of untyped
- sema: push nil value for implicit empty variadic expression instead of zero-size slice allocation
- sema: fix anonymous functions will not collect references for the owner scope
- sema: fix missing return statement of non-void function scopes might be ignored
- sema: fix missing return statement may cause crash if source code have semantic errors
- sema: fix analysis of bind functions
- sema: fix and improve dynamic type annotation for generic function calls
- sema: fix generic structure instances may remain unchecked after analysis
- sema: fix type compatibility analysis of the built-int append function
- sema: fix function calls with problematic typed parameters may cause crash
- sema: fix multiple-assign statement analysis may crash
- sema: fix import analysis may throw false internal-package access error
Standard Library
- various optimizations, improvements, bug fixes, and refactoring with API breaking changes
- std/jule/ast, std/jule/parser, std/jule/sema: reimplemented for new AST handling, AST and CAST output might be different
- std/fmt: reimplemented
- std/math/rand: reimplemented
- std/conv: add
ParseCmplx,FormatCmplx - std/jule/token: reimplemented
- runtime: fix runtime hashing algorithm does not supports
uintptrtype - runtime: fix runtime hashing algorithm handling memory addresses dangerously
- std/comptime: add
Hash,Source,ActualSourcemethods tocomptimeTypeInfo - std/encoding: remove
JSONEncoder,JSONDecoder - std/encoding/json: fix string literal validation
- std/encoding/json: omit empty value instead of null for nil slice and maps
- std/encoding/json: remove
EncodeJSONandDecodeJSONspecial methods - std/io: add EOF, WriteByte
- std/io: update EOF handling
- std/jule/parser: AST construction may be different
- std/math/cmplx: use native
cmplx128type instead customCmplxstruct - std/os: reimplemented
EnvasEnviron,Getenv,LookupEnv,Setenv - std/os: add
PathSeparator,PathListSeparator,IsPathSeparator - std/os/filepath: rename
IsPathSepasIsPathSeparator - std/sys: add
Addrcall - (windows) std/sys: add
LoadDLL,MustLoadDLL,Proc,DLL
API
jule::Slice<Item>: fix deallocation of slice will not set the slice pointer to nullptrjule::Str: fix deallocation of string will not set the slice pointer to nullptr
Legacy Support
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Renaming and reimplementations on the standard library
- Using reference variables with old semantics
- Using receiver parameters with old syntax
- Using static variables and methods with old semantics and syntax
- Using modules with old behavior and import paths
Jule 0.1.5
Warning
Builds are not statically linked for this version.
Language
- add: grouped constant variables
- add: tags for structure fields
- add: blank identifier support for global variables
- update: goto statement rules
- update: exceptional functions must be used alone
- update: all possible types of type-enums mut be handled in type-match statements
- update: all possible fields of enums mut be handled in match statements
- update: the built-in
copyfunction allows different types if actual types are equal - redesign: enums
- remove: default expressions of structure fields
Compiler
- update: use ThinLTO instead of FatLTO
- fix: strict aliasing optimizations of back-end compiler may cause unexpected behavior
- fix: the
--opt-copymay apply wrong optimizations for mutable values - fix: code generation for multi-return statements with dynamic types
- fix: code generation for captured anonymous function variables from multi-return variables
- fix: inherited type-enums considered valid type for type matching
- parser: fix binary expression operator handling
- parser: fix trailing invalid tokens ignored of use declarations
- sema: fix comptime (obtained by std/comptime) constant value handling for binary expressions
- sema: fix handling of untyped boolean values
- sema: fix evaluation may allow using of blank identifiers
- sema: fix using of non-existent enum field may cause crash during analysis
- sema: fix catching of duplicate package aliases
- sema: fix collection of references to runtime implementations such as slices and maps might be ignored if type source is a type alias
Standard Library
- add:
std/jule/directive - add:
std/jule/dist - add:
std/jule/log - std/comptime: add
comptimeDecl.Tags,comptimeDecl.Tag,comptimeDecl.IsTag - std/encoding/json: add structure field tag support
- std/encoding/json: fix HTML escape handling
- std/encoding/json: nesting depth set to 256
- std/encoding/json: fix the Decode function do not set destination array to zero for empty JSON arrays
- std/jule: add
Blank,Anon,IsBlank,IsAnon - std/jule/ast: add
Var.Group,Var.GroupIndex - std/jule/build: add
SetEnv,PathAPI - std/jule/build: remove
PathApi - std/jule/build: reimplement
PathStdlib,PathExec,PathWd - std/jule/build: remove directive relevant content because of new
std/jule/directivepackage - std/jule/build: remove dist relevant content because of new
std/jule/distpackage - std/jule/build: remove log relevant content because of new
std/jule/logpackage - std/jule/constant/lit: add
GetRune - std/jule/integrated: fix Windows UTF16 encoding/decoding
- std/jule/integrted: rename
U16PtrToStrasUTF16PtrToStr - std/jule/token: refactoring with reimplemented API
- std/jule/sema: remove
Flag - std/jule/sema: add
Default,Shadowing,RetState,Var.RetState - std/jule/sema: update the standard values of
Var.RetOrder - std/jule/sema: remove
EnumItem - std/jule/sema: add
Var.IsEnumField,Var.GroupIndex,Var.Group,Var.Iota - std/os: reimplement standard input/output (see #140)
- std/strings: add
Clone
API
jule::Str: fixoperator+=memory deallocation bugjule::Fnfix ctx-memory handling
Legacy Support
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Incompatibilities with the new exceptional handling standard
- Incompatibilities with the new
gotosemantics - Structure fields with default expressions
- Missing/unhandled cases for the enum/type-enum types in match statements
- Renaming and reimplementations on the standard library
Jule 0.1.4
Language
- add: 3-index slicing
- add: type assertion
- update: range iteration behavior of strings
- update: use arbitrary-big numbers for untyped constants
- update: floating-point division behavior
- update: casting works different for dynamic types
- update: type aliases are not considered cycle-risky for type aliases
- update: allow strict type aliases to type any for type enums
- update: strict type aliases to type-enum will not be inherited
- rename:
SmallestNonZerostatic field asSmallestNonzeroof thef64andf32 - remove: named field support of type-enums
Compiler
- numerous optimizations, fixes, and improvements
- fix: code generation for casting expressions from dynamic type to implicitly smart pointer types such as maps and channels
- fix: code generation of trait virtual table for implicitly smart pointer types such as maps and channels
- fix: code generation of dynamic type data for implicitly smart pointer types such as maps and channels
- fix: code generation will not generate iteration break-point for
for in []rune(s)iterations when--opt-iteroptimizations enabled - fix: code generation may be failed for declarative multi-assign expressions if
--opt-assignoptimizations enabled - fix: the
--opt-zcopyand--opt-zappendoptimizations may cause compile issues - fix: integer wrap around behavior might not be implemented in IR and might compile with undefined behavior
- fix: code generation for array comparisons
- fix: the
--opt-mathoptimizations may apply wrong optimizations - fix: code generation for exceptional handler scopes with no use declaration
- fix: location information handling for error messages
- (windows) fix: compiler does not adds
.exeextension if it is missing - (windows) fix: LTO support for Clang (it may cause compile errors with not-MinGW Clang)
- add:
tool targetscommand - update: catch invalid target pairs and complain with error
- token: fix carriage-return characters may cause infinite loop when tokenizing string literals
- token: fix
Fileset.GetRowignores final lines with no new-line - parser: fix function with errors may cause crash
- parser: reused directive causes errors instead of ignoring silently
- parser: fix unary operator handling of binary expressions
- parser: fix missing expressions in brace literal may cause crash instead of compiler error
- sema: untyped constant literals allowed in Safe Jule for binded types
- sema: fix value type determination may ignore the strict type alias sources when evaluation of array and structure literals
- sema: fix evaluation of binary expressions for
comptimeTypeInfo - sema: fix owner define will not reference to the struct if it used via type alias when evaluating expression
- sema: fix type-enums are not considered as mutable types
- sema: fix global variable referencing a function may cause crash due to analysis issue
- sema: fix and improve package analysis
- sema: fix implicit casting handling of the
errorcalls - sema: fix type compatibility checking for constant floating-point expressions
- sema: fix type compatibility checking may ignore whether type is strict type alias for functions
- sema: fix responsive type handling of the built-in append function
- sema: fix reference collection for types referenced from eval
- sema: fix handling of comparable array types
- sema: fix checking of the reserved main and initializer function signatures
Standard Library
- add: std/errors
- (windows) all: all MinGW dependencies are removed, standard library uses Windows API
- all: error handling model updated to latest recommended style
- (windows) runtime: fix #107
- runtime: fix deadcode analysis for mutexes
- runtime: fix the built-in
makefunction does not initialize all capacity (#133) - runtime: fix the built-in
appendfunction does not initialize all capacity if a new slice allocated (#134) - runtime: fix the runtime string conversion function cannot handle reserved
Strfunctions of can-nil types - runtime: smart pointer types supports using of element’s reserved
Strfunction - std/conv: reimplement
- std/jule/types: reimplement
- std/math/cmplx: reimplement
- std/os: reimplement
- std/bufio: add
Scanner.EOF - std/bytes: the split functions limits capacity of parts to its length
- std/comptime: remove
Kind(fields remain as constant variables) - std/encoding/csv: rename
Writer.UseCrlfasWriter.UseCRLF - std/encoding/json: fix
Validfunction reports false for some JSON inputs with spaces - std/encoding/json: fix
DecodeJSONreserved decoder function does not supports JSON objects or arrays - std/encoding/json: numerous minor fixes and improvements
- std/encoding/json: fix
Decodefunction throws UnexpectedToken error if JSON input have trailing spaces - std/encoding/json: fix invalid token may cause panic while decoding array or object (with map type)
- std/encoding/json: fix invalid token case may be reported with
DecodeError.InvalidValueinstead ofDecodeError.InvalidTokenwhile decoding object (with struct type) - std/encoding/json: fix invalid key may cause panic while decoding map
- std/encoding/json: add
Value,Object,Array,Bool,Number, andString - std/encoding/json: add dynamic decoding support
- std/math: minor fixes
- std/math: rename
NextAfter32asNextafter32 - std/math: rename
NextAfterasNextafter - std/math: rename
F64BitsasF64bits - std/math: rename
F32BitsasF32bits - std/math: rename
F64frombitsasF64frombits - std/math: rename
F32frombitsasF32frombits - std/math/big: rename Int.BitNot as Int.Not
- std/math/big: update
Int.Parsedefinition and behavior - std/math/big: add
Accuracy,Int.F64 - std/math/big: fix
Int.Parsedoes not catch invalid separators - std/io: add
ReaderAt,WriterTo,Seeker,WriteStr,ReadAll,LimitReader,SeekStart,SeekCurrent,SeekEnd,Copy,CopyBuffer, andDiscard,ErrShortWrite,ErrShortBuffer,ErrUnexpectedEOF,ErrNoProgress - std/jule/ast: remove
SubIdentType - std/jule/ast: add
TypeAssertionExpr - std/jule/sema: remove
TypeEnumItem.Ident - std/jule/sema: add
Type.SoftStruct,TypeAssertionExpr - std/jule/sema: remove
TypeEnumItem.Ident,TypeEnumItem.FindItem - (windows) std/os: fix long path support after Windows 10.0.15063
- std/os/filepath: update sign of
Abs - std/os/filepath: add
SplitList - std/slices: rename
FindasIndex,FindLastasIndexLast - std/strings: add
Reader - std/sys: reimplement
Errnoand relevant functions - std/testing: add
T.Logf - std/unicode: add
In,IsPrint
API
- remove:
jule::nil,jule::MAX_32,jule::MIN_F32,jule::MAX_F64,jule::MIN_F64,jule::MAX_I64,jule::MIN_I64,jule::MAX_U64variables - remove: the
jule::print,jule::println,jule::append,jule::__append,jule::copy,jule::__copyfunctions - add: the
__jule_print, and__jule_printlnfunctions - fix: slicing error gives length instead of capacity for capacity information
Legacy Support
This version is incompatible with source code written for previous versions, including Jule 0.1.3. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Incompatibilities with the new error handling standard
- Using dynamic types
- Renaming and reimplementations on the standard library
- Unexpected behavior in range iterations with strings
Jule 0.1.3
Language
- add: map and array literals with explicit type
- add: assertion casting for dynamic types
- update: the built-in
copyfunction now uses mutable slicing for destination arrays - update: deferred scopes
- update: trait memory model
- remove: static constant fields support of
implstatements and structures - remove: manual memory management options
- remove: the
deprecateddirective (see doc comments for deprecation)
Compiler
- numerous minor fixes, optimizations and improvements
- fix: thread runtime initialization
- fix: the
!=operator equals to the==operator for struct types in the object code - fix: code generation for implicit
==operator of struct types - fix: code generation for trait data of strict type aliases
- fix: code generation for postfix statements which uses map lookup as lvalue
- fix: the
--opt-deadcodeoptimizations removes trait methods of structures - fix: the
--opt-dynamicoptimization removes type safety for type casting when optimizing type-match statement case which have a previous case with fall statement - fix: code generation for concurrent function calls when parameter count collisions exist
- fix: initialization of runtime environment data
- fix: code generation for result data with channel type
- fix: code generation for raw pointer type metadata of dynamic types
- fix: code generation for trait virtual table of strict type aliases with smart pointer source type
- it may cause compilation problems with GCC before the patch (see CI of
261b80d)
- it may cause compilation problems with GCC before the patch (see CI of
- add: the
--opt-zcopyand--opt-zappendoptimization flags - improve: the
--opt-deadcodeoptimization removes the following statements after empty select statements - improve: The
--opt-accessoptimization removes the boundary analysis of expressions likearray[i&(len(array)-1)]for arrays whose length is power of two - improve: code generation for select statements
- improve: error messages, with contributions by @adamperkowski (#123)
- parser: fix nested smart pointer types (like
&&int) have nilTokenfield - parser: fix (#119, thanks @puni073 for pointing to the issue) and improve handling of function declarations
- parser: catch repetitive ignoring of an exceptional like
foo()!!! - parser: fix scope analysis will generate error for expression which is already logged
- parser: fix unsafe namespace support of type analysis
- sema: fix interior mutability analysis for structure copy assignments
- sema: fix
implstatement handling for structures - sema: fix strict type alias source type analysis
- sema: fix mutability and comparable state analysis of types
- sema: fix type cycle analysis
- sema: fix map types are not considered as mutable even with mutable key/value type
- sema: fix map indexing expressions considered lvalue
- sema: fix analysis and handling indexing support of comptime types
- sema: fix type inference analysis of untyped slice literals
- sema: fix analysis of strict type alias structures, and type-enums for casting
- sema: fix cycle and type analysis of type-enums
- sema: fix reference handling of scope variables
- sema: fix type safety analysis of unsafe pointer (
*unsafe) type - sema: fix mistyped values may cause crash when evaluating sub-ident expressions
- sema: fix instantiation cycle analysis
- sema: fix generic type and method evaluation
- sema: fix expression evaluation allows non-instantiated generic types for sub-ident expressions
- sema: fix generic type analysis does not supports nested generic type instantiation
- sema: fix generic type analysis of generic define coming from different package
- sema: add responsive expression support for map indexing
- sema: add casting support for traits
- sema: catch unsafe pointer (
*unsafe) type for invalid dynamic generic type annotations
Standard Library
- add:
std/html - add:
std/net/url - add:
std/path - all: refactoring and rehandling with breaking changes
- runtime: fix the string conversion algorithm tries to call
Str(self)!: strmethods like reservedStr(self): strmethods - runtime: fix sema queue implementation (affects
sync::Mutex,sync::WaitGroup, and newsync::RWMutex) - runtime: fix map lookup does not set to default value if record is not exist (#129)
- runtime: fix blocking-select statement may cause deadlock panic even for no-deadlock cases
- runtime: update hashing algorithm and optimize map implementation
- std/conv: rename the
ConvErrorasConv - std/conv: remove the
Okfield ofConv - std/encoding/json: fix custom encoding and decoding method detection
- std/jule/sema: rename
ValueasValueSym - std/jule/sema: rename
DataasValue - std/jule/sema: rename the
Valuefield asValueSymofVarandEnumItem - std/jule/sema: rename the
Datafield asValueofValueSym - std/jule/sema: rename the
Datasfield asValuesofTupleExpr - std/mem: remove
FreeandHeap - std/strings: add the
Replacerstruct - std/sync: add
RWMutex - std/unicode/utf16: remove
MaxRune - std/unicode/utf16: add
RuneLen
API
- remove: deferred scope API
- remove:
jule::Trait jule::Str: removestd::basic_stringsupport (#121, thanks @puni073 for pointing to the issue)
Legacy Support
Jule 0.1.3 includes critical bug fixes, and updating is highly recommended. However, this update may require additional effort. It introduces some breaking changes and modifications that could alter behavior, potentially making debugging more difficult. There are significant additions and removals in the API and standard library. Compiled programs may not behave as expected.
Jule 0.1.2
Language
- add: channels
- add: select statements
- add: mutability responsiveness for functions
- add: thread management runtime
- update: all keywords can used as identifier for bind defines
- update: only constant expressions allowed for default value of struct fields
- comptime: add slice literal support for comptime range iterations
Compiler
- fix: global variable initialization ordering
- fix: exceptional optimizations of
--opt-exceptionalflag - fix: output of the
helpcommand, thanks @lareii for the fix (#118) - fix: code generation for anonymous function calls
- fix: code generation for anonymous functions and other implicit analysis productions
- fix: code generation for empty slice literal
- fix: boundary size variable analysis of the
--opt-accessoptimizations - fix: boundary exhibit variable analysis of the
--opt-accessoptimizations - parser: fix statement separations and insertions
- parser: fix variable parsing invalid syntax error logging
- parser: fix empty case expression detection
- parser: fix
cokeyword allowed without any expression - parser: fix semicolon terminated empty statements may cause crash
- sema: fix map type analysis for cycles
- sema: fix import path analysis may crash when analysis standard library paths
- sema: fix function type string representation conversion
- sema: fix parsing of unicode code points in string literals
- sema: fix collection of variable dependencies for global variables
- sema: fix use declaration to root module may cause crash
- sema: fix cycle analysis of type aliases
- sema: caught initialization cycles for global variables
- sema: generate errors for invalid escape sequences
- sema: improve map type key constraint analysis
- sema: add responsiveness for the key and value pairs of the map literals
- sema: add built-in panic call support for exception handler scopes with no required use statement
Standard Library
- std/bufio: add the
FinalToken - std/bufio: remove the
ScannerCfgstruct - std/bufio: remove the
NewCfgstatic method of theScanner - std/bufio: add the
Split, andBuffermethods to theScanner - std/bufio: rename the
SplitLinesfunction asScanLines - std/bufio: update
SplitFuncandScannerbehavior (add final token support) - std/bytes: reimplemented
- std/comptime: add the
Chanfield toKind - std/comptime: add the channel support to the
Elemmethod ofcomptimeTypeInfo - std/encoding: add the
JSONEncoder,JSONDecoder,TextEncoder, andTextDecodertraits - std/encoding/json: fix string literal validation
- std/encoding/json: add the
EncodeJSONfield toEncodeError - std/encoding/json: add the custom encoder and decoder method support
- std/fmt: use
io::Writerinstead ofos::Filefor theFprint,Fprintln, andFprintffunctions - std/jule: rename the
InitFnasInitFunc - std/jule/ast: add the
CanSend,ChanRecv,ChanType, andSelectstructs - std/jule/ast: rename the
MatchCaseasMatch - std/jule/ast: rename the
VarDeclasVar - std/jule/ast: rename the
TypeDeclasType - std/jule/ast: rename the
TypeDeclKindasTypeKind - std/jule/ast: rename the
IdentTypeDeclasIdentType - std/jule/ast: rename the
SubIdentTypeDeclasSubIdentType - std/jule/ast: rename the
NamespaceTypeDeclasNamespaceType - std/jule/ast: rename the
SptrTypeDeclasSptrType - std/jule/ast: rename the
SlcTypeDeclasSliceType - std/jule/ast: rename the
TupleTypeDeclasTupleType - std/jule/ast: rename the
PtrTypeDeclasPtrType - std/jule/ast: rename the
ArrTypeDeclasArrayType - std/jule/ast: rename the
MapTypeDeclasMapType - std/jule/ast: rename the
RetTypeDeclasRetType - std/jule/ast: rename the
EnumDeclasEnum - std/jule/ast: rename the
TypeEnumDeclasTypeEnum - std/jule/ast: rename the
EnumItemDeclasEnumItem - std/jule/ast: rename the
TypeEnumItemDeclasTypeEnumItem - std/jule/ast: rename the
TypeAliasDeclasTypeAlias - std/jule/ast: rename the
TraitDeclasTrait - std/jule/ast: rename the
StructDeclasStruct - std/jule/ast: rename the
FnDeclasFunc - std/jule/ast: rename the
FnCallExprasFuncCallExpr - std/jule/ast: rename the
GenericDeclasGeneric - std/jule/ast: rename the
UseDeclasUse - std/jule/ast: rename the
ParamDeclasParam - std/jule/ast: rename the
FieldDeclasField - std/jule/ast: rename the
FallStasFall - std/jule/ast: rename the
GotoStasGoto - std/jule/ast: rename the
LabelStasLabel - std/jule/ast: rename the
ContStasContinue - std/jule/ast: rename the
AssignStasAssign - std/jule/constant/lit: add the
Errorstruct - std/jule/parser: rename the
Astfield asASTofFileInfo - std/jule/sema: add the
Select,ChanSend,ChanRecv, andBuiltinCloseCallExprstructs - std/jule/sema: add the
CaseOwnerenum - std/jule/sema: add the
ExprTokenfield toRangeIter - std/jule/sema: update the type of the
Ownerfield ofCaseasCaseOwner - std/jule/sema: update type of the
Elemsfield ofArrayExprandSliceExpr - std/jule/sema: rename the
FnCallExprasFuncCallExpr - std/jule/sema: rename the
FallStasFall - std/jule/sema: rename the
GotoStasGoto - std/jule/sema: rename the
ContStasContinue - std/jule/sema: rename the
SlcasSlice - std/jule/sema: rename the
ArrayasArray - std/jule/sema: rename the
FnasFunc - std/jule/sema: rename the
FnInsasFuncIns - std/jule/sema: rename the
AnonFnExprasAnonFuncExpr - std/jule/sema: rename the
Slcmethod ofTypeasSlice - std/jule/sema: rename the
Arrmethod ofTypeasArray - std/jule/sema: rename the
Fnmethod ofTypeasFunc - std/jule/sema: rename the
Tupmethod ofTypeasTuple - std/jule/sema: rename the
FindFnmethod ofLookupasFindFunc - std/jule/sema: rename the
Mtchfield ofBreakasMatch - std/math/big: fix
Int.Parsereturns zero integer with not exception even if all value have not been consumed - std/math/big: add the
InvalidFormatfield toConvError - std/os: add the
LookupEnv,Getenv, andSetenvfunctions - std/runtime: add the
NumCPUfunction - std/strings: reimplemented
- std/sync: add the
Lockertrait - std/sync: add the
Condstruct - std/sync/atomic: reimplemented
- std/time: add the
ParseErrorenum - std/time: add the
Month, andWeekdaytype aliases - std/time: add the
January,February,March,April,May,June,July,August,September,October,November,December,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Layout,ANSIC,UnixDate,RubyDate,RFC822,RFC822Z,RFC850,RFC1123,RFC1123Z,RFC3339,RFC3339Nano,Kitchen,Stamp,StampMilli,StampMicro,StampNano,DateTime,DateOnly, andTimeOnlyconstants - std/time: add the
UTC, andLocalglobals - std/time: add the
Now,Unix,UnixAbs,Since,Until,LoadLocationFromTZData,FixedZone,Parse,ParseInLocation, andParseDurationfunctions - std/time: reimplement the
TimeandAbsTime - std/time: add the
Locationstruct
Legacy Support
Due to renaming in the standard library, some reimplementations and language update, code from older versions may not compile with the new version. Consequently, you may need to update your code to according to the new version.
Jule 0.1.1
Due to a technical issue, there is no release note for this release.
Thank you for your patience and understanding.
Legacy Support
This version includes some important semantic changes. For example, a different syntax is now used for the old type alias system, and the old syntax has completely different semantics. In addition there are some renamings and some significant changes to the standard library. All of this may break your existing code, but as always upgrading is recommended.
Jule 0.1.0
Language
- add: return forwarding support for multi-ret functions
- add:
uintsupport for pointer arithmetic - add: the
exportdirective - add: global scope support for exceptionals
- update: closure implementation
- update: trait implementation
- update: memory initialization behavior
- update: integer overflow behavior
- update: jule memory model
Compiler
- minor improvements, optimizations and bug fixes
- add: the
--opt-iter, and--opt-dynamicoptimization flags - major improvements for the
--opt-accessoptimization flag (experimental) - fix: swap optimization analysis may cause crash
- fix: reference variable analysis
- fix: the
--opt-deadcodeoptimization flags removes operator overloading methods - fix: deadcode analysis eliminates reserved methods
- fix: code generation for literals of binded structures
- fix: code generation skips safety checks for modulo and division assignment operators
- fix: tab indentation handling for logs
- fix: code generation for function and method declarations
- fix:
--opt-mathoptimization flag - fix and improve: default value handling for declarations
- parser: fix missing expected tokens may cause crash
- parser: fix invalid syntax for short variable declarations may cause crash
- parser: fix anonymous function declaration and function type declaration handling
- parser: fix variable declaration in scope with invalid syntax may cause crash
- parser: fix parser may crash when parsing match-case statements with invalid syntax
- parser: fix unsafe function type parsing
- parser: fix single declarative assignment statement handling
- parser: fix unhandled left operand error of assign statement may cause crash
- sema: fix function call argument analysis
- sema: fix mutability analysis for slices, arrays, and maps
- sema: fix handling of
CastingExprModeltokens - sema: fix type analysis for
*unsafetypes may cause crash - sema: fix mutability analysis for destionation slice parameter of the built-in append function
- sema: fix interior mutability analysis for closures
- sema: fix declarative multi-assign analysis
- sema: fix trait implementations with failed type analysis may cause crash
- sema: fix type comparability analysis reports true for arrays with not-comparable element type
- sema: fix dependency collection for structures with type aliases
- sema: fix non-generic function handling for evaluation
- sema: fix global variable analysis may be wrong, especially when using the use declaration namespace in initialize expression
- sema: fix comparable analysis of binary eval
- sema: fix dynamic type annotation analysis of generic function calls
- sema: fix and optimize goto statement analysis
- sema: fix trait method evaluation always returns immutable data even base data is mutable
- sema: fix mutability analysis of map-lookup assignments
- sema: fix map-lookup assignment type compatibility analysis
- sema: fix mutability analysis of the built-in
errorfunction - sema: fix operator syntax analysis for assignments
- sema: fix matched type duplication analysis of match-type statements
- sema: fix reference collection of variables
- sema: fix casting expression handling
- sema: fix mutability analysis of variadic expressions
- sema: add while-next iteration support to missing return analysis infinite iteration detection
- sema: caught not-instantiated structure type declarations for evaluation
- importer: fix duplicated package analysis
Standard Library
- minor bug fixes and improvements
- add:
std::encoding::json - add:
std::runtime - reimplement:
std::comptime - remove:
std::vec - remove:
std::queue - remove:
std::stack - remove:
std::thread - rehandle: the
Appendmethod variants of thestd::encoding::binary - improve: handling of read/write operations
- builtin: add the
strsupport for[]bytetypes for the built-inappendfunction - builtin: remove: the
assertfunction - std::sync: reimplement
Mutex - std::slices: add the
SortFuncfunction - std::strings: add the
Comparefunction - std::io: the
Scannerforwards any exceptional - std::math::big: fix and optimize multiplications
- std::math::big: fix subtractions
- std::math::big: bit shifting methods takes
intnow - std::math::big: add the
DivMod, andSqrtmethods toInt - std::flag: caught nil variables for the
AddVarmethod ofFileSet - std::sync::atomic: use constraints for general atomic functions
- std::jule::ast: rename
AstasAST - std::jule::integrated: the move
ToStrfunction - std::jule::sema: rename the
PerformsRCmethod asGCofTypeKind - std::jule::sema: remove the
IterRelationstruct - std::jule::sema: remove the
IterRelationfield of theVarstruct - std::jule::sema: rename the
Lfield asLeftandRfield asRightofMultiAssign - std::jule::sema: rename the
Lfield asLeftandRfield asRightofAssign - std::jule::sema: remove the
IntegratedToStrExprModel - std::jule::sema: add the
Declsfield toMultiAssign - std::jule::sema: add the
Capturedfield toAnonFnExprModel - std::jule::sema: add the
Ownerfield toFieldIns - std::jule::sema: fix the
GetKindStrmethod ofFnInsmay crash if declaration is not exist - std::jule::sema: add the
Scopefield toMatch - std::jule::sema: add the
ScopeandIndexfield toGotoStandLabel - std::jule::sema: add the
ChildIndexandStmtIndextoScope - std::jule::sema: fix the
IsMethodmethod ofFnis not reports true for traits - std::jule::sema: fix the
GCmethod ofTypeKindis not reports true for type enums - std::strings:: add the
EqualFoldfunction - std::unicode: add the
SimpleFoldfunction - std::unicode::utf8: fix
DecodeRuneandDecodeRuneStr - std::unsafe: the
Slicefunction takes an argument for capacity
API
The API is now largely implemented by the compiler, adhering to the Jule Runtime implementation. Many important functions and functions have been implemented with Jule. Please check the API documentation for changes.
Legacy Support
This can totally be described as a breaker. It includes radical changes in many places such as standard library, compiler and API. Therefore, updating the version may require additional effort, but it is definitely recommended.
About Releases
Jule was in the pre-release phase for more than 1 year and the pre-release qualification was removed with jule0.0.15. With this version, there is a real beta version and it is called jule0.1.0. This is not a stable release and does not guarantee any particular stability.