Releases: actonlang/acton
Releases · actonlang/acton
v0.11.6
Fixed
- Homebrew Formula now includes util-linux for Linux
- required for <uuid/uuid.h>
v0.11.5
v0.11.4
Testing / CI
- Minor correction to Homebrew release automation
- This is silly...
v0.11.3
Testing / CI
- Minor correction to Homebrew release automation
v0.11.2
There are additions but they're so minor you get 'em for free in a patch
release! ;)
Added
- Add runacton wrapper to run .act files using shebang [#238]
- Write an Acton program in a .act file and add shebang line at top:
#!/usr/bin/env runacton
- ... and then run the .act file. It will be seamlessly compiled and executed!
Magic whosh
- Write an Acton program in a .act file and add shebang line at top:
Testing / CI
- Homebrew Formula moved to actonlang/acton repo [#868]
- Building a brew bottle is now part of regular CI testing
- Ensures that our Homebrew Formula is correct with regards to dependencies
etc, which has previously been a long standing issue - mirrored to actonlang/homebrew-acton when we release
- Retry DB test jobs [#853]
- No longer have to manually re-run CI jobs on failures
- Retry just the DB test itself, which takes a few seconds instead of
rerunning entire CI job which takes minutes
- New automatic release process
- Removes adding git tag as manual step
- Now push branch
release-vX.Y.Z
updatingcommon.mk
& version in
CHANGELOG.md
, once this PR is merged, a new workflow adds the git tag
which in turn triggers the release build
v0.11.1
Testing / CI
- Fix APT repo job
v0.11.0
Added
- Apple M1 / M2 CPUs are now supported [#823]
- aarch64 calling conventions are different for variadic vs fixed functions
and this is a problem when we alias a fixed function as a variadic function,
which is exactly what we did in a number of places in the stdlib where we
manually write C code - Now fixed by calling $function2, $function3 etc for 2 vs 3 args
- aarch64 calling conventions are different for variadic vs fixed functions
actonc new foobar
will create a new project called foobar according to the
standard project directory layout- Completely rewritten IO system & RTS workers [#698]
- libuv is now used for all IO operations instead of our own home grown IO
subsystem. - Rather than a single thread dedicated to IO, all RTS worker threads now also
perform IO work. IO actors are pinned to a particular worker thread on
initialization.
- libuv is now used for all IO operations instead of our own home grown IO
- New
net
module [#733]- replaces
env.connect()
&env.listen()
- adds DNS lookup functions
- replaces
- New
process
module [#752] [#796] [#797] [#798] [#799] [#800] [#801] [#804]
[#808]- runs sub-processes
- New
file
module which allows reading and writing files [#806]- Replaces
env.openR
&env.openW
- Replaces
- New
json
module to encode and decode Acton data to JSON document (strings)
[#829]- built on yyjson C library, which is a very fast (3.5GB/s) JSON library
- Do token based authentication
- Capability based authentication has previously been based around access to
the env actor, which was initially fed into the system as an argument to the
root actor - We wanted to modularize the code of the env actor and so instead we've opted
to use a token based authentication scheme - A WorldAuth token is passed to the root actor, accessible as
env.auth
- Tokens are organized in a hierarchy, e.g.
- WorldAuth > NetAuth > TCPAuth > TCPConnectAuth
- Performing actions always require most specific auth token
- This is to encourage users NOT to pass around the WorldAuth token but make
it more specific
- This is to encourage users NOT to pass around the WorldAuth token but make
- For example creating
net.TCPIPConnection
requires aTCPConnectAuth
token
- Capability based authentication has previously been based around access to
- actonc now outputs some information about what it is doing per default [#840]
- Previous quieter output can be achieved with
--quiet
--timing
includes extra timing information on how long compiler passes and
other operations take- all
--verbose
output now under--debug
- Previous quieter output can be achieved with
- actonc now takes a lock on a project when compiling, which ensures that two
invokations of actonc to build the same project do not step on each others
toes [#760]- lock is implemented using flock(), so even if actonc dies and lock file
stays in place, it is not considered locked (flock only keeps lock while
process that acquired lock is running) - Our own stdlib is built concurrently with development and release profile,
which can now be run "concurrently", i.e. we do not have to ensure
serialization of these two builds from the Makefile and since all other
targets are run concurrenctly this simplifies the Makefile quite a bit,
however since there is a lock there won't be an actual concurrent build
- lock is implemented using flock(), so even if actonc dies and lock file
- actonc now automatically sets the root actor to
main
, if a program contains
such an actor. This means--root
argument is mostly superfluous now [#726] - actonc --root argument now takes a qualified name, like .
[#628]- this is required to build an executable in a project with:
actonc build --root test.main
- this is required to build an executable in a project with:
- RTS has improved logging, including timestamps, log levels etc. Also supports
file output [#584]- Log output is sent to stderr
- RTS worker thread id is included so it is now easier to follow what a
particular thread is doing. - stderr output has millisecond time resolution
- file output (--rts-log-path) has nanosecond precision
- Using pretty, short relative paths
- ActonDB has improved logging, including timestamps, log levels etc and
supports file output [#588]- supports logging to file with --log-file
- similar implementation as RTS (based on same log.c library but modified)
- actonc automatically detects stub mode compilation based on presence of .c
file [#601] [#624] - actonc supports new .ext.c style definition of C functions where individual
functions in an .act file can be externally defined in the .ext.c file by
usingNotImplemented
as the function body [#706] - actonc is now aware of development / release profile [#599] [#612]
- output placed in correct location, i.e. out/rel or out/dev
- actonc now supports custom compilation of modules via Makefile [#602]
- if a module is to be stub compiled (i.e. there is a .act file with a
corresponding .c file) then if there is also a Makefile in the project root,
actonc will run make for the corresponding target, e.g.make out/rel/foo.o
- if a module is to be stub compiled (i.e. there is a .act file with a
- actonc now has concept of commands [#608]
- like
actonc build
which will build an Acton project
- like
- stdlib is now compiled from actonc as a Acton project [#599]
__builtin__.act
has been moved from stdlib tobuiltin/ty
, which is also an
Acton project [#623]__builtin__.act
really is special, like it's an implicit dependency for
everything else, and trying to add extra logic to get it to build first when
building the stdlib project doesn't make sense; it's now special rules in
the Acton Makefile
- Improve DB schema creation messages [#586]
- Messages contained "test", which is misleading. The DB server creates the
schemas, i.e. the schema is hard-coded. This is per design and a
simplification (no need for schema management RPCs) as the DB and RTS are
tightly coupled anyway.
- Messages contained "test", which is misleading. The DB server creates the
- ActonDB will now gossip RTS node membership, forming the foundation for doing
distributed computing - ActonDB monitor membership information now contains all nodes [#645]
- RTS mon now has a membership view [#645]
bytes
type added [#655]- Library dependencies are now included in the Acton distribution [#698]
- Added
__repr__
method to class value & subclasses [#685] - Added Ord instances for lists & dicts [#719]
Changed
after
now takes a float argument [#846]- Allows sub-second delays
- IO subsystem has been replaced with libuv
env.connect()
,env.listen()
has been replaced withnet
module, i.e.
net.TCPIPConnection
andnet.TCPListener
- file access via
env
has been replaced with thefile
module - RTS log output is now sent to stderr rather than stdout
actonc dump foo.ty
now takes the filename of the.ty
file to dump as a
positional argument rather than the old way of using an option (actonc dump --file foo.ty
)
Fixed
- Avoid segfault in actondb due to uninitialized mon fds [#627] [#633]
- Exceptions during build of executables no longer deletes produced .ty files [#629]
- Fixed DB server & client issues leading to segfaults [#559]
- Pass skiplist keys by reference
- Fix duplicate nonces in msg_callbacks skiplist
- Extend lock protection over msg_callbacks
- DB client no longer asserts & exits on perror [#574]
- Now handles more errors rather than bailing out
- Properly initialize fd_data entries [#571]
- Sometimes a slot wasn't properly initialized, which would lead to incorrect
behavior
- Sometimes a slot wasn't properly initialized, which would lead to incorrect
- RTS now cleans up and closes fd on EOF [#570]
- RTS fd array is now 1024 slots long [#570]
- Used to be 100, which means we can address up to 100 fds. Default fd limit
on most Linuxes is 1024, so we align on that. The proper fix is to have a
dynamic structure for fd or set it to the same value as the limit (but
that's bad for large values).
- Used to be 100, which means we can address up to 100 fds. Default fd limit
- RTS uses sigaction instead of signal, which should tighten up some edge cases
[#587] - Do not print log message on new connection in RTS / env [#607]
- Correct Debian package dependencies [#625]
- We used the wrong dependencies, shared libraries, when we should have the
development libraries available, since we are not a "normal" application but
a compiler, so when we in turn build programs we want to link them as
statically as possible (sort of, not including libc but most other things) - Now installing the .deb file will pull in all the correct dependencies on
Debian 11 / bullseye and Ubuntu 20.04
- We used the wrong dependencies, shared libraries, when we should have the
- Correct handling of plain and raw bytes / string literals [#655] [#657]
- UTF-8 encoding is now enforced for source files
- All library dependencies are now included in the Acton [#693]
- For example libuv, libutf8proc, libbsd (on Linux)
- No longer partially linking some modules like math & numpy
- We used to partially link in e.g. libbsd into math
- numpy imports math so importing both math and numpy means we got duplicate
symbols - This was likely a faulty design in the first place as it lead to symbol
collisions
- numpy imports math so importing both math and numpy means we got duplicate
- Now all library dependencies are part of the Acton distribution and are
linked in with the final application at actonc build time - Files are stored as e.g. dist/lib/libuv_a.a. The _a suffix is to ensure we
get the statically compiled library and do not link with a shared .so
library if one happens to be present on the system.
- C lib guide rewritten for new .ext.c style [#766][#766]
- Custom make file invocations are now more idempotent [#845]
- Avoid copying .h files which forces make to rebuild targets
Testing / CI
- Tasty (Haskell test library & runner) is now used for testing actonc. Most
tests have been migrated from test/Makefile to compiler/test.hs [#631]- Tasty offers different style testing; unit, golden, property etc, with
flexible runners that can execute tests in paralell. Has nice, compact and
colorized output in the terminal and can output to richer formats as well as
run benchmarking tests. - There are now timeouts for all tests run by Tasty
- Tasty offers different style testing; unit, golden, property etc, with
- TCP servers stress test for opening & closing fds in RTS [#570]
- actonc build of projects have some test cases [#623] [#625]
- Now testing on MacOS 12 [#527]
- Stopped testing on MacOS 10 []
- Now testing on Ubuntu 20.04, 22.0...
v0.9.1
Fixed
- Fix ActonDB monitor interface initialization [#514]
- God knows how this ever worked, but it mostly did on Linux. Mac OS X really
exposed the errors together with the RTS not halting on DDB errors, which we
should address through [#431]
- God knows how this ever worked, but it mostly did on Linux. Mac OS X really
- Serialize all manually constructed actors [#512]
- A new convenience function makes it easier to serialize all manually
constructed actors to the DB and it is used in various places so that all
currently known actors are serialized - The better fix for most of these actors is probably to have CPS converted
init functions instead but that's some more code to write which is
cumbersome for manually defined actors
- A new convenience function makes it easier to serialize all manually
v0.9.0
Added
- Add DB client library statistics [#473]
- We keep count, sum of time and timing buckets per operation type
actonmon
exposes these metrics over the prometheus HTTP endpoint
- RTS mon interface now uses netstrings as line encoding [#494]
- Much more robust than the previous implementation which relied on luck
- netstrings are very simple and can be implemented in a few lines of C or
Python, so we are still considerably simpler than protobuf or similar
- Add mon interface to ActonDB [#499]
- We only expose membership information
- Gives us a nice programmatic interface to query the DB for membership info,
so we can determine whether our DB cluster has converged or not
- Acton RTS now handles
SIGINT
andSIGTERM
[#509]- RTS will gracefully shutdown upon receiving either
SIGINT
orSIGTERM
- If a second
SIGINT
orSIGTERM
is received while the RTS is gracefully
shutting down, it will instead exit immediately
- RTS will gracefully shutdown upon receiving either
- Add
ListenSocket
actor [#506]env.listen()
now returns aListenSocket
, previously it did not return
anything, which meant that we never got a "handle" on the socket itself so
we couldn't for example stop listening on a port.- Also means we have a more natural place to add logic for what should happen
on actor resumption.
Changed
env.listen()
now takes a on_error callback function [#504]- Previously the on_connect callback would be invoked with a
None
argument
on error, which meant it wasn't really an "on connect" handler - Now we get separate callbacks so each can be implemented much cleaner
- Previously the on_connect callback would be invoked with a
- Enough DDB servers must be specified for configured replication factor [#474]
- With a replication factor of 3,
--rts-ddb-host
must be specified at least
3 times to point to 3 DB servers - A previous short term fix [#427] assumed all DDB servers were running on the
same host, typically localhost for testing - We now let the user figure it out instead, allowing true multi-node operation
- Long term fix is still to properly implement gossip protocol
- With a replication factor of 3,
Fixed
- Fix segfault caused by misaligned uuid.h / libuuid on MacOS [#488]
- used
uuid.h
from system and uuid lib from util-linux package
- used
- Fix actor instantiation in env.c [#481]
- We failed to create the DB queue on actor instantiation which would lead to
errors on later enqueues [#472] - [#186] changed the way actors are initiated and code generated by actonc
uses the new correct way whereas the builtin actors like Env, Connection etc
defined inenv.c
are manually implemented and still used to old way - All actors in
env.c
now use the new correct way!
- We failed to create the DB queue on actor instantiation which would lead to
- Fix epoll detection of disconnect [#469]
- In addition to listening for
EPOLLHUP
we must detectEPOLLRDHUP
- In addition to listening for
- Do not rewrite argv for
--rts-ddb-host
option arguments [#476] - Fix
--opt=arg
style parsing of argument [#479]- Argument value was
t=arg
rather thanarg
due to misplaced parentheses
- Argument value was
- Do single line logging [#475]
- Previously had tasks where first a partial log line would be printed, to be
completed when the task finished. This looks nice in an interactive terminal
but if anything else logs meanwhile, the output becomes garbled.
- Previously had tasks where first a partial log line would be printed, to be
- Cleaned up bootstrap removing
ancestor0
[#481] - Speed up RTS startup when using the database [#493]
- A
select()
timeout meant we would always pause for 3 seconds - We now avoid the timeout entirely by having a "wakeup pipe" that we can prod
to wake up the comms thread in the RTS - For small programs, like most of our tests, we can now startup 3 DB nodes
and run the program in 30ms or so whereas previously it would take just over
3 seconds. 100x improvement!
- A
Testing / CI
- CI jobs now depend on all "previous jobs" which prevents inconsistencies [#478]
- There are jobs, like the update-apt-repo job, which depend on previously
jobs, like test-linux. - While the test job for Linux could succeed and thus allow the
update-apt-repo job to proceed, text-macos could fail, meaning the overall
pipeline status is failed, yet enough has passed to now run the
update-apt-repo job. Uploading a new version there but not a similar one for
Mac OS X causes inconsistencies.
- There are jobs, like the update-apt-repo job, which depend on previously
- DB test script (
test_db.py
) now uses Python unittest style rather than
homegrown functions [#501]- Makes it easier and more robust to handle setUp & tearDown
- Ensure app is killed during tearDown as to ensure cleanup [#502]
- The test for RTS with DB now has a new test where the test app uses TCP for
control and exposing information which should make it much faster and more
robust than relying on stdout parsing.- However, it does not currently support testing DB resumption / recovery as
our TCP listen sockets do not support resumption
- However, it does not currently support testing DB resumption / recovery as
v0.8.0
Added
- New RTS mon logging option [#464]
- This new option makes it possible to write the RTS monitor statistics to a
log file specified with--rts-mon-log-path
- The first stats snapshot is taken just at startup of the application after
which subsequent stats snapshots are taken at the specified periodicity. A
snapshot is always taken just before shutdown. - The periodicity is specified by
--rts-mon-log-period
in units of seconds
and the default value is 30
- This new option makes it possible to write the RTS monitor statistics to a
- New RTS mon output option [#464]
- It is possible to output the RTS monitor statistics just before the exit of
program by specifying--rts-mon-on-exit
- The RTS monitor statics are printed to stdout.
- It is possible to output the RTS monitor statistics just before the exit of
- Threads now have names, making it easier to debug [#457]
- "main", "IO", "Mon Socket" and "Worker X" are the currently used names
- Show RTS options and arguments with
--rts-help
[#465]
Changed
- stdout is now line buffered [#464]
--rts-mon
has been renamed to--rts-mon-socket-path
- Since there are now multiple output options for the RTS monitor statistics
we use a more specific name
- Since there are now multiple output options for the RTS monitor statistics
Fixed
- Avoid slow RTS performance when using DDB & the DDB server is too fast [#453]
- If the DB server responded quickly enough, the client library would enter a
pthread_cond_timedwait to wait for the response but it had already arrived
leading to always hitting the timeout [#449] - The effect was that the Acton program would run very slowly as each
continuation would take one DDB communication timeout to process, which is
set to 10 seconds - The DDB client library has been improved to check for the response within
the mutex lock to avoid this situation - RTS in DDB mode is now fast!
- If the DB server responded quickly enough, the client library would enter a
- Acton RTS now shuts down "gracefully" [#460]
env.exit()
previously calledexit()
in C, immediately shutting down the
application & RTS- Any currently running continuation (in another worker thread) would be
abrubtly killed - This has been improved so that the RTS will let worker threads complete any
currently executing continuation and commit that work before exiting the
application
- Only do CPU affinity when there are as many worker threads as CPU cores [#447]
--rts-wthreads
can be used to specify the number of worker threads and if
that number does not align with the number of CPU cores in the machine, we
will not do CPU pinning- Previously, the worker threads that overlapped with available CPU cores
would be pinned whereas the rest would go unpinned.
- Corrected worker thread count message [#446]
- Previously, the log message (when using
--rts-verbose
) that shows the
number of worker threads used when there are few available CPU cores would
show the incorrect number (0
) [#445]:**RTS** Detected 2 CPUs: Using 0 worker threads, due to low CPU count. No CPU affinity used.
- RTS was actually using more worker threads but the log message was wrong and
has now been corrected.
- Previously, the log message (when using
- Corrected actual number of worker threads [#457]
- While we computed the correct number of worker threads to use, when creating
the threads we completely failed to use that computed value and instead
unconditionally spawned as many worker threads as there are CPU cores. - There was also an off-by-one error on the number of worker threads.
- This has all been corrected so the correct number of worker threads is now
created and there is a test case to prove it.
- While we computed the correct number of worker threads to use, when creating