Ann: SWI-Prolog 10.1.0 (devel)

Dear SWI-Prolog user,

SWI-Prolog 10.1.0, starting a new development cycle is ready for
download. Highlights

  • Several sanitizer warnings fixed by @mgondan1. Pretty much
    benign. Still, it makes the system more trustworthy and
    should reduce surprises when porting.
  • Added support to get the source location of foreign predicates
    based on dladdr() and addr2line (or atos on MacOS). Used by
    listing/1, edit/1 and PceEmacs find-definition in Prolog mode.
    Requires the system to be compiled with debug info. Also works for
    your own foreign extensions.
  • Many enhancements to the xpce based tools:
    • Avoid deadlock in swipl-win on errors.
    • Improve text rendering by using a bold font rather
      than triple printing when possible and using Pango underline
      position and thickness hints.
    • Allow for coloured underlining, scaled margin icons and
      margin icon hovering. Currently in use as feedback for
      experimental (C) LSP client.
    • Several fixes to support LSP change messages from the
      editor.
    • Improved the PceEmacs bookmark editor and reuse it to
      highlight source locations. Used to implement
      M-x find-references (Alt-?) in Prolog mode.
    • Cleanup of class image, removing depth and mask.
      All our images are now 32 bit RGBA so we no longer need
      a transparency mask.

These changes will be merged into the next stable release.

Enjoy — Jan

SWI-Prolog Changelog since version 9.3.36

  • ADDED: Extract the source location of foreign predicates. Added
    '$foreign_predicate_source'/2. Requires debug symbols and
    addr2line or similar.

  • THEME: Support PceEmacs bookmark view in the dark theme,

  • DOC: library(persistency): document generation of asserta_<pred>

  • UBSAN: Avoid bit shift == sizeof(x) The proposed change is not pretty,
    but it avoids another UBSAN error if low (64 bit) is << by 64 bits.

  • UBSAN: Avoid bit shifts in MT RNG

  • FIX: UBSAN check Avoid memcpy(NULL, _, 0)

  • FIXED: bigint cache allocation error Can lead to buffer overflow.

  • CLEANUP: use snprintf to avoid deprecation warnings

  • PORT: replace sprintf by snprintf to avoid deprecation warnings

  • BUILD: Updated scripts/configure Simplified, added --help
    option and allow for both extracting features from the name and using
    commandline arguments.

  • FIXED: Undefined ep_has_console/1 message when enabling the debugger.

  • CLEANUP: Remove traces of GNU readline

  • BUILD: Include script to build gcc version on MacOS

Package clib

  • PORT: replace sprintf by snprintf to avoid deprecation warnings

Package cpp

  • DOC: fix description of PlQuery::next_solution()

Package http

  • ADDED: Extended predicate option declaration for http_read_data/3
    Added the common JSON options. Note that these options only work if
    the plugin library(http/http_json) is loaded.

Package json

  • FIXED: Apply header to server when using client in full duplex mode.
    Also code cleanup, avoiding code duplication between client and server
    by adding json_rpc_common.pl

  • ADDED: json_call/3 option async(true) JSON RPC allows calls with a
    request id not to send a reply. This option adds an id, but does
    not wait for a reply.

Package plunit

  • FIXED: Allow for concurrent loading of unit test files.

Package sgml

  • CLEANUP: Use snprintf to avoid deprecation warnings

Package table

  • FIXED: Windows: close memory leak after error.

  • CLEANUP: use snprintf to avoid deprecation warnings

Package xpce

  • ADDED: Exploit features to edit foreign predicates directly.

  • FIXED: swipl-win: deadlock when trying to attach a console to
    the xpce (main) thread.

  • FIXED: Underline colour when using default underline. If a line
    contains two fragments with different colour and underline, the first
    used the colour of the second.

  • ADDED: Update bookmarks both when saving and colouring.

  • FIXED: PceEmacs bookmarks: update when saving the buffer.

  • ADDED: PceEmacs Prolog mode: find_references (Alt-?)

  • FIXED: PceEmacs bookmarks displaying the full path.

  • ENHANCED: PceEmacs bookmark list: create nodes per file and provide
    proper highlighting

  • ADDED: Class grbox: allow for baseline vertical alignment.

  • FIXED: Class grbox was not displaying

  • ADDED: parbox->initialise: allow adding content

  • FIXED: Class parbox redraw handling for opacity.

  • ENHANCED: Style PceEmacs bookmarks

  • ADDED: Support background of style in class tbox.

  • ENHANCED: PceEmacs bookmark handling. Allow bookmarks on a selection
    inside a line. Working on a non-persistent bookmark instance that we
    can use for dynamic sets such as search hits, references, errors, etc.

  • ENHANCED: @emacs->goto_source_location: use new line_pos and
    length

  • ADDED: Class source_location: line_pos and length fields.

  • ADDED: PceEmacs: allow adding new type-based prompting.

  • ADDED: editor<-dabbrev_candidates: mode user0 This mode allows
    completion that is more targeted than searching the current buffer.
    It is intended to support intelligent completion using M-/.

  • MODIFIED: Removed image<->foreground and image<->background.
    Also removes corresponding initialization arguments from class pixmap
    and image->set_pixel and image->clear_pixel.

    Use image->pixel to set pixels in an image.

  • CLEANUP: Remove bitmap<-display. Bitmaps are no longer related
    to a specific display.

  • CLEANUP: Removed image<->depth All our images are now 32-bit RGBA

  • MODIFIED: Removed bitmap<->transparent No longer needed. This also
    removes the second argument from ->initialise.

  • CLEANUP: Removed image->mask Since we have an alpha channel on
    images this is no longer needed.

  • ADDED: Icons for LSP fix and tweak operations

  • ADDED: class label: allow image selection to be scaled using
    ->width

  • ADDED: image->resize. Now only sets the width and height.

  • CLEANUP: Removed a lot of outdated image code

  • FIXED: LSP change message for consecutive backward delete.

  • FIXED: class text_buffer: undo handling. Undo may be lost if two
    consecutive changes that can be merged are executed on a virgin buffer.

  • FIXED: r_3d_box(): device offset for filling the box was applied twice.

  • ADDED: PceEmacs: support hovering fragment icons.

  • ADDED: PceEmacs: quick action for commenting xpce get methods.

  • FIXED: Class editor: align line spacing between normal and bold fonts.

  • ENHANCED: Moved font ascent and descent to main object. This allows
    for adjusting the line spacing of a font, such that we can ensure
    consistent line spacing for normal and bold font in editors.

  • ENHANCED: Class font: properly compute ex Instead of using
    simulation, being 1/2*h.

  • ADDED: ``editor->hover_fragment_icon: fragment*, [area]‘’ Called from
    the margin to act on hovering the margin icons.

  • FIXED: Underline in class tbox

  • FIXED: PceEmacs: keep LSP servers in sync on M-x revert

  • ENHANCED: text_margin: indicate that a fragment icon can be clicked.

  • FIXED: text_margin: display fragment that appears on first line

  • ADDED: text_margin->icon_size to scale icons.

  • ADDED: Margin icons for LSP diagnostic types

  • FIXED: Broadcast changes due to white space normalisation while saving

  • ENHANCED: Class editor: use real bold font instead of simulated.
    This results in cleaner and more efficient rendering.

  • ADDED: style->underline is now either a boolean or a colour
    Colour is also supported by text->underline. Future versions may
    also add names for specific underline styles.

    This patch also replaces the use of fixed offset and thickness for the
    line by using the Pango suggested values for the current font.
    This makes
    underlined text look more natural, in particular when using larger
    fonts.

  • FIXED: Re-implement style->grey Was lost in conversion to SDL.

  • FIXED: Avoid warning on freed object when closing a PceEmacs window
    This is harmless, but annoying.

3 Likes