dlang-community / libdparse

Library for lexing and parsing D source code
https://libdparse.dlang.io
Boost Software License 1.0
114 stars 56 forks source link

Migrate stdx.allocator to std.experimental instead? #447

Closed nordlow closed 2 years ago

nordlow commented 2 years ago

https://github.com/dlang-community/stdx-allocator hasn't been modified for 2 years.

Should libdparse, dsymbol and dscanner move to the more recently updated std.experimental.allocator?

If there's a consensus I can do the migration.

FYI, @RazvanN7

WebFreak001 commented 2 years ago

doesn't using std.experimental.* potentially introduce breaking changes without warnings?

It would probably make sense to update the stdx-allocator package to contain the new std.experimental.allocator code

nordlow commented 2 years ago

Potentially, yes, but with deprecation warnings as usual if they are breaking. The only potential deprecations in std.experimental.allocator I can think of would be changes to allocator member function qualifiers. The problem with having libdparse use stdx.allocator is that it contaminates dsymbol and dscanner to also use instances of stdx.allocators as stdx-specific allocators are passed as IAllocator-parameters to constructors of some of the libdparse classes that are inherited in dsymbol. A leaky abstraction that is.

FYI, @RazvanN7.

JohanEngelen commented 2 years ago

+1 for removing the stdx dependency.

To avoid silent regression, libdparse should be added to the dlang community tester (if it is not already on that list).

nordlow commented 2 years ago

So, shall I do the switch?

nordlow commented 2 years ago

See https://github.com/dlang-community/libdparse/pull/463.