v0.7.0-beta.0 #2410
bettio
announced in
Announcements
v0.7.0-beta.0
#2410
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is an alpha release, the third pre-release on the road to v0.7.0.
Please read the getting started guide for flashing instructions.
Added
filename:dirname/1,filename:basename/1,2,filename:extension/1,filename:rootname/1,2andfilename:join/2init:get_arguments/0atomvm:posix_kill/2to send a signal to a process, typically one started withatomvm:subprocess/4network:wifi_scan/0,1to ESP32 network driver to scan available APs when in sta or sta+ap mode.nif_start,executable_lineanddebug_lineopcodesbeam_debug_infoesp:reset_reason/0doesn't returnundefinedTransfer-Encoding: chunkedresponse support toahttp_client, including HTTP trailersproc_lib:init_fail/2,3"USB_SERIAL_JTAG"peripheral to the ESP32uartmodule on chips with a built-inUSB-Serial-JTAG controller (C3/C5/C6/C61/H2/H21/H4/P4/S3)
safeoption inerlang:binary_to_term/2erlang:alias/0,1,erlang:unalias/1,erlang:monitor/3with the{alias, Mode}option,spawn_opt{monitor, MonitorOpts}andsending to an alias reference
gpiodriver for the generic_unix port (inavm_unix) using sysfsconsole:print_err/1to write to standard errorprocess_info/1andprocess_info/2with list argumenterlang:term_to_binary/2,erlang:is_builtin/3anderlang:bitstring_to_list/1lists:mapfoldr/3emscripten:run_script_tracked/1andemscripten:get_tracked/2to hold handles toJavaScript values from Erlang, tying the JavaScript value lifetime to the Erlang term lifetime.
The emscripten module object gained
trackedObjectsMap,nextTrackedObjectKey()and theonRunTrackedJs,onGetTrackedObjectsandonTrackedObjectDeletehooks, which embedders mayoverride to customize what tracking means
string:to_integer/1Esp.ADCElixir module with the low level ADC NIFs (init/0,deinit/1,acquire/4,release_channel/1andsample/3), which were registered natively but hadno Elixir source
LEDC.fade_stop/2,LEDC.set_duty_and_update/4,LEDC.set_fade_step_and_start/6,LEDC.set_fade_time_and_start/5andGPIO.set_function/2, which were registered nativelybut missing from the Elixir modules
supported_apibuild target that generatesfuncs.txtandinstructions.txt,describing the functions and the BEAM instructions supported by the configured build
check-native-stubsbuild target, run in CI, that verifies every functionregistered in
bifs.gperfornifs.gperfhas a matching Erlang exporthex_packagebuild target that builds theatomvmHex package, published onhex.pm by CI when a release is tagged, so that build tools can check a project against
the AtomVM release it targets
Changed
erlang:process_info/2now accepts only pids of local processes, as Erlang/OTP does:calling it with a port now raises
badarg(previous versions accepted any id-carryingterm, so it could be used to read port information; there is no
erlang:port_info/2in AtomVM yet to migrate such code to)
ahttp_clientnow returns{error, {parser, incomplete_response}}when a socket closes mid-response(previously silently reported
closed);ssl_closedmessages are also handledahttp_clientnow returns{error, {parser, {conflicting_content_length, V}}}when a responsecarries differing
Content-Lengthvalues (previously silently accepted the last one),per RFC 9112 §6.3
ahttp_clientnow emits adoneevent for responses withContent-Length: 0(previouslythe parser stayed in
bodystate forever, hanging passive callers and misflagging legitimateclose as
incomplete_response)ahttp_clientnow discards bytes pastContent-Lengthand transitions todone(previouslyemitted the excess as body data and stalled the parser when the socket delivered more than
the promised byte count)
ahttp_clientnow caps parsed status, header and chunk-size lines at 16 KiB (?MAX_LINE_SIZE);longer lines return
{error, {parser, {line_too_long, Prefix}}}with the first 128 bytes ofthe offending line. Callers whose upstream servers emit unusually large headers must account
for this limit
exavmlibProtocolmodule with a small runtime shim (onlyProtocol.__concat__/2),saving ~31 KB of flash. ExAtomVM uses precompiled, unconsolidated protocols and continue to function normally at runtime.
REF_SIZE: useTERM_BOXED_REFERENCE_SHORT_SIZEfor references builtfrom ref ticks,
TERM_BOXED_REFERENCE_PROCESS_SIZEfor process references (aliases), orTERM_BOXED_REFERENCE_MAX_SIZEto fit any reference.REF_SIZEstill expands to the shortreference size, but now emits a compiler warning
Removed
ahttp_clientsupport for obsolete line folding (RFC 9112 §5.2); folded header andtrailer lines now return
{error, {parser, deprecated_obs_fold}}, and theheader_continuation/trailer_header_continuationresponse events are no longer emittedFixed
AVM_DISABLE_SMP=ONand task drivers enabledsupervisorstarting a child from a specification carried in a message, letting anyprocess make a supervisor call an arbitrary function
supervisorleaving children unrestarted when a message reached it during aone_for_allrestart or before a failed restart was retriedio:put_chars(standard_error, ...)andio:format(standard_error, ...)to stderr insteadof aliasing them to standard_io (diagnostics no longer pollute an escript's stdout)
term_from_int32on STM32 platformterm_from_int32on RP2 platformterm_from_int32on ESP32 platformevent_dataforWIFI_EVENT_AP_STA(DIS)CONNECTEDeventsfull
timeval, so{sntp_sync, {Sec, USec}}now includes both timestamp fieldserlang:system_info(system_architecture)now reports normalizedarch-vendor-osstringsahttp_clientcrash on non-numeric or negativeContent-Lengthvaluesahttp_clientcrash on headers with empty or all-whitespace valuessupervisorhandling of failing childatomvm:subprocess/4message_queue_len(as reported byerlang:process_info/2): unprocessed signals,such as monitor or unlink requests, were counted as queued messages
trapping BIF: the trap flag was left set, so the process parked at the next scheduling
point and never ran again
erlang:localtime/1memory leak, use-after-free, and TZ restore bugs on newlib/picolibcbinary:replace,zlib:compressand bsd socket recv code.catchwould raise on regular atom resultsacceptwaiters, leakingnetbufon receive error paths, and a recycled-netconnrace between socket close and the event handlerEXC_BAD_ACCESS/SIGBUS) on Apple Siliconreadied by a driver (e.g. an active-mode socket message) until the next event or timer tick
term_from_resourcefailing to compile from C++networkmdns configuration to read the documentedhostkey; the previouslyrequired, undocumented
hostnamekey is still acceptedterm_is_uint32accepting big integers whose low 64 bits are within range on 32-bitbuilds, which made
erlang:crc32/2,erlang:crc32_combine/3andcrypto:pbkdf2_hmac/5silently truncate huge integer arguments instead of raising
badargesp_adc:sample/2,3answering a bare atom such astimeouton a read failure, whereevery other ADC function and its own documentation answer
{error, Reason}map.fieldraisingundefinstead ofKeyErrororBadMapErrorwhen the key ismissing or the term is not a map, and the deprecated
map.field()form raisingundefalways,by adding the
elixir_erl_passruntime helpers that compiled Elixir code callsmaps:from_keys/2(andsets:from_list/1, which is built on top of it) notdeduplicating structurally equal but separately-allocated boxed terms, such as tuples
This discussion was created from the release v0.7.0-beta.0.
All reactions