Jump to page: 1 2
Thread overview
[Issue 18024] checkedint.Warn should be @safe
[Issue 18024] checkedint should be usable in @safe nothrow pure @nogc
Dec 01, 2017
Seb
Dec 15, 2017
Jack Stouffer
Dec 15, 2017
Seb
Dec 15, 2017
Jack Stouffer
Dec 15, 2017
Seb
Dec 15, 2017
Jack Stouffer
Dec 15, 2017
Seb
Dec 15, 2017
Seb
Jan 03, 2018
Seb
[Issue 18024] checkedint.Abort should be @safe
Mar 11, 2018
Seb
Jun 06, 2018
Seb
[Issue 18024] checkedint.Abort and checkedint.Warn should be @safe
Mar 24, 2021
Nathan S.
Mar 24, 2021
Nathan S.
Mar 24, 2021
Dlang Bot
Mar 24, 2021
Dlang Bot
December 01, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Linux                       |All

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

Jack Stouffer <jack@jackstouffer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jack@jackstouffer.com

--- Comment #1 from Jack Stouffer <jack@jackstouffer.com> ---
Isn't this just a matter of using a custom hook? Or are you saying the default behavior should be different?

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

--- Comment #2 from Seb <greensunny12@gmail.com> ---
> Isn't this just a matter of using a custom hook? Or are you saying the default behavior should be different?

Well, the default hook Abort just SEGFAULTs / assert(0)s will fullfils all the
attributes given.

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

--- Comment #3 from Jack Stouffer <jack@jackstouffer.com> ---
(In reply to Seb from comment #2)
> > Isn't this just a matter of using a custom hook? Or are you saying the default behavior should be different?
> 
> Well, the default hook Abort just SEGFAULTs / assert(0)s will fullfils all
> the attributes given.

Don't forget it also prints to stderr, which is why it's @system impure gc and throws

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|checkedint should be usable |checkedint.Warn should be
                   |in @safe nothrow pure @nogc |@safe

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

--- Comment #4 from Jack Stouffer <jack@jackstouffer.com> ---
The problem with trying to make Warn @safe is File is still unsafe and will be for the foreseeable future.

IMO, Abort should be modified to not use Warn, and a new Hook called debug should give the same behavior as Abort has now. That way, by default checked is @nogc @safe nothrow pure

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

--- Comment #5 from Seb <greensunny12@gmail.com> ---
> Don't forget it also prints to stderr, which is why it's @system impure gc and throws

Yeah I did forget about this when I opened the issue (didn't had time to dive
into this then).
Anyhow it `Warn` can easily be made @safe:

PR https://github.com/dlang/phobos/pull/5928

--
December 15, 2017
https://issues.dlang.org/show_bug.cgi?id=18024

--- Comment #6 from Seb <greensunny12@gmail.com> ---
> The problem with trying to make Warn @safe is File is still unsafe and will be for the foreseeable future.

Well, but we can use the same "trick" / "workaround" as used for stdout?

> IMO, Abort should be modified to not use Warn, and a new Hook called debug should
give the same behavior as Abort has now. That way, by default checked is @nogc @safe nothrow pure

That sounds very reasonable!

--
January 03, 2018
https://issues.dlang.org/show_bug.cgi?id=18024

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |18110


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=18110
[Issue 18110] most of phobos should be @safe-ly useable
--
March 11, 2018
https://issues.dlang.org/show_bug.cgi?id=18024

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|checkedint.Warn should be   |checkedint.Abort should be
                   |@safe                       |@safe

--
« First   ‹ Prev
1 2