diff options
author | Andy Wingo <wingo@pobox.com> | 2016-06-29 13:55:49 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2016-06-29 22:25:56 +0200 |
commit | 85faf8eccb836586b869c359413eadd4caaff883 (patch) | |
tree | 2b1239dc36e646ef9bb9a6c0c5eec2fe252df5c8 /NEWS | |
parent | 516f70f9e93b2369eb3778d4800fa3bcb4033e14 (diff) |
Update NEWS
* NEWS: Add 2.0.12 NEWS. Fold 2.1.3 NEWS into main 2.2.0 NEWS.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 480 |
1 files changed, 316 insertions, 164 deletions
@@ -8,154 +8,46 @@ Please send Guile bug reports to bug-guile@gnu.org. Changes in 2.1.4 (changes since the 2.1.3 alpha release): -* Bug fixes -** Don't replace + with space when splitting and decoding URI paths -** Fix bug importing specific bindings with #:select - -It used to be that if #:select didn't find a binding in the public -interface of a module, it would actually grovel in the module's -unexported private bindings. This was not intended and is now fixed. - - -[TODO: Fold into generic 2.2 release notes.] -Changes in 2.1.3 (changes since the 2.1.2 alpha release): - * Notable changes -** Complete overhaul of port internals - -Guile's ports have been completely overhauled to allow Guile developers -and eventually Guile users to write low-level input and output routines -in Scheme. The new internals will eventually allow for user-space -tasklets or green threads that suspend to a scheduler when they would -cause blocking I/O, allowing users to write straightforward network -services that parse their input and send their output as if it were -blocking, while under the hood Guile can multiplex many active -connections at once. - -At the same time, this change makes Guile's ports implementation much -more maintainable, rationalizing the many legacy port internals and -making sure that the abstractions between the user, Guile's core ports -facility, and the port implementations result in a system that is as -performant and expressive as possible. - -The interface to the user has no significant change, neither on the C -side nor on the Scheme side. However this refactoring has changed the -interface to the port implementor in an incompatible way. See -"Incompatible changes" below for full details. - -** All ports are now buffered, can be targets of `setvbuf' - -See "Buffering" in the manual, for more. A port with a buffer size of 1 -is equivalent to an unbuffered port. Ports may set their default buffer -sizes, and some ports (for example soft ports) are unbuffered by default -for historical reasons. - -** Support for non-blocking I/O - -See "Non-Blocking I/O" in the manual, for more. - -** Removal of port locks - -As part of the 2.2 series, we introduced recursive locks on each port, -and arranged to lock them to avoid crashes but also to serialize I/O in -some ways. This turned out to be a mistake: the port lock does not -necessarily correspond to a program's desired atomic unit of I/O, so -correct programs would likely have to have their own locking. At the -same time the port buffering refactoring made it possible for us to -avoid the crashes that led to the introduction of locking, but without -locks. For that reason we have removed port locks, and removed the -"_unlocked" port API variants that were introduced in 2.1.0. - * New interfaces -** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system -** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars' - -Use these instead of `scm_lfwrite'. See the new "Using Ports from C" -section of the manual, for more. +** Implement R6RS output-buffer-mode +** Implement R6RS bytevector->string, string->bytevector * New deprecations -** `_IONBF', `_IOLBF', and `_IOFBF' - -Instead, use the symbol values `none', `line', or `block', respectively, -as arguments to the `setvbuf' function. - * Incompatible changes +** Statically scoped module duplicate handlers + +It used to be that if a module did not specify a #:duplicates handler, +when a name was first referenced in that module and multiple imported +modules provide that name, the value of the +`default-duplicate-binding-handlers' parameter would be used to resolve +the duplicate bindings. We have changed so that instead a module +defaults to the set of handlers described in the manual. If the module +specifies #:duplicates, of course we use that. The +`default-duplicate-binding-handlers' parameter now simply accesses the +handlers of the current module, instead of some global value. -** Decoding errors do not advance the read pointer before erroring - -When the user sets a port's conversion strategy to "error", indicating -that Guile should throw an error if it tries to read from a port whose -incoming bytes are not valid for the port's encoding, it used to be that -Guile would advance the read pointer past the bad bytes, and then throw -an error. This would allow the following `read-char' invocation to -proceed after the bad bytes. This behavior is incompatible with the -final R6RS standard, and besides contravenes the user's intention to -raise an error on bad input. Guile now raises an error without -advancing the read pointer. To skip over a bad encoding, set the port -conversion strategy to "substitute" and read a substitute character. - -** Decoding errors with `substitute' strategy return U+FFFD - -It used to be that decoding errors with the `substitute' conversion -strategy would replace the bad bytes with a `?' character. This has -been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in -accordance with the Unicode recommendations. - -** API to define new port types from C has changed - -See the newly expanded "I/O Extensions" in the manual, for full details. -Notably: - -*** Remove `scm_set_port_mark' - -Port mark functions have not been called since the switch to the BDW -garbage collector. - -*** Remove `scm_set_port_equalp' - -Likewise port equal functions weren't being called. Given that ports -have their own internal buffers, it doesn't make sense to hook them into -equal? anyway. - -*** Remove `scm_set_port_free' - -It used to be that if an open port became unreachable, a special "free" -function would be called instead of the "close" function. Now that the -BDW-GC collector allows us to run arbitrary code in finalizers, we can -simplify to just call "close" on the port and remove the separate free -functions. Note that hooking into the garbage collector has some -overhead. For that reason Guile exposes a new interface, -`scm_set_port_needs_close_on_gc', allowing port implementations to -indicate to Guile whether they need closing on GC or not. - -*** Remove `scm_set_port_end_input', `scm_set_port_flush' - -As buffering is handled by Guile itself, these functions which were to -manage an implementation-side buffer are no longer needed. - -*** Change prototype of `scm_make_port_type' - -The `read' (renamed from `fill_input') and `write' functions now operate -on bytevectors. Also the `mode_bits' argument now inplicitly includes -SCM_OPN, so you don't need to include these. - -*** Change prototype of port `close' function +* Bug fixes +** Fix bug importing specific bindings with #:select -The port close function now returns void. +It used to be that if #:select didn't find a binding in the public +interface of a module, it would actually grovel in the module's +unexported private bindings. This was not intended and is now fixed. -*** Port and port type data structures are now opaque +** Fix fixnum-range checks in R6RS fixnum bitops + (http://bugs.gnu.org/14917) -Port type implementations should now use API to access port state. -However, since the change to handle port buffering centrally, port type -implementations rarely need to access unrelated port state. +** Fix `monitor' macro -*** Port types are now `scm_t_port_type*', not a tc16 value +** Fix bug with GUILE_INSTALL_LOCALE=1 and default port encodings -`scm_make_port_type' now returns an opaque pointer, not a tc16. -Relatedly, the limitation that there only be 256 port types has been -lifted. +If GUILE_INSTALL_LOCALE is unset in the environment or set to 1, Guile +will call setlocale() to install the locale. However it was neglecting +to set the default port encoding to the locale's encoding. This is +fixed. +** Various compiler bug fixes Previous changes in 2.1.x (changes since the 2.0.x series): @@ -173,9 +65,7 @@ better memory usage, and faster execution of user code. See the This new release series takes the ABI-break opportunity to fix some interfaces that were difficult to use correctly from multiple threads. -Notably, weak hash tables are now transparently thread-safe. Ports are -also thread-safe; see "New interfaces" below for details on the changes -to the C interface. +Notably, weak hash tables and ports are now transparently thread-safe. ** Better space-safety @@ -330,6 +220,13 @@ Thanks to work by Daniel Llorens, the generic array facility is much faster now, as it is internally better able to dispatch on the type of the underlying backing store. +** All ports are now buffered, can be targets of `setvbuf' + +See "Buffering" in the manual, for more. A port with a buffer size of 1 +is equivalent to an unbuffered port. Ports may set their default buffer +sizes, and some ports (for example soft ports) are unbuffered by default +for historical reasons. + * New interfaces ** New `cond-expand' feature: `guile-2.2' @@ -355,24 +252,9 @@ See "Integers" in the manual, for more. See the newly updated "Statprof" section of the manual, for more. -** New thread-safe port API - -For details on `scm_c_make_port', `scm_c_make_port_with_encoding', -`scm_c_lock_port', `scm_c_try_lock_port', `scm_c_unlock_port', -`scm_c_port_type_ref', `scm_c_port_type_add_x', `SCM_PORT_DESCRIPTOR', -and `scm_dynwind_lock_port', see XXX. - -There is now a routine to atomically adjust port "revealed counts". See -XXX for more on `scm_adjust_port_revealed_x' and -`adjust-port-revealed!', +** Support for non-blocking I/O -All other port API now takes the lock on the port if needed. There are -some C interfaces if you know that you don't need to take a lock; see -XXX for details on `scm_get_byte_or_eof_unlocked', -`scm_peek_byte_or_eof_unlocked' `scm_c_read_unlocked', -`scm_getc_unlocked' `scm_unget_byte_unlocked', `scm_ungetc_unlocked', -`scm_ungets_unlocked', `scm_fill_input_unlocked' `scm_putc_unlocked', -`scm_puts_unlocked', and `scm_lfwrite_unlocked'. +See "Non-Blocking I/O" in the manual, for more. ** New inline functions: `scm_new_smob', `scm_new_double_smob' @@ -389,6 +271,13 @@ For more on `SCM_HAS_TYP7', `SCM_HAS_TYP7S', `SCM_HAS_TYP16', see XXX. the old `SCM2PTR' and `PTR2SCM'. Also, `SCM_UNPACK_POINTER' yields a void*. +** `TCP_NODELAY' and `TCP_CORK' socket options, if provided by the system + +** `scm_c_put_latin1_chars', `scm_c_put_utf32_chars' + +Use these instead of `scm_lfwrite'. See the new "Using Ports from C" +section of the manual, for more. + ** <standard-vtable>, standard-vtable-fields See "Structures" in the manual for more on these @@ -429,6 +318,97 @@ ASCII as ISO-8859-1. This is likely to be a problem only if the user's locale is set to ASCII, and the user or a program writes non-ASCII codepoints to a port. +** Decoding errors do not advance the read pointer before erroring + +When the user sets a port's conversion strategy to "error", indicating +that Guile should throw an error if it tries to read from a port whose +incoming bytes are not valid for the port's encoding, it used to be that +Guile would advance the read pointer past the bad bytes, and then throw +an error. This would allow the following `read-char' invocation to +proceed after the bad bytes. This behavior is incompatible with the +final R6RS standard, and besides contravenes the user's intention to +raise an error on bad input. Guile now raises an error without +advancing the read pointer. To skip over a bad encoding, set the port +conversion strategy to "substitute" and read a substitute character. + +** Decoding errors with `substitute' strategy return U+FFFD + +It used to be that decoding errors with the `substitute' conversion +strategy would replace the bad bytes with a `?' character. This has +been changed to use the standard U+FFFD REPLACEMENT CHARACTER, in +accordance with the Unicode recommendations. + +** API to define new port types from C has changed + +Guile's ports have been completely overhauled to allow Guile developers +and eventually Guile users to write low-level input and output routines +in Scheme. The new internals will eventually allow for user-space +tasklets or green threads that suspend to a scheduler when they would +cause blocking I/O, allowing users to write straightforward network +services that parse their input and send their output as if it were +blocking, while under the hood Guile can multiplex many active +connections at once. + +At the same time, this change makes Guile's ports implementation much +more maintainable, rationalizing the many legacy port internals and +making sure that the abstractions between the user, Guile's core ports +facility, and the port implementations result in a system that is as +performant and expressive as possible. + +The interface to the user has no significant change, neither on the C +side nor on the Scheme side. However this refactoring has changed the +interface to the port implementor in an incompatible way. See the newly +expanded "I/O Extensions" in the manual, for full details. + +*** Remove `scm_set_port_mark' + +Port mark functions have not been called since the switch to the BDW +garbage collector. + +*** Remove `scm_set_port_equalp' + +Likewise port equal functions weren't being called. Given that ports +have their own internal buffers, it doesn't make sense to hook them into +equal? anyway. + +*** Remove `scm_set_port_free' + +It used to be that if an open port became unreachable, a special "free" +function would be called instead of the "close" function. Now that the +BDW-GC collector allows us to run arbitrary code in finalizers, we can +simplify to just call "close" on the port and remove the separate free +functions. Note that hooking into the garbage collector has some +overhead. For that reason Guile exposes a new interface, +`scm_set_port_needs_close_on_gc', allowing port implementations to +indicate to Guile whether they need closing on GC or not. + +*** Remove `scm_set_port_end_input', `scm_set_port_flush' + +As buffering is handled by Guile itself, these functions which were to +manage an implementation-side buffer are no longer needed. + +*** Change prototype of `scm_make_port_type' + +The `read' (renamed from `fill_input') and `write' functions now operate +on bytevectors. Also the `mode_bits' argument now inplicitly includes +SCM_OPN, so you don't need to include these. + +*** Change prototype of port `close' function + +The port close function now returns void. + +*** Port and port type data structures are now opaque + +Port type implementations should now use API to access port state. +However, since the change to handle port buffering centrally, port type +implementations rarely need to access unrelated port state. + +*** Port types are now `scm_t_port_type*', not a tc16 value + +`scm_make_port_type' now returns an opaque pointer, not a tc16. +Relatedly, the limitation that there only be 256 port types has been +lifted. + ** String ports default to UTF-8 Guile 2.0 would use the `%default-port-encoding' when creating string @@ -669,6 +649,11 @@ scm_t_debug_info', `scm_pure_generic_p', `SCM_PUREGENERICP', * New deprecations +** `_IONBF', `_IOLBF', and `_IOFBF' + +Instead, use the symbol values `none', `line', or `block', respectively, +as arguments to the `setvbuf' function. + ** `with-statprof' macro deprecated Use the `statprof' procedure instead. @@ -761,22 +746,189 @@ users, but packagers may be interested. Changes in 2.0.12 (since 2.0.11): -[Note: these changes come to 2.2 via 2.0 branch, but 2.0.12 hasn't been -released yet at the time of this writing.] - * Notable changes +** FFI: Add support for functions that set 'errno' + +When accessing POSIX functions from a system's libc via Guile's dynamic +FFI, you commonly want to access the 'errno' variable to be able to +produce useful diagnostic messages. + +This is now possible using 'pointer->procedure' or +'scm_pointer_to_procedure_with_errno'. See "Dynamic FFI" in the manual. + ** The #!r6rs directive now influences read syntax The #!r6rs directive now changes the per-port reader options to make -Guile's reader conform more closely to the R6RS syntax. In particular: +Guile's reader conform more closely to the R6RS syntax. In particular: + + - It makes the reader case sensitive. + - It disables the recognition of keyword syntax in conflict with the + R6RS (and R5RS). + - It enables the `square-brackets', `hungry-eol-escapes' and + `r6rs-hex-escapes' reader options. + +** 'read' now accepts "\(" as equivalent to "(" + +This is indented for use at the beginning of lines in multi-line strings +to avoid confusing Emacs' lisp modes. Previously "\(" was an error. -- It makes the reader case sensitive. -- It disables the recognition of keyword syntax in conflict with the - R6RS (and R5RS). -- It enables the `square-brackets', `hungry-eol-escapes' and - `r6rs-hex-escapes' reader options. +** SRFI-14 character data set upgraded to Unicode 8.0.0 +** SRFI-19 table of leap seconds updated + +** 'string-hash', 'read-string', and 'write' have been optimized + +** GOOPS bug fix for inherited accessor methods + +In the port of GOOPS to Guile 2.0, we introduced a bug related to +accessor methods. The bug resulted in GOOPS assuming that a slot S in +an object whose class is C would always be present in instances of all +subclasses C, and allocated to the same struct index. This is not the +case for multiple inheritance. This behavior has been fixed to be as it +was in 1.8. + +One aspect of this change may cause confusion among users. Previously +if you defined a class C: + + (use-modules (oop goops)) + (define-class C () + (a #:getter get-a)) + +And now you define a subclass, intending to provide an #:init-value for +the slot A: + + (define-class D () + (a #:init-value 42)) + +Really what you have done is define in D a new slot with the same name, +overriding the existing slot. The problem comes in that before fixing +this bug (but not in 1.8), the getter 'get-a' would succeed for +instances of D, even though 'get-a' should only work for the slot 'a' +that is defined on class C, not any other slot that happens to have the +same name and be in a class with C as a superclass. + +It would be possible to "merge" the slot definitions on C and D, but +that part of the meta-object protocol (`compute-slots' et al) is not +fully implemented. + +Somewhat relatedly, GOOPS also had a fix around #:init-value on +class-allocated slots. GOOPS was re-initializing the value of slots +with #:class or #:each-subclass allocation every time instances of that +class was allocated. This has been fixed. + +* New interfaces + +** New SRFI-28 string formatting implementation + +See "SRFI-28" in the manual. + +** New (ice-9 unicode) module + +See "Characters" in the manual. + +** Web server + +The (web server) module now exports 'make-server-impl', 'server-impl?', +and related procedures. Likewise, (web server http) exports 'http'. + +** New procedures: 'string-utf8-length' and 'scm_c_string_utf8_length' + +See "Bytevectors as Strings" in the manual, for more. + +** New 'EXIT_SUCCESS' and 'EXIT_FAILURE' Scheme variables + +See "Processes" in the manual. + +** New C functions to disable automatic SMOB finalization + +The new 'scm_set_automatic_finalization_enabled' C function allows you +to choose whether automatic object finalization should be enabled (as +was the case until now, and still is by default.) This is meant for +applications that are not thread-safe nor async-safe; such applications +can disable automatic finalization and call the new 'scm_run_finalizers' +function when appropriate. + +See the "Garbage Collecting Smobs" and "Smobs" sections in the manual. + +** Cross-compilation to ARM + +More ARM cross-compilation targets are supported: "arm.*eb", +"^aarch64.*be", and "aarch64". + +* New deprecation + +** The undocumented and unused C function 'scm_string_hash' is now deprecated + +* Bugs fixed + +** Compiler +*** 'call-with-prompt' does not truncate multiple-value returns + (<http://bugs.gnu.org/14347>) +*** Use permissions of source file for compiled file + (<http://bugs.gnu.org/18477>) +*** Fix bug when inlining some functions with optional arguments + (<http://bugs.gnu.org/17634>) +*** Avoid quadratic expansion time in 'and' and 'or' macros + (<http://bugs.gnu.org/17147>) +*** Fix expander bug introduced when adding support for tail patterns + (<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>) +*** Handle ~p in 'format' warnings (<http://bugs.gnu.org/18299>) +*** Fix bug that exposed `list' invocations to CSE + (<http://bugs.gnu.org/21899>) +*** Reduce eq? and eqv? over constants using equal? + (<http://bugs.gnu.org/21855>) + +** Threads +*** Fix data races leading to corruption (<http://bugs.gnu.org/22152>) + +** Memory management +*** Fix race between SMOB marking and finalization + (<http://bugs.gnu.org/19883>) + +** Ports +*** Fix port position handling on binary input ports + (<http://bugs.gnu.org/20302>) +*** Bytevector and custom binary ports to use ISO-8859-1 + (<http://bugs.gnu.org/20200>) +*** Fix buffer overrun with unbuffered custom binary input ports + (<http://bugs.gnu.org/19621>) +*** Fix memory corruption that arose when using 'get-bytevector-n' + (<http://bugs.gnu.org/17466>) + +** System +*** {get,set}sockopt now expect type 'int' for SO_SNDBUF/SO_RCVBUF +*** 'system*' now available on MS-Windows +*** Better support for file names containing backslashes on Windows + +** Web +*** 'split-and-decode-uri-path' no longer decodes "+" to space +*** HTTP: Support date strings with a leading space for hours + (<http://bugs.gnu.org/23421>) +*** HTTP: Accept empty reason phrases (<http://bugs.gnu.org/22273>) +*** HTTP: 'Location' header can now contain URI references, not just + absolute URIs +*** HTTP: Improve chunked-mode support (<http://bugs.gnu.org/19939>) +*** HTTP: 'open-socket-for-uri' now sets better OS buffering parameters + (<http://bugs.gnu.org/15368>) + +** Miscellaneous +*** Fix 'atan' procedure when applied to complex numbers +*** Fix Texinfo to HTML conversion for @itemize and @acronym + (<http://bugs.gnu.org/21772>) +*** 'bytevector-fill!' accepts fill arguments greater than 127 + (<http://bugs.gnu.org/19027>) +*** 'bytevector-copy' correctly copies SRFI-4 homogeneous vectors + (<http://bugs.gnu.org/18866>) +*** 'strerror' no longer hangs when passed a non-integer argument + (<http://bugs.gnu.org/18065>) +*** 'scm_boot_guile' now gracefully handles argc == 0 + (<http://bugs.gnu.org/18680>) +*** Fix 'SCM_SMOB_OBJECT_LOC' definition (<http://bugs.gnu.org/18495>) +*** Fix bug where 'bit-count*' was not using its second argument +*** SRFI-1 'length+' raises an error for non-lists and dotted lists + (<http://bugs.gnu.org/17296>) +*** Add documentation for SXPath (<http://bugs.gnu.org/19478>) Changes in 2.0.11 (since 2.0.10): |