RejectedSoftware Forums

Sign up

std.format deprecation

I'm naively using std.format:format rather than something in vibe.d and get this deprecation message from one call of toString() on a Segment in my own code.

/usr/include/dmd/phobos/std/format.d(3353,28): Deprecation: function vibe.core.path.GenericPath!(PosixPathFormat).GenericPath.Segment.toString is deprecated - Use .name instead.

However, this also appears when dub --force building vibe-d:inet, vibe-d:http, vibe-d:mongodb, vibe-d:web, and building configuration "vibe-core".

Any advice?

Re: std.format deprecation

On Sun, 17 Dec 2017 20:03:11 GMT, Carl Sturtivant wrote:

I'm naively using std.format:format rather than something in vibe.d and get this deprecation message from one call of toString() on a Segment in my own code.

/usr/include/dmd/phobos/std/format.d(3353,28): Deprecation: function vibe.core.path.GenericPath!(PosixPathFormat).GenericPath.Segment.toString is deprecated - Use .name instead.

However, this also appears when dub --force building vibe-d:inet, vibe-d:http, vibe-d:mongodb, vibe-d:web, and building configuration "vibe-core".

Any advice?

I also stumbled over that message in a project a while ago, but didn't find the cause before getting distracted by other issues. After trying a bit harder (it wasn't easy to find because the call to toString was buried in many layers of template calls, protected by a __traits(compiles)) I finally found it and added a workaround: 48a9ddc

Re: std.format deprecation

On Sun, 17 Dec 2017 21:50:57 GMT, Sönke Ludwig wrote:

On Sun, 17 Dec 2017 20:03:11 GMT, Carl Sturtivant wrote:

I'm naively using std.format:format rather than something in vibe.d and get this deprecation message from one call of toString() on a Segment in my own code.

/usr/include/dmd/phobos/std/format.d(3353,28): Deprecation: function vibe.core.path.GenericPath!(PosixPathFormat).GenericPath.Segment.toString is deprecated - Use .name instead.

However, this also appears when dub --force building vibe-d:inet, vibe-d:http, vibe-d:mongodb, vibe-d:web, and building configuration "vibe-core".

Any advice?

I also stumbled over that message in a project a while ago, but didn't find the cause before getting distracted by other issues. After trying a bit harder (it wasn't easy to find because the call to toString was buried in many layers of template calls, protected by a __traits(compiles)) I finally found it and added a workaround: 48a9ddc

Thanks, it'll be nice to avoid that.