Thread overview
[phobos] std.regexp deprecation?
Jul 15, 2012
Jonathan M Davis
Jul 15, 2012
Jonathan M Davis
Jul 15, 2012
Dmitry Olshansky
Jul 15, 2012
Jonathan M Davis
Jul 15, 2012
Jonathan M Davis
July 15, 2012
While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.

Regards,
Alex
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos

July 15, 2012
On Sunday, July 15, 2012 20:50:10 Alex Rønne Petersen wrote:
> While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.

We're stuck with it right now. The problem is std.file.listDeps. listDeps can't be removed yet, because it has an overload with functionality which dirEntries doesn't have (something to do with glob matching IIRC), and listDeps uses std.regexp (that exact overload IIRC). Until someone goes and creates an appropriate overload of dirEntries, we can't remove listDeps, so we can't remove std.regexp. Someone (cyershadow? who I think is Vlladimir?) was supposedly going to create a pull request for it when it first came up, but that never materialized, and neither I nor anyone else has spent the time to deal with it. But I'm far from an expert with regexes, so I've been a bit reticent to tackle the problem, and I've had plenty of else to do. So, it's just sat there. It's not the end of the world for deprecated stuff to sit around for a while (it _is_ deprecated, after all, so the compiler will complain if you use it), but we really do need to get that sorted out so that listDeps and std.regexp can be removed.

- Jonathan M Davis
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
July 15, 2012
On Sun, Jul 15, 2012 at 9:04 PM, Jonathan M Davis <jmdavisProg@gmx.com> wrote:
> On Sunday, July 15, 2012 20:50:10 Alex Rønne Petersen wrote:
>> While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.
>
> We're stuck with it right now. The problem is std.file.listDeps. listDeps can't be removed yet, because it has an overload with functionality which dirEntries doesn't have (something to do with glob matching IIRC), and listDeps uses std.regexp (that exact overload IIRC). Until someone goes and creates an appropriate overload of dirEntries, we can't remove listDeps, so we can't remove std.regexp. Someone (cyershadow? who I think is Vlladimir?) was supposedly going to create a pull request for it when it first came up, but that never materialized, and neither I nor anyone else has spent the time to deal with it. But I'm far from an expert with regexes, so I've been a bit reticent to tackle the problem, and I've had plenty of else to do. So, it's just sat there. It's not the end of the world for deprecated stuff to sit around for a while (it _is_ deprecated, after all, so the compiler will complain if you use it), but we really do need to get that sorted out so that listDeps and std.regexp can be removed.

I see no function named listDeps though? Do you mean listDir or something?

Regards,
Alex
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos

July 15, 2012

> On Sunday, July 15, 2012 20:50:10 Alex Rønne Petersen wrote:
>> While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.
> 
> We're stuck with it right now. The problem is std.file.listDeps. listDeps can't be removed yet, because it has an overload with functionality which dirEntries doesn't have (something to do with glob matching IIRC), and listDeps uses std.regexp (that exact overload IIRC).

It was deemed that filtering dirEntries with filter!(x => match(x, reg)). I fail to see what's missing.

> Until someone goes and creates an appropriate overload of dirEntries, we can't remove listDeps, so we can't remove std.regexp.


> Someone (cyershadow? who I think is Vlladimir?) was supposedly going to create a pull request for it when it first came up, but that never materialized, and neither I nor anyone else has spent the time to deal with it.

I, for one, tried and got killed by forward reference bug hell. std.file has been plagued with these for a long time.

The pull itself is a copy & paste with 1 line diff.

> But I'm far from an expert with regexes, so I've been a bit reticent to tackle the problem, and I've had plenty of else to do. So, it's just sat there. It's not the end of the world for deprecated stuff to sit around for a while (it _is_ deprecated, after all, so the compiler will complain if you use it), but we really do need to get that sorted out so that listDeps and std.regexp can be removed.
> 
> - Jonathan M Davis
> _______________________________________________
> phobos mailing list
> phobos@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
July 15, 2012
On Sunday, July 15, 2012 21:20:02 Alex Rønne Petersen wrote:
> I see no function named listDeps though? Do you mean listDir or something?

Sorry. listDir, not listDeps.

- Jonathan M Davis
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
July 15, 2012
On Sunday, July 15, 2012 21:24:19 Dmitry Olshansky wrote:
> > On Sunday, July 15, 2012 20:50:10 Alex Rønne Petersen wrote:
> >> While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.
> > 
> > We're stuck with it right now. The problem is std.file.listDeps. listDeps can't be removed yet, because it has an overload with functionality which dirEntries doesn't have (something to do with glob matching IIRC), and listDeps uses std.regexp (that exact overload IIRC).
> 
> It was deemed that filtering dirEntries with filter!(x => match(x, reg)). I
> fail to see what's missing.

I don't remember the details, but you were in on that discussion, so if you really think that dirEntries has what it needs, then we can give listDir the boot. I just haven't killed it yet, because it was my understanding that dirEntries was still missing that one piece of functionality.

> > Someone (cyershadow? who I think is Vlladimir?) was
> > supposedly going to create a pull request for it when it first came up,
> > but
> > that never materialized, and neither I nor anyone else has spent the time
> > to deal with it.
> 
> I, for one, tried and got killed by forward reference bug hell. std.file has been plagued with these for a long time.
> 
> The pull itself is a copy & paste with 1 line diff.

I don't ever recall what the exact issue was, so I have no idea what it takes to fix it. I'd have to go digging through messages on githhub to find the discussion. But forward references definitely suck, so I can understand if that prevented a proper solution.

- Jonathan M Davis
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
July 15, 2012
On Sun, Jul 15, 2012 at 8:50 PM, Alex Rønne Petersen <xtzgzorex@gmail.com> wrote:
> While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.

Okay, I just tried removing std.regexp completely from Phobos and removed listdir/listDir from std.file and running the test suite worked fine on OS X. Note that no part of DMD's test suite makes use of listDir() or std.regexp.

Do we want to just get rid of it? If so, I can send a pull request right now.

Regards,
Alex
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos

July 15, 2012
On Sunday, July 15, 2012 22:19:05 Alex Rønne Petersen wrote:
> On Sun, Jul 15, 2012 at 8:50 PM, Alex Rønne Petersen
> 
> <xtzgzorex@gmail.com> wrote:
> > While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.
> 
> Okay, I just tried removing std.regexp completely from Phobos and removed listdir/listDir from std.file and running the test suite worked fine on OS X. Note that no part of DMD's test suite makes use of listDir() or std.regexp.
> 
> Do we want to just get rid of it? If so, I can send a pull request right now.

Fine with me. If you've already done the work, we might as well just use it before it becomes unmergeable due to other merges. From what Dmitry said, it sounds like there's a workaround for the missing listDir functionality, and if we later decide that we need to add something to dirEntries, we can do that then.

- Jonathan M Davis
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
July 15, 2012
On Sun, Jul 15, 2012 at 10:24 PM, Jonathan M Davis <jmdavisProg@gmx.com> wrote:
> On Sunday, July 15, 2012 22:19:05 Alex Rønne Petersen wrote:
>> On Sun, Jul 15, 2012 at 8:50 PM, Alex Rønne Petersen
>>
>> <xtzgzorex@gmail.com> wrote:
>> > While we're on the subject of deprecations, what's going to happen to std.regexp? It was apparently deprecated in 2.055 which is quite a few moons ago.
>>
>> Okay, I just tried removing std.regexp completely from Phobos and removed listdir/listDir from std.file and running the test suite worked fine on OS X. Note that no part of DMD's test suite makes use of listDir() or std.regexp.
>>
>> Do we want to just get rid of it? If so, I can send a pull request right now.
>
> Fine with me. If you've already done the work, we might as well just use it before it becomes unmergeable due to other merges. From what Dmitry said, it sounds like there's a workaround for the missing listDir functionality, and if we later decide that we need to add something to dirEntries, we can do that then.

https://github.com/D-Programming-Language/phobos/pull/694

Better let it run through the auto tester just in case.

Regards,
Alex
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos