Thread overview
[Issue 19064] [REG2.081] Vibe.d's InterfaceProxy no longer works
Jul 05, 2018
Seb
Jul 05, 2018
Seb
Jul 05, 2018
RazvanN
[Issue 19064] [REG2.081] getOverloads traits returns empty tuples for void functions
Jul 05, 2018
Seb
Jul 05, 2018
Vladimir Panteleev
Jul 11, 2018
Basile B.
July 05, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

--- Comment #1 from Seb <greeenify@gmail.com> ---
Managed to find the root cause of the regression:

cat << EOF > minimal.d
enum IOMode { all}

struct blocking {}

interface InputStream {
        @safe:

        @property bool empty();

        @property ulong leastSize();

        @property bool dataAvailableForRead();

        const(ubyte)[] peek();

        size_t read(scope ubyte[] dst, IOMode mode);
        final void read(scope ubyte[] dst) { auto n = read(dst, IOMode.all);
assert(n == dst.length); }
}


interface OutputStream {
        @safe:

        size_t write(in ubyte[] bytes, IOMode mode);
        final void write(in ubyte[] bytes) { auto n = write(bytes, IOMode.all);
assert(n == bytes.length); }
        final void write(in char[] bytes) { write(cast(const(ubyte)[])bytes); }

        void flush();

        void finalize();
}

interface Stream : InputStream, OutputStream {
}


interface ConnectionStream : Stream {
        @safe:

        @property bool connected() const;
        void close();
}

static foreach (member; __traits(allMembers, ConnectionStream))
{
    pragma(msg, __traits(getOverloads, ConnectionStream, member));
}
EOF

with 2.080.1:

---
tuple(connected)
tuple(close)
tuple(empty)
tuple(leastSize)
tuple(dataAvailableForRead)
tuple(peek)
tuple(read, read)
tuple(write, write, write)
tuple(flush)
tuple(finalize)
---

with 2.081.0:

---
tuple()
tuple()
tuple(empty)
tuple(leastSize)
tuple(dataAvailableForRead)
tuple(peek)
tuple(read, read)
tuple(write, write, write)
tuple(flush)
tuple(finalize)
---

That's why the proxy-wrapping doesn't work.

--
July 05, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

--- Comment #2 from Seb <greeenify@gmail.com> ---
See also: https://github.com/vibe-d/vibe.d/issues/2181

--
July 05, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #3 from RazvanN <razvan.nitu1305@gmail.com> ---
PR: https://github.com/dlang/dmd/pull/8456

--
July 05, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

Seb <greeenify@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[REG2.081] Vibe.d's         |[REG2.081] getOverloads
                   |InterfaceProxy no longer    |traits returns empty tuples
                   |works                       |for void functions

--
July 05, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

--- Comment #4 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to Seb from comment #0)
> I'm still trying to reduce vibe-core, it's a bit difficult because DustMite is pretty greedy and just removing the mixin methods would also lead to the attribute not being found.

The best way to reduce a regression is to invoke a working and broken compiler in the test script:

https://github.com/CyberShadow/DustMite/wiki/Reducing-a-regression-between-two-D-versions

--
July 06, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/d3f65c73d521f0279c57fec4aec09d03f49b4028 Fix Issue 19064 - [REG2.081] Vibe.d's InterfaceProxy no longer works

https://github.com/dlang/dmd/commit/678a445c5a275d7dace466970b48cb2961341cd1 Merge pull request #8456 from RazvanN7/Issue_19064

Fix Issue 19064 - [REG2.081] Vibe.d's InterfaceProxy no longer works merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzbach@gmail.com>

--
July 06, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
July 11, 2018
https://issues.dlang.org/show_bug.cgi?id=19064

Basile B. <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kntroh@gmail.com

--- Comment #6 from Basile B. <b2.temp@gmx.com> ---
*** Issue 19076 has been marked as a duplicate of this issue. ***

--