Skip to content

v0.23.0

Compare
Choose a tag to compare
@github-actions github-actions released this 13 Aug 10:44
· 232 commits to main since this release
08b3eb0

Added

  • More unboxing of fixed size integers
    • Function local variables are unboxed
    • Passing fixed size integers as arguments between functions is also unboxed
    • This adds an extra pass to the compiler to handle boxing and unboxing
    • For some programs, the code is now pretty much optimal
      • For example, the C code generated from test/perf/src/dct.act looks
        pretty much as one would write it by hand and thus runs at about the
        "speed of C". It does 0 mallocs and runs about 20x faster than before
        unboxing (depending a bit on computer).
    • class and actor attributes are still boxed
      • This is likely the most important future work around unboxing since
        individual mallocs for class & actor attributes typically account for a
        the lion's share of GC pressure
      • It is challenging around generics though
  • New Set.update() method to add items to a set from an iterable, such as a
    list or another set
  • Added --module argument to acton test to select module to test
    • For example, acton test --module foo to only run tests in module foo
  • Improved printing of test results for test modules that crashed
    • The error is now printed for each individual test in the test module
  • Added list.index(val, start=0, stop: ?int) to get the first index of an
    element in a list. It can be constrained through the start and stop
    parameters.

Changed

  • re.match() now returns Match object where the group is list[?str]. It
    used to be list[str] but it is possible to have groups that do not match on
    anything and so ?str is the correct type. This applies both for named groups
    and normal numbered groups.
    • For example, consider foo((123)|bar) which matches either foo123 or
      foobar. The inner (123) group is ORed and so it will have no match for
      foobar, thus we get the result m.group = ["foobar", "bar", None]
  • set.pop() now throws ValueError for an empty set

Fixed

  • Fixed tuple type inference
    • Tuples with named fields can now be properly type inferred
  • acton test perf now limits concurrency to 1 to get better results
  • Fix str.strip() on empty strings, it would previously return \n but now
    returns an empty string as it should
  • Fixes crash in re.match() for groups with no matches, which previously
    resulted in SEGFAULT
    • For example, consider foo((123)|bar) which matches either foo123 or
      foobar. The inner (123) group is ORed and so it will have no match for
      foobar, thus we get the result m.group = ["foobar", "bar", None]
      • This would previously crash but we now properly check the result values
  • Fix str slicing when range is 0 length which would previously SIGILL
    • For example, for a = "foobar" if we would try to access a[23:], there is
      no character 23 and so the length of the slice is 0 which would trigger a
      SIGILL when compiled in --dev mode (which comes with lots of extra
      UBsan)
  • Fix dict corruption issue when deleting items #1805
  • set.pop() now does not crash for an empty list (it threw NULL before)
  • Fix decoding of buffered test output

Testing / CI

  • Added performance test to CI
    • This runs on a dedicated computer, a laptop in Kristian's rack at home
    • Runs acton test perf in test/perf which currently only includes the
      dct program
      • Simply add more test programs to the test/perf project to have them run
    • The testing procedure is as follow:
      • The CI test checks out the tests from the feature branch, so it will
        always be the latest version of the test itself
      • The latest tip release from acton main branch is installed and used to
        compile the test/perf project
      • acton test perf --record is used to run the test and record the result,
        which will act as the baseline
      • The acton release from the local feature branch is then installed (fetched
        as artifact from the build-debs job)
      • acton test perf is now run, which will run with the latest version and
        compare the results against the baseline
      • We do not currently inspect the results to give a pass / fail score,
        they're just printed in the CI output for a human to look at
      • Natural variance seems to hover around +-5%, which feels OK
  • Revamp PR testing to run on small set of platforms and run a nightly scheduled
    test job that includes all platforms that were previously in the PR jobs
    • This was triggered by the number of platforms reaching a higher number which
      in turn has led to more cached data and as the GitHub Actions runner cache
      is limited to 10GB, we hit the limit and got churn which meant that there
      were always slow jobs. By reducing the number of PR jobs, they can continue
      to run cached whereas the nightly jobs can run without a cache.
  • Stop CI testing on MacOS 11 as it has been deprecated by Github
  • Start CI testing on Ubuntu 24.04
  • Stop CI testing on Ubuntu 23.04 and 23.10 as they are EoL
  • Temporary fix of building Acton by using our own mirror for the Zig tar ball.
    We are using a particular nightly v0.12.0 build that is no longer available
    for download from ziglang.org and so we now mirror it ourselves. This affects
    both builds in CI and local builds.
  • Fix GitHub Actions to run on Ubuntu 18.04
    • The artifact download action uses Node.JS to run and as GitHub has imposed
      constraints and new defaults, this has been magically updated to use a newer
      version of Node.JS than before. The newer Node version is compiled using
      glibc 2.28 and that's too new for Ubuntu 18.04, so the end result is that
      you basically can't use the common GitHub Actions with Ubuntu 18.04 or
      similar older distros. What a weird way to treat your CI users by GitHub!?
      Anyhow, we work around this by explicitly enabling the use of the old Node
      again.
  • Add caching for test-external-projects of C object files & archives