phobos icon indicating copy to clipboard operation
phobos copied to clipboard

most of phobos should be @safe-ly useable

Open dlangBugzillaToGithub opened this issue 7 years ago • 6 comments

code (@MartinNowak) reported this on 2017-12-21T17:01:00Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=18110

CC List

  • andrei (@andralex)
  • bugzilla (@WalterBright)
  • bugzilla (@WalterBright)
  • forestix
  • greensunny12

Description

Tracking issue for phobos entities that should be @safe, but currently aren't.

Let's reference per-module/package issues if someone goes on a fixing spree, but first this issue is intended to collect such issues.

dlangBugzillaToGithub avatar Dec 21 '17 17:12 dlangBugzillaToGithub

code (@MartinNowak) commented on 2017-12-21T17:01:39Z

std.stdio.File.byLine:

Should be @safe as the internally used buffer is GC allocated, thus unexpected mutation of an escaped line is possible, but cannot cause a memory corruption.

@safe function 'foo' cannot call @system function 'std.stdio.File.byLine!(char, char).byLine'
@safe function 'foo' cannot call @system destructor 'std.stdio.File.ByLine!(char, char).ByLine.~this'
----
std.stdio.File.byLineCopy:

obviously

@safe function 'foo' cannot call @system function 'std.stdio.File.byLineCopy!(char, immutable(char)).byLineCopy'
@safe function 'foo' cannot call @system destructor 'std.stdio.File.ByLineCopy!(immutable(char), char).ByLineCopy.~this'

dlangBugzillaToGithub avatar Dec 21 '17 17:12 dlangBugzillaToGithub

andrei (@andralex) commented on 2017-12-21T18:51:34Z

I'd vote for this, but looks like voting has disappeared.

dlangBugzillaToGithub avatar Dec 21 '17 18:12 dlangBugzillaToGithub

greensunny12 commented on 2018-01-03T04:58:23Z

Made a quick pass through Phobos and started to create issues for an easier overview, progress tracking and management.
The list is still quite large atm.

dlangBugzillaToGithub avatar Jan 03 '18 04:01 dlangBugzillaToGithub

bugzilla (@WalterBright) commented on 2019-12-24T12:47:29Z

Although important, it's more an enhancement, than a bug, isn't it?

dlangBugzillaToGithub avatar Dec 24 '19 12:12 dlangBugzillaToGithub

I’m not sure whether such omnibus issues are exactly a good fit on their own. We should probably split them up and replace them with a list of links to issues or a GitHub project.

@dlang/team-phobos What do you think?

0xEAB avatar Jan 01 '25 19:01 0xEAB

This should either be a project, or list (as todos) all the modules/functions/whatever as items.

thewilsonator avatar Jan 02 '25 04:01 thewilsonator