Closed konsumer closed 1 year ago
Zippy does not export zip stuff by default (nor tarball stuff), you'll want to import zippy/ziparchives.
Sorry, my example was incomplete. I think I forgot to write the rest of it. I am importing zippy/ziparchives
but the types are not exported, so cannot be referenced. Here is a more complete example:
import zippy/ziparchives
type
Null0Game* = object
files*: ZipArchiveReader
proc newNull0Game*(filename: string): Null0Game =
## Create a new Game instance
var game: Null0Game
game.files = openZipArchive(filename)
return game
Since zippy/ziparchives
doesn't export ZipArchiveReader
(only openZipArchive
) I can't reference the type.
Like, I can do this:
var reader = openZipArchive("cool.zip")
but not
var reader:ZipArchiveReader = openZipArchive("cool.zip")
Ah I see, yeah ZipArchiveReader
should be exported. Doing that quick here https://github.com/guzba/zippy/pull/64
Yep, sorry for the lack of clarity.
Tagged as release 0.10.10, should be good to go!
This may be an issue with me being new to nim, but if I want to keep a reference to a
ZipArchiveReader
it's not exposed:I get
undeclared identifier: 'ZipArchiveReader'
. I think it just needs a few*
to allow type-reference.I am happy to PR for this, if this is the right way.