Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std.experimental.allocator in place of stdx.allocator #670

Closed

Conversation

nordlow
Copy link
Contributor

@nordlow nordlow commented Jun 20, 2022

No description provided.

@nordlow nordlow force-pushed the use-std-experimental-allocator branch from 3120f14 to c52d6dc Compare June 20, 2022 08:49
@nordlow nordlow changed the title WIP: Use std experimental allocator Use std experimental allocator Jun 20, 2022
@nordlow nordlow changed the title Use std experimental allocator Use std.experimental.allocator Jun 20, 2022
@nordlow nordlow changed the title Use std.experimental.allocator Use std.experimental.allocator in place of stdx.allocator Jun 20, 2022
dub.json Outdated Show resolved Hide resolved
@nordlow nordlow force-pushed the use-std-experimental-allocator branch from c52d6dc to 502b91b Compare June 20, 2022 15:06
@nordlow
Copy link
Contributor Author

nordlow commented Jun 20, 2022

Ouch, I realized I made a breaking change to https://github.com/dlang-community/dsymbol when renaming

alias ASTAllocator = Mallocator;

to

alias SymbolsAllocator = Mallocator;

. Should I revert that change or make that definition be local to the dsymbol package using

package alias SymbolsAllocator = Mallocator;

? I'm asking because ASTAllocator is currently referenced by DCD.

@nordlow
Copy link
Contributor Author

nordlow commented Jun 20, 2022

Build is failing because of https://code.dlang.org/packages/dsymbol hasn't been bumped to 0.13.1.

@WebFreak001
Copy link
Member

WebFreak001 commented Jun 20, 2022

I think renaming the SemanticAlocator back to ASTAllocator would be best.

@nordlow
Copy link
Contributor Author

nordlow commented Jun 23, 2022

I think renaming the SemanticAlocator back to ASTAllocator would be best.

Done at dlang-community/dsymbol#179

@WebFreak001
Copy link
Member

tag was released, don't know when dub will pick it up

@nordlow nordlow force-pushed the use-std-experimental-allocator branch from 7685795 to 3a28341 Compare July 14, 2022 08:40
@nordlow nordlow force-pushed the use-std-experimental-allocator branch from 3a28341 to f58a844 Compare July 14, 2022 08:41
@nordlow
Copy link
Contributor Author

nordlow commented Jul 14, 2022

I've reverted to using ASTAllocator, @WebFreak001.

Now using allocatorObject in doc.d triggers

/usr/include/dmd/phobos/std/experimental/allocator/package.d(2877,16): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.alignment` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2875,29): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.alignment` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2885,34): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.goodAllocSize` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2883,21): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.goodAllocSize` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2893,29): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.allocate` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2891,21): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.allocate` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2903,40): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.alignedAllocate` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2900,21): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.alignedAllocate` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2914,67): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.owns` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2912,22): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.owns` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2922,31): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.expand` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2919,19): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.expand` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2930,31): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.reallocate` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2928,19): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.reallocate` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2942,42): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.alignedReallocate` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2934,10): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.alignedReallocate` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2951,47): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.resolveInternalPointer` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2947,13): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.resolveInternalPointer` may throw but is marked as `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2967,35): Error: function `stdx.allocator.CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no).CAllocatorImpl.deallocate` is not `nothrow`
/usr/include/dmd/phobos/std/experimental/allocator/package.d(2963,19): Error: function `std.experimental.allocator.CAllocatorImpl!(CAllocatorImpl!(AllocatorList!(Factory, Mallocator), Flag.no), Flag.no).CAllocatorImpl.deallocate` may throw but is marked as `nothrow`

I don't have much more time to look into this. Can you take a look? The errors might be related to std.experimental.allocator using it's recent addition RCIAllocator in place of IAllocator which stdx.allocator uses. It might be that we need to replace IAllocator with RCIAllocator in dsymbol.

@WebFreak001
Copy link
Member

IAllocator isn't used in dsymbol anymore since your PR. Is it possible that the dependencies weren't updated yet when you first ported this and then later kept it that way? Otherwise I would propose we could just use my PR which does the same things as your one, but I made the PR in a similar upgrade scheme as the other allocator change PRs you did, replacing all IAllocator with RCIAllocator and using allocatorObject with it. I added your makefile changes, etc., to it as well.

@nordlow
Copy link
Contributor Author

nordlow commented Jul 14, 2022

IAllocator isn't used in dsymbol anymore since your PR. Is it possible that the dependencies weren't updated yet when you first ported this and then later kept it that way? Otherwise I would propose we could just use my PR which does the same things as your one, but I made the PR in a similar upgrade scheme as the other allocator change PRs you did, replacing all IAllocator with RCIAllocator and using allocatorObject with it. I added your makefile changes, etc., to it as well.

Perfect. Just go ahead with that then. I can review.

Closing this in favor of #672

@nordlow nordlow closed this Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants