etcimon / libasync

Cross-platform event loop library of asynchronous objects
MIT License
147 stars 30 forks source link

Failed to build an empty project #94

Closed cyrusmsk closed 1 year ago

cyrusmsk commented 1 year ago

It seems problem with Array container that were mentioned here https://github.com/etcimon/libasync/issues/93

ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(415,31): Error: function core.memory.GC.removeRange(const(void*) p) is not callable using argument types (shared(AsyncSignal)*)

ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(415,31): cannot pass argument cast(shared(AsyncSignal)*)this._payload of type shared(AsyncSignal)* to parameter const(void*) p ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(417,17): Error: none of the overloads of template core.memory.pureFree are callable using argument types !()(shared(AsyncSignal)*) ldc2-1.30.0-osx-arm64/bin/../import/core/memory.d(1065,6): Candidate is: pureFree()(void* ptr) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(175,16): Error: expression (const ref inout(const(Array!(shared(AsyncSignal)))) __dop495 = this._outer();) , (__error) of type _error_ is not implicitly convertible to return type ref shared(inout(const(AsyncSignal))) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(180,16): Error: expression (const ref inout(const(Array!(shared(AsyncSignal)))) __dop496 = this._outer();) , (__error) of type _error_ is not implicitly convertible to return type ref shared(inout(const(AsyncSignal))) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(229,16): Error: expression (const ref inout(const(Array!(shared(AsyncSignal)))) __dop497 = this._outer();) , (__error) of type _error_ is not implicitly convertible to return type ref shared(inout(const(AsyncSignal))) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(244,5): Error: template instance std.container.array.RangeT!(const(Array!(shared(AsyncSignal)))) error instantiating ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(628,19): instantiated from here: RangeT!(Array!(shared(AsyncSignal))) ../../../.dub/packages/libasync-0.9.1/libasync/source/libasync/posix.d(3145,19): instantiated from here: Array!(shared(AsyncSignal)) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(175,16): Error: expression (immutable ref immutable(Array!(shared(AsyncSignal))) __dop506 = this._outer();) , (__error) of type _error_ is not implicitly convertible to return type ref immutable(AsyncSignal) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(180,16): Error: expression (immutable ref immutable(Array!(shared(AsyncSignal))) __dop507 = this._outer();) , (__error) of type _error_ is not implicitly convertible to return type ref immutable(AsyncSignal) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(229,16): Error: expression (immutable ref immutable(Array!(shared(AsyncSignal))) __dop508 = this._outer();) , (__error) of type _error_ is not implicitly convertible to return type ref immutable(AsyncSignal) ldc2-1.30.0-osx-arm64/bin/../import/std/container/array.d(634,28): Error: template instance std.container.array.RangeT!(immutable(Array!(shared(AsyncSignal)))) error instantiating ../../../.dub/packages/libasync-0.9.1/libasync/source/libasync/posix.d(3145,19): instantiated from here: Array!(shared(AsyncSignal))

System info: macOS 12.0.1, LDC2 (1.30, m1 compatible)

etcimon commented 1 year ago

It seems like a dependency on std.containers.array was introduced in a pull request previously, I usually try to avoid the standard libraries because of possible breaking changes. It should be using memutils.vector : Array now

etcimon commented 1 year ago

I addded the CI to test for OSX. It seems like the directory watcher is still broken on kqueue, if you have a Mac and time to fix it you're free to open a pull request! I'll probably be able to do it within a few weeks otherwise