On Mon, Nov 06, 2017 at 02:22:35PM +0000, Richard W.M. Jones wrote:
> Since forever ...
> 
>   # string_of_bool true;;
>   - : string = "true"
>   # String.blit "urgh" 0 (string_of_bool true) 0 4;;
>   - : unit = ()
>   # string_of_bool true;;
>   - : string = "urgh"
> 
> Since OCaml 4.02 (in 2014) it has been possible to opt in to
> ‘-safe-string’ to make strings immutable.  You have to use the Bytes
> type when you want mutable byte arrays.
> 
> In OCaml 4.06, coming to Fedora Rawhide soon, this option will be the
> default and any code which mutates strings will not compile:
> 
>   # String.blit "urgh" 0 (string_of_bool true) 0 4;;
>   Characters 21-42:
>     String.blit "urgh" 0 (string_of_bool true) 0 4;;
>                          ^^^^^^^^^^^^^^^^^^^^^
>   Error: This expression has type string but an expression was expected of 
> type
>            bytes
> 
> I think most upstream packages should be fixed by now, but if you need
> help to fix a particular package then file a bug and CC me on it.  As
> a last resort you can enable mutable strings again using
> ‘-unsafe-string’, but please try not to do that.

This is now complete.  The new compiler and all recompiled packages
should appear in Rawhide in a day or two.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to