nim-lang / nim-zmq

Nim ZMQ wrapper
https://nim-lang.github.io/nim-zmq/zmq.html
MIT License
67 stars 17 forks source link

Updated to work with ZeroMQ version 4 #2

Closed idlewan closed 10 years ago

idlewan commented 10 years ago

As requested at https://github.com/nimrod-code/packages/pull/84

dom96 commented 10 years ago

Any reason why you moved it out of the src dir?

idlewan commented 10 years ago

I don't like unnecessary cruft. It's a single file, so it doesn't deserve its own directory.

dom96 commented 10 years ago

hrm, ok.

fowlmouth commented 9 years ago

@idlewan , @dom96 please note

idlewan commented 9 years ago

every package on nim-lang had the same layout

I think every package layout should adapt to what it contains

I personally like having examples downloaded with the wrappers. That means I can just open them directly with my editor and compile them/see how I shoud use it/see how it works, instead of finding the github page of the package, cloning it somewhere temporary and do the same thing. Maybe that's just me.

With srcDir, the package wouldn't respect the preffered layout (which I quite prefer to the every file in its own directory potential madness):

If your package exposes only a single module, then that module should be present in the root directory (the directory with the .nimble file) of your git repository, it is recommended that in this case you name that module whatever your package's name is.

I acknowledge it would be weird to have a clash of imports if someone creates the same example directory structure and same file names. However, private is a potential fix, although renaming the example directory to private is weird and doesn't make that much sense.

In regards to modules which you do not wish to be exposed. You should place them in a PackageName/private directory.


The installFiles directive could be used instead of srcDir to block the installation of the examples directory. We could also need another directive to say "install these files but don't import them", much like the private directory does. Is the presence of the examples directory that troubling? Do you have an example where it does clash imports?