Fix Phobos dependencies on autodecoding

Vladimir Panteleev thecybershadow.lists at gmail.com
Thu Aug 15 12:09:02 UTC 2019


On Tuesday, 13 August 2019 at 07:08:03 UTC, Walter Bright wrote:
> https://github.com/dlang/phobos/pull/7130

Thank you for working on this!

Surprisingly, the amount of breakage this causes seems rather 
small. I sent a few PRs for the modules that I am listed as a 
code owner of.

However, I noticed that one kind of the breakage is silent (the 
code compiles and runs, but behaves differently). This makes me 
uneasy, as it would be difficult to ensure that programs are 
fully and correctly updated for a (hypothetical) transition to 
no-autodecode.

I found two cases of such silent breakage. One was in std.stdio:

https://github.com/dlang/phobos/pull/7140

If there was a warning or it was an error to implicitly convert 
char to dchar, the breakage would have been detected during 
compilation. I'm sure we discussed this before. (Allowing a char, 
which might have a value >=0x80, to implicitly convert to dchar, 
which would be nonsense, is problematic, etc.)

The other instance of silent breakage was in std.regex. This 
unittest assert started failing:

https://github.com/dlang/phobos/blob/5cb4d927e56725a38b0b1ea1548d9954083d3290/std/regex/package.d#L629

I haven't looked into that, perhaps someone more familiar with 
std.regex and std.uni could have a look.



More information about the Digitalmars-d mailing list