Bug 23190 – std.stdio.File should be usable in @safe

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-16T00:43:28Z
Last change time
2024-12-01T16:40:07Z
Keywords
safe
Assigned to
No Owner
Creator
Susan
Blocks
18110
Moved to GitHub: phobos#9841 →

Comments

Comment #0 by su+dlangissues — 2022-06-16T00:43:28Z
though the documentation claims that File is a safe wrapper around equivalent c functions, several methods are not actually @safe.
Comment #1 by dkorpel — 2022-06-16T10:28:58Z
Looks like the biggest problem is that `DirIterator` and `ByLineImpl` use `std.typecons : RefCounted` which has a `@system` destructor.
Comment #2 by dkorpel — 2022-06-16T10:30:50Z
It would be helpful to get this in: https://github.com/dlang/phobos/pull/8368
Comment #3 by dlang-bot — 2022-06-16T10:38:33Z
@dkorpel created dlang/phobos pull request #8475 "Issue 23190 - make some std.file unittests `@safe`" mentioning this issue: - Issue 23190 - make some std.file unittests `@safe` https://github.com/dlang/phobos/pull/8475
Comment #4 by dlang-bot — 2022-06-16T11:39:36Z
dlang/phobos pull request #8475 "Issue 23190 - make some std.file unittests `@safe`" was merged into master: - bf405829c5d8313c400012fea57113df2a0959fc by Dennis Korpel: Issue 23190 - make some std.file unittests `@safe` https://github.com/dlang/phobos/pull/8475
Comment #5 by dlang-bot — 2022-08-03T15:12:03Z
@RubyTheRoobster updated dlang/phobos pull request #8525 "fix issue 23140" mentioning this issue: - Issue 23190 - make some std.file unittests `@safe` https://github.com/dlang/phobos/pull/8525
Comment #6 by robert.schadek — 2024-12-01T16:40:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9841 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB