Skip to content

library compiles on Mac with errors #14

Description

@tbschneider

I create a project with dub init` and append a dependency to serialport ~>2.2.3.

dub build failed with exit code 1:

    Starting Performing "debug" build using /Users/.../opt/dmd2/osx/bin/dmd for x86_64.
    Building serialport 2.2.3: building configuration [library]
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/util.d(59,65): Error: returning `PairList(null).this(list)` escapes a reference to variadic parameter `list`
auto pairList(A,B)(Pair!(A,B)[] list...) { return PairList!(A,B)(list); }
                                                                ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/types.d(141,49): Error: CTFE failed because of previous errors in `pairList`
        static immutable unixBaudList = pairList(
                                                ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/util.d(34,43): Error: `this.list` is not yet implemented at compile time
        bool isUniqA() @property { return list.all!(v=>countA(v.a) == 1); }
                                          ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/util.d(34,47):        called from here: `all(this.list)`
        bool isUniqA() @property { return list.all!(v=>countA(v.a) == 1); }
                                              ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/types.d(185,19):        called from here: `unixBaudList.isUniqA()`
    static assert(unixBaudList.isUniqA, "not uniq A vals in unix baud list");
                  ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/types.d(185,5):        while evaluating: `static assert(unixBaudList.isUniqA)`
    static assert(unixBaudList.isUniqA, "not uniq A vals in unix baud list");
    ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/util.d(35,43): Error: `this.list` is not yet implemented at compile time
        bool isUniqB() @property { return list.all!(v=>countB(v.b) == 1); }
                                          ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/util.d(35,47):        called from here: `all(this.list)`
        bool isUniqB() @property { return list.all!(v=>countB(v.b) == 1); }
                                              ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/types.d(186,19):        called from here: `unixBaudList.isUniqB()`
    static assert(unixBaudList.isUniqB, "not uniq B vals in unix baud list");
                  ^
../../../../.dub/packages/serialport/2.2.3/serialport/source/serialport/types.d(186,5):        while evaluating: `static assert(unixBaudList.isUniqB)`
    static assert(unixBaudList.isUniqB, "not uniq B vals in unix baud list");
    ^
Error /Users/.../opt/dmd2/osx/bin/dmd failed with exit code 1.

DUB version 1.39.0-rc.1, built on Sep 6 2025
chip: Apple M4 Pro
macOS: Sequoia 15.6.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions