GithubHelp home page GithubHelp logo

Comments (3)

ggb-sw avatar ggb-sw commented on June 11, 2024

OK, I was a little premature in that at least part of the problem (that of having to duplicate code in multiple nimble files) can be mitigated by putting that code in an external include file (which I have also included common tasks - hence why include rather than import).

The issues of portability and future proofing would still exist.

from nim.

penguinite avatar penguinite commented on June 11, 2024

If you don't mind me asking this, what do you need this for? because there might be a better way to solve your issue, than implementing this.

from nim.

ggb-sw avatar ggb-sw commented on June 11, 2024

@penguinite I don't mind you asking at all.

I am writing some code (for my own amusement only) with interdependent modules. Clearly, should I one day decide to release these musings into the wild then the nimble config files should reflect dependencies between the modules, but so long as the modules remain in my own little private zoo of modules then nimble gets confused by references to modules that are not available in the wild. Thus I have to be able to make the dependency references conditional on whether the modules are in my zoo or out in the wild. Thus I am placing lines such as:

if isInstalledPack():
  requires "other_module"

So when running within my zoo, isInstalledPack() returns false and the requires statement is ignored, but if the module is ever released into the wild then isInstalledPack() will return true and nimble knows to download "other_module".

from nim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.