All Versions
17
Latest Version
Avg Release Cycle
14 days
Latest Release
1596 days ago

Changelog History
Page 1

  • v0.10.0.0 Changes

    December 05, 2020

    Language

    • [breaking] Major changes to .0rt syntax:

      • [breaking] Removes the expression argument from success and crash testcase types. Use one or more unittest (see next point) instead.
      • [new] Adds unittest keyword to allow the user to define multiple tests within a single success testcase.
      testcase "simple tests" {
        success
      }
      
      unittest checkInvariant1 {
        // this is a regular procedure with no return
      }
      
      unittest checkInvariant2 {
        // this is a regular procedure with no return
      }
      

      This allows multiple tests to use the same setup, while still being able to track multiple test failures. error and crash testcase types are still available.

      • [breaking] Allows testcase to statically set Argv (see lib/util) using the args keyword. By default, only the program name is set. Previously, Argv used whatever was passed to the test binary.
      testcase "with static Argv" {
        success
        args "arg1" "arg2"
      }
      
      unittest test {
        // something that requires Argv.global()
      }
      

      Note that this isn't a library change; this also affects C++ extensions that use Argv from base/logging.hpp.

      • [new] Adds compiles mode for testcase. This is like success except nothing is executed. (success requires at least one unittest, whereas compiles will not execute anything even if unittest are present.)

    Libraries

    • [new] Adds the lib/testing library with basic helpers for unit tests.

    Compiler CLI

    • [new] Updates parsing of .zeolite-module to allow any ordering of the fields. Previously, the fields needed to be in a very specific order.

    • [fix] Adds compile-time protection against self-referential expression macros defined in expression_map: in .zeolite-module. Previously, the result was infinite recursion that could exhaust system resources.

    • [breaking] Adds an error when root/path in .zeolite-module differs from the location of the respective .zeolite-module. This is to catch both typos (e.g., copy-and-paste errors) and ambiguities.

  • v0.9.0.0 Changes

    November 23, 2020

    Compiler CLI

    • [breaking] Major changes to C++ extensions:

      • [breaking] Corrects hole in $ModuleOnly$ visibility in C++ extensions. Previously, C++ extensions could directly access categories defined in $ModuleOnly$ sources in dependencies.
      • [breaking] Randomizes cache paths and namespaces for generated C++ code so that C++ extensions cannot use static #include paths to circumvent the visibility rules of a dependency.
      • [breaking] Makes TypeInstances shared in generated C++ and in C++ extensions, to allow for better memory management of @types in the future.
      • [breaking] Adds guards to C++ headers for $TestsOnly$ categories, to prevent them from being used in non-$TestsOnly$ C++ extensions.
    • [fix] Fixes regression where calling zeolite with -p would overwrite an existing .zeolite-module.

    Language

    • [breaking] Syntax changes:

      • [breaking] Changes the syntax for calling @category functions from $$ to :, e.g., Foo:create() instead of Foo$$create(). A new error message (to be removed later) will remind the user to stop using $$.
      • [breaking] Changes the syntax for calling @type functions from $ to ., e.g., Foo.create() instead of Foo$create(). A new error message (to be removed later) will remind the user to stop using $.
    • [breaking] Changes to param usage:

      • [breaking] Updates param inference to be more accurate. The new algorithm will infer a param type iff the best choice is unambiguous given the expected and actual function arguments.
      • [breaking] Disallows bounding a single param both above and below, e.g., having both #x requires Foo and #x allows Bar. This is primarily to prevent cycles and contradictions in the type system.

      Previously, the best case for such restrictions was that there are extremely few choices for #x, and the worst case was that it implies Bar converts to Foo when it isn't true, thus making #x unusable. Having either of those requirements likely indicates a design flaw.

    • [breaking] Prohibits having a $TestsOnly$ definition for a non-$TestsOnly$ category. Previously, a concrete category declared in a non-$TestsOnly$ .0rp could be defined in a $TestsOnly$ .0rx, which creates a loophole that allows binaries to utilize $TestsOnly$ code.

    • [fix] Fixes a latent type-checking bug that could occur when attempting to assign a value with an intersection type to a variable with a union type, if one or both types has another nested type, e.g., [A&B][[A&B]|C] or [[A|B]&C][A|B]. This change shouldn't cause new type-checking failures.

    Libraries

    • [fix] Implements subSequence for Argv in lib/util. This is required by ReadPosition but was forgotten. Calling it prior to this would cause a failure.
  • v0.8.0.0 Changes

    August 07, 2020

    Language

    • [breaking] Makes the semantics of cleanup more consistent:

      • [breaking] Disallows statements that modify return values within cleanup blocks, i.e., return with values and assigning named returns.
      • [new] Allows cleanup to access named returns that are initialized within the corresponding in statement. Previously, access required initialization before the in statement.
      • [new] An explicit positional return (e.g., return 1, 2) will assign the values to the respective named returns, if applicable. This will make the actual return values available within cleanup.
      @type get () -> (Int)
      get () (foo) {   // foo is the name of the return variable
        cleanup {
          \ bar(foo)   // foo has been initialized by the time this is called
        } in return 1  // 1 is assigned to foo here
      }
      
      • [fix] Adds unwinding of cleanup blocks when used with break and continue, respecting loop boundaries. Previously, cleanup was ignored.
    • [breaking] Skips compilation of unreachable statements. The target use-case is temporary changes to code that circumvent parts of a procedure, e.g., an early return for the purposes of debugging.

    • [breaking] Marks statements following break and continue as unreachable.

    Compiler CLI

    • [behavior] Adds a compiler warning for public_deps that are not required by public .0rp sources within the same module, since they are potentially just cluttering the public namespace of the module.
  • v0.7.1.0 Changes

    July 13, 2020

    Language

    • [new] Adds the $SourceContext$ macro, which inserts a String with info about source file and code location.

    • [fix] Adds context to error messages related to inherited functions that have not been overridden.

  • v0.7.0.2 Changes

    May 21, 2020

    Language

    • [fix] Improves the likelihood of successful type inference when unions, intersections, or filters are combined with inheritance and type nesting.
  • v0.7.0.1 Changes

    May 20, 2020

    Language

    • [fix] Fixes an edge-case where type-inference can be influenced by a param filter for a param with the same name in the scope that is calling the function. (For example, having #x requires Foo in scope while calling a function that also happens to have a param named #x.)

    • [fix] Fixes an edge-case where parameter substitution at the type level can clash with a type parameter scoped to a function. (Related to the above, but actually a separate issue discovered while solving the former.)

    • [behavior] Shows inferred-type assignments in error messages related to expressions containing inferred types.

  • v0.7.0.0 Changes

    May 19, 2020

    Language

    • [new] Adds limited inference of type parameters in function calls. The new syntax is call<?,Int>(foo,bar), where ? designates that inference is requested for the first position.

    • [behavior] Reduces the memory cost of $TraceCreation$ by avoiding storing the entire trace text.

    Compiler CLI

    • [behavior] Improves handling of I/O errors when calling zeolite, and allows compilation to continue in -r/-R modes if compilation of one module fails.
  • v0.6.0.0 Changes

    May 14, 2020

    Compiler CLI

    • [behavior] Improves error messages for type mismatches and return-count mismatches.

    • [behavior] Improves the efficiency of loading metadata for dependencies.

    • [breaking] Fixes module-staleness check when running tests (-t).

    • [breaking] Prevents binaries from being created from main categories that are defined in $TestsOnly$ sources. (This was the original intention, but it was missed the first time around.)

    Language

    • [new] Allows @category members in concrete categories to refer to each other during initialization.

    • [new] Adds the $ExprLookup[MACRO_NAME]$ pragma, which allows the user to define expression substitutions in .zeolite-module.

    • [new] Adds the $NoTrace$ pragma, which skips generating stack-trace information for specific functions. This is useful for deeply-recursive functions whose full trace would not be useful.

    • [new] Adds the $TraceCreation$ pragma, which appends a trace for the creation of a value when there is a crash in one of its functions. This is useful when the crash stems from value initialization.

    • [fix] Fixes parsing of the '"' Char-literal.

    Libraries

    • [new] Adds the ErrorOr<#x> category to lib/util. This allows functions to return either the expected type or an error message.

    • [new] Adds the Void category to lib/util. This can be used to ignore type parameters when a value still needs to be instantiated.

    • [new] Adds the readAll function to TextReader (in lib/util) to support reading an entire file at once.

    • [breaking] Adds crashes when attempting to read RawFileReader or write RawFileWriter if there is a preexisting file error.

  • v0.5.0.0 Changes

    May 12, 2020
    • [new] Adds compiler support for pragmas, which will allow compiler features that aren't a part of the language:

      • [new] $ModuleOnly$ pragma for .0rp files, which limits their visibility to the modules that own them.
      • [new] $TestsOnly$ pragma for .0rp files, which limits their visibility to .0rt files, and .0rx files that also use $TestsOnly$.
    • [new] Adds support for global seach paths for dependencies via a plain-text file at $(zeolite --get-path)/global-paths. This can be used to set up a separate directory for general-use Zeolite modules.

    • [breaking] Better handling of symbols from dependencies. This might break code that inavertently relied on broken visibility. In particular, .. in a dependency path precludes it from resolving to a system module.

  • v0.4.1.0 Changes

    May 05, 2020
    • [new] Adds a compiler mode (--show-deps) to display the symbolic dependencies of a module.

    • [new] Adds a compiler mode (--fast) to quickly compile a binary from a single source file without needing to create a module.

    • [new] Adds a compiler mode (-R) to recursively recompile modules.

    • [new] Improves thread-safety of internal code so that thread support can be safely added later. (Probably via a library.)

    • [new] Adds the Builder interface to make String concatenation more efficient.

    • [new] Adds support for basic mathematical Float operations, such as sin, exp, and sqrt.

    • [new] Adds support for bitwise Int operations.

    • [fix] Fixes broken --templates mode when builtin types are used.