vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

vibe.d 0.8.0 release

vibe.d 0.8.0 release

Header image
Mon, 10 Jul 2017The 0.8.x branch marks the final step before switching each individual sub package to version 1.0.0. This has already been done for the Diet template module (now "diet-ng") and for the new "vibe-core" package that is being released simultaneously. The most prominent changes in this release are a full separation of all sub modules into individual folders, as well as the use of @safe annotations throughout the code base. The former change may require build adjustments for projects that don't use DUB to build vibe.d, the latter leads to some breaking API changes.

Features and improvements

  • Compiles on DMD 2.070.2 up to DMD 2.075.0-b1, this release also adds support for -m32mscoff builds ("x86_mscoff")
  • Global API changes
  • Split up the library into fully separate sub packages/folders
  • Added a "vibe-core" configuration to "vibe-d" and "vibe-d:core" that uses the new vibe-core package
  • Added @safe and nothrow annotations in many places of the API - this is a breaking change in cases where callbacks were annotated - pull #1618, issue 1595
  • Reworked the buffered I/O stream API
    • The InputStream based overload of OutputStream.write has been moved to a global function pipe()
    • read and write now accept an optional IOMode parameter (only IOMode.all is supported for the original vibe:core, but vibe-core supports all modes)
    • InputStream.leastSize and .dataAvailableForRead are scheduled for deprecation - IOMode.immediate and IOMode.once can be used in their place
  • Added forward compatibility code to "vibe:core" so that dependent code can use either that or vibe-core as a drop-in replacement
  • HTTP server
  • Server contexts are now managed thread-locally, which means that multiple threads will attempt to listen on the same port if requested to do so - use HTTPServerOption.reusePort if necessary
  • Added support for simple range queries in the HTTP file server (by Jan Jurzitza aka WebFreak001) - issue #716, pull #1634, pull #1636
  • The HTTP file server only sets a default content type header if none was already set (by Remi A. Solås aka rexso) - pull #1642
  • HTTPServerResponse.writeJsonBody only sets a default content type header if none was already set
  • Added HTTPServerResponse.writePrettyJsonBody
  • HTTPServerResponse.writeBody only sets a default content type if none is already set - issue #1655
  • Added Session.remove to remove session keys (by Sebastian Wilzbach) - pull #1670
  • Added WebSocket.closeCode and closeReason properties (by Andrei Zbikowski aka b1naryth1ef) - pull #1675
  • Added a Variant dictionary as HTTPServerRequest.context for custom value storage by high level code - issue1529 pull #1550
    • Usability improvements by Harry T. Vennik aka thaven - pull #1745
  • Added checkBasicAuth as a non-enforcing counterpart of performBasicAuth - issue #1449, pull #1687
  • Diet templates are rendered as pretty HTML by default if "diet-ng" is used (can be disabled using VibeOutputCompactHTML) - issue #1616
  • Added HTTPClientRequest.writeFormBody
  • Disabled stack traces on the default error page for non-debug builds by default (HTTPServerOption.defaults)
  • REST interface generator
  • Added single-argument @bodyParam to let a single parameter represent the whole request body (by Sebastian Wilzbach) - issue #1549, pull #1723
  • Boolean parameters now accept "1" and case insensitive "true" as true - pull #1712
  • Server responses now output prettified JSON if built in debug mode
  • Stack traces are only written in debug mode - issue #1623
  • Reduced the number of chunks written by StreamOutputRange.put for large input buffers (affects WebSockets and chunked HTTP responses)
  • Switched to std.experimental.allocator instead of the integrated vibe.utils.memory module
  • The string sequence </ is now encoded as <\/ by the JSON module to avoid a common XSS attack vector
  • Reduced synchronization overhead in the libevent driver for entities that are single-threaded
  • Added support for MongoDB SCRAM-SHA1 authentication (by Nicolas Gurrola) - pull #1632
  • Added RedisCollection.initialize
  • The trigger mode for FileDescriptorEvent can now be configured (by Jack Applegame) - pull #1596
  • Enabled minimal delegate syntax for URLRouter (e.g. URLRouter.get("/", (req, res) { ... });) - issue #1668
  • Added serialization support for string based enum types as associative array keys (by Tomoya Tanjo) - issue #1660, pull #1663
  • Added serialization support for Typedef!T - pull #1617
  • Added DictionaryList!T.byKeyValue to replace opApply based iteration
  • Added .byValue/.byKeyValue/.byIndexValue properties to Bson and Json as a replacement for opApply based iteration (see issue #1688)
  • Added StreamOutputRange.drop()
  • Updated the Windows OpenSSL binaries to 1.0.2k
  • The session life time in RedisSessionStore is now refreshed on every access to the session (by Steven Schveighoffer) - pull #1778
  • Reduced session storate overhead in RedisSessionStore (by Steven Schveighoffer) - pull #1777
  • Enabled HashMap's postblit constructor, supported by a reference counting + copy-on-write strategy

Bug fixes

  • Fixed compile error for deserializing optional class/struct fields
  • Fixed GET requests in the REST client to not send a body
  • Fixed REST request responses that return void to send an empty body (see also issue #1682)
  • Fixed a possible idle loop in Task.join() if called from outside of an event loop
  • Fixed TaskPipe.waitForData to actually time out if a timeout value was passed - issue #1605
  • Fixed a compilation error for GDC master - issue #1602
  • Fixed a linker issue for LDC on Windows - issue #1629
  • Fixed a (single-threaded) concurrent AA iteration/write issue that could result in an access violation in the Win32 driver - issue #1608
  • Fixed the JavaScript REST client generator to handle XHR errors (by Timoses) - pull #1645, pull #1646
  • Fixed a possible InvalidMemoryOperationError in SystemRNG
  • Fixed runApplication to be able to handle extraneous command line arguments
  • Fixed a possible crash in RedisSubscriber.blisten due to a faulty shutdown procedure
  • Fixed detection of non-keep-alive connections in the HTTP server (upgraded connections were treated as keep-alive)
  • Fixed bogus static assertion failure in RestInterfaceClient!I when I is annotated with @requiresAuth - issue #1648
  • Fixed a missing toRedis conversion in RedisHash.setIfNotExist (by Tuukka Kurtti aka Soletek) - pull #1659
  • Fixed createTempFile on Windows
  • Fixed the HTTP reverse proxy to send 502 (bad gateway) instead of 500 (internal server error) for upstream errors
  • Fixed a possible InvalidMemoryOperationError on shutdown for failed MongoDB requests - issue #1707
  • Fixed readOption!T to work for array types - issue #1713
  • Fixed handling of remote TCP connection close during concurrent read/write - issue #1726, pull #1727
  • Fixed libevent driver to properly handle allocator null return values
  • Fixed invoking vibe.d functionality from a plain Fiber - issue #1742
  • Fixed parsing of "tcp://" URLs - issue #1732, pull #1733
  • Fixed handling @before attributes on REST interface classes and intermediate interfaces - issue #1753, pull #1754
  • Fixed a deadlock situation in the libevent driver - pull #1756
  • Fixed readUntilSmall/readLine to handle alternating availability of a peek buffer - issue #1741, pull #1761
  • Fixed parseMultiPartForm to handle unquoted strings in the "Content-Disposition" header (by Tomáš Chaloupka) - issue #1562 pull #1725
  • Fixed HTTPServerRequest.fullURL for IPv6 address based host strings
  • Fixed building on Windows with x86_mscoff (the win32 configuration is chosen by default now) - issue #1771

Download

http://code.dlang.org/packages/vibe-d/0.8.0

http://vibed.org/download?file=vibed-0.8.0.zip

https://github.com/rejectedsoftware/vibe.d/tree/edbe89b689eccd3354381c4c1f091a30bdf8ed89


Note: Due to recent issues with OpenSSL, the way OpenSSL/Botan get selected as the TLS provider has changed. If you are using Botan, you'll have to explicitly select the "botan" configuration of the new "vibe-d:tls" package:

dependency "vibe-d:tls" version="~>0.8.0"
subConfiguration "vibe-d:tls" "botan"

Posted at 11:07:22 +0200 by Sönke Ludwig

Comments for the post are currently disabled.

0 comments