Git Product home page Git Product logo

dist's Introduction

dist

Test Matrix Minimum supported Nim version License

a nim distribution

What Is It?

The idea here is to curate a "batteries included" ecosystem of modules that interoperate and form a broadly useful basis for projects. Ideally, the distribution is so successful that we can move modules from the compiler's standard library into the distribution.

There's a little more detail in this Fusion RFC comment.

How Does It Work?

Each branch of the distribution will correspond to a version of the Nim compiler. Some effort will be made towards forward compatibility, but little effort will be made for backward compatibility -- check out the version of the distribution that (at least) matches your compiler!

What's The Point Of That?

Now compatibility of your project can be tied to specific compiler versions and a monorepo of supporting software that should work together with that version of Nim. No combinatorial explosion of dependency interoperability calculation is necessary, and such calculations and tests may be shared by all users.

What Goes Into The Distribution?

We'll start with the compiler's test suite of so-called important packages and consider additional packages which help to test the distribution or add broadly useful functionality.

Okay, I'm Sold. How Do I Use It?

Automatic Installation of the Distribution

The easiest way to use the distribution is via gitnim:

https://github.com/nim-works/gitnim or https://gitnim.com/

$ git nim

git nim

Manual Installation of the Distribution

$ git clone --depth 1 https://github.com/nim-works/dist
$ cd dist
$ git submodule update --init .

Using the Distribution in Your Project

$ cd ../project
$ echo "--path=../dist" >> nim.cfg
$ nim c project.nim

Updating the Distribution

$ cd ../dist
$ git pull

Seeing What Changed and When

$ cd ../dist
$ git log

Switching Distribution Versions

$ cd ../dist
$ git checkout 1.5.1

Tagging Distribution Versions

$ cd ../dist
$ git tag -a works_with_myproject

Switching to a Specific Tag

$ cd ../dist
$ git checkout works_with_myproject

you get the idea... ๐Ÿ˜‰

License

MIT

dist's People

Contributors

disruptek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dist's Issues

questions

@disruptek

  • what's the difference in your packages between tests and testes
    (https://github.com/disruptek/skiplists)
    (EDIT: testes is actually a package, but appears as an empty dir as it's a submodule in packages that depend on testes; whereas tests is a dir of tests)
  • in https://github.com/disruptek/dist README it mentions git submodule update --init ., is --recursive also needed?
    I wonder because some dirs are empty after git submodule update --init ., eg dist/criterion, dist/grok, etc (and skiplists has a .gitmodules file)
  • skiplists has a submodule criterion, and dist also has a submodule criterion, so you end up with:
dist/criterion
dist/skiplists/criterion

I don't understand where criterion should end up ideally; dist/criterion or dist/skiplists/criterion ?

echo "--path=../dist" >> nim.cfg
nim c project.nim

i tried this:
nim r --path:$nim_D/dist --eval:'import gram/gram'
which gives: /dist/gram/gram.nim(19, 8) Error: cannot open file: skiplists
so presumably some other step is needed? do I also need nimble install skiplists or git submodule update --init from inside skiplists ? if so that would defeat the purpose of dist IMO; what's the correct approach here?

  • IMO there should be a master branch (or main as github now calls it), and 1.5.1 cannot replace this; one should be able to track master indefinitely to get the latest whereas tracking 1.5.1 would stop tracking the latest as soon as nim 1.6 is released.

design

I like the overall design goal, and it seems similar to what I had in mind with chef proposal, see timotheecour/Nim#117

There are notable differences though (more on that later), in particular the fact that chef would build on top of nimble (or nimph etc), not just on top of git submodule; maybe dist also assumes nimble/nimph, but that wasn't clear at all from dist README, which only mentions git submodule.

dist tooling

one big advantage of a distribution is to avoid duplicating work when it comes to essential functions such as:

  • installing required dependencies, updating the distribution, customizing (package manager aspect)
  • doc generation (there should be a top-level theindex.html and links to generated docs, maybe using similar approach as in https://github.com/nim-lang/fusion/blob/master/src/fusion/docutils.nim which generates https://nim-lang.github.io/fusion/theindex.html)
  • CI (similar to important_packages in nim repo)
  • linting, fixing etc
  • the tooling code (doc generation etc) for dist itself could be in another package, so that it can developed independently of the package versioniong that dist is tracking (and so that we can use the latest dist_tooling for the dist tracking nim version 1.2 for example)

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.