www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.experimental.logger instantiation fails in 2.067

reply drug <drug2004 bk.ru> writes:
Before 2.067 I used std.experimental.logger in form of a dub package. 
Because it included in 2.067 I stop using the dub package but now I get 
the error:
Error: safe function 
'std.experimental.logger.core.Logger.memLogFunctions!cast(LogLevel)cast(ubyt
)32u.logImplf!(383, 
[snip]).logImplf' cannot call system function 
'std.format.formattedWrite!(MsgRange, char, 
InitiatingPTrack).formattedWrite'
What is the way to avoid it? (I guess it's known issue)

P.S. using dmd 2.067 with the dub package it compiles, without the dub 
package it fails, but ldc 0.16 fails both without and with the dub 
package - there is some inconsistence.
Sep 01 2015
parent reply "Robert burner Schadek" <rburners gmail.com> writes:
On Wednesday, 2 September 2015 at 06:57:12 UTC, drug wrote:
 Before 2.067 I used std.experimental.logger in form of a dub 
 package. Because it included in 2.067 I stop using the dub 
 package but now I get the error:
 Error: safe function 
 'std.experimental.logger.core.Logger.memLogFunctions!cast(LogLevel)cast(ubyt
)32u.logImplf!(383, [snip]).logImplf' cannot call system function
'std.format.formattedWrite!(MsgRange, char, InitiatingPTrack).formattedWrite'
 What is the way to avoid it? (I guess it's known issue)

 P.S. using dmd 2.067 with the dub package it compiles, without 
 the dub package it fails, but ldc 0.16 fails both without and 
 with the dub package - there is some inconsistence.
https://issues.dlang.org/show_bug.cgi?id=14940
Sep 02 2015
parent reply drug <drug2004 bk.ru> writes:
On 02.09.2015 11:36, Robert burner Schadek wrote:
 On Wednesday, 2 September 2015 at 06:57:12 UTC, drug wrote:
 Before 2.067 I used std.experimental.logger in form of a dub package.
 Because it included in 2.067 I stop using the dub package but now I
 get the error:
 Error: safe function
 'std.experimental.logger.core.Logger.memLogFunctions!cast(LogLevel)cast(ubyte)32u.logImplf!(383,
 [snip]).logImplf' cannot call system function
 'std.format.formattedWrite!(MsgRange, char,
 InitiatingPTrack).formattedWrite'
 What is the way to avoid it? (I guess it's known issue)

 P.S. using dmd 2.067 with the dub package it compiles, without the dub
 package it fails, but ldc 0.16 fails both without and with the dub
 package - there is some inconsistence.
https://issues.dlang.org/show_bug.cgi?id=14940
Thank you! Unfortunately it doesn't solved my case, because I use std.string.format that is unsafe :( Am I right it is the problem of absent safe qualifier?
Sep 02 2015
parent "Robert burner Schadek" <rburners gmail.com> writes:
my guess is that

InitiatingPTrack.toString is not  safe
Sep 02 2015