schveiguy / iopipe

D language library for modular io
Boost Software License 1.0
77 stars 6 forks source link

Error building example on README.md #21

Closed FraMecca closed 6 years ago

FraMecca commented 6 years ago
Performing "debug" build using /usr/bin/dmd for x86_64.
io 0.2.1: target for configuration "library" is up to date.
iopipe 0.1.2: target for configuration "library" is up to date.
prova ~master: building configuration "application"...
/home/fra/.dub/packages/iopipe-0.1.2/iopipe/source/iopipe/bufpipe.d(558,90): Error: struct `std.io.file.File` is not copyable because it is annotated with @disable
/home/fra/prova/source/app.d(11,10): Error: template instance `iopipe.bufpipe.bufd!(ubyte, GCNoPointerAllocator, 8192LU, File)` error instantiating
/home/fra/.dub/packages/iopipe-0.1.2/iopipe/source/iopipe/zip.d(195,15): Error: struct `iopipe.bufpipe.BufferedInputSource!(AllocatedBuffer!(ubyte, GCNoPointerAllocator, 8192LU), File, 8192LU).BufferedInputSource` is not copyable because it is annotated with @disable
/home/fra/.dub/packages/iopipe-0.1.2/iopipe/source/iopipe/zip.d(289,29): Error: struct `iopipe.bufpipe.BufferedInputSource!(AllocatedBuffer!(ubyte, GCNoPointerAllocator, 8192LU), File, 8192LU).BufferedInputSource` is not copyable because it is annotated with @disable
/home/fra/.dub/packages/iopipe-0.1.2/iopipe/source/iopipe/zip.d(331,20): Error: template instance `iopipe.zip.unzipSrc!(BufferedInputSource!(AllocatedBuffer!(ubyte, GCNoPointerAllocator, 8192LU), File, 8192LU))` error instantiating
/home/fra/prova/source/app.d(12,10):        instantiated from here: unzip!(GCNoPointerAllocator, BufferedInputSource!(AllocatedBuffer!(ubyte, GCNoPointerAllocator, 8192LU), File, 8192LU))
/usr/bin/dmd failed with exit code 1.
schveiguy commented 6 years ago

Thanks. Probably should be File(args[1]).refCounted.bufd...

I admit, I haven't ever built that example :)

EDIT: yep, that fixes it.

schveiguy commented 6 years ago

It's fixed now, but looking at the example, it seems much less straightforward. I may incorporate refCounted into bufd and friends when the thing can't be copied.