nim-lang / nimble

Package manager for the Nim programming language.
https://nim-lang.github.io/nimble/index.html
Other
1.25k stars 190 forks source link

Ability to import NimScript modules in tasks #181

Open dom96 opened 8 years ago

dom96 commented 8 years ago

This may need to be done at runtime, because placing an import statement at the top of a Nimble file will cause the module to be imported each time the Nimble file is evaluated.

genotrance commented 5 years ago

So with #635, nimble files are just executed with nim e. Assuming that PR goes through, is there something extra needed within nimble?

Nim only allows imports at the top level so seems like this should be tracked there.

dom96 commented 5 years ago

I think I had a fancy mechanism in mind that would allow importing modules that are perhaps offered by other packages, this would mean that the imports would need to be in the tasks and that the tasks would only be executable when those packages are installed. It's possible this isn't really all that useful.

genotrance commented 5 years ago

I propose closing this.

dom96 commented 5 years ago

I'll demote this, but I'd like to keep it as a potential feature/idea.