StardustPL / Stardust

"A programming language that doesn't make me angry to use it."
https://StardustPL.GitHub.IO/
The Unlicense
4 stars 0 forks source link

Planning: versioning semantics #38

Open LB-- opened 8 years ago

LB-- commented 8 years ago

All libraries will use semantic versioning

Dependencies must be specified in the project JSON, mapping versions to internal names to be used in the code. For example:

"dependencies":
{
    "libblah":
    {
        "name": "blahlib", //code uses "libblah" but compiler searches for "blahlib"
        "location": ["../deps/"],
        "version": "1.6+.21", //exact major 1, minimum minor 6, if minor is 6 minimum patch 21
        "exclude versions": ["1.6.22"]
    },
    "very-common-library":
    {
        "name": "libcommon",
        "version": "1+",
        "exclude versions": ["3+"]
    },
    "LB/somelib":
    {
        "name": "LB/somelib", //slashes are allowed - handling is different per system
        "location": [null, "https://github.com/LB--/somelib.git"], //check standard places first, fallback to github
        "version": "1.0+"
    }
}

All dependencies are optional until proven required by the code. This allows the code to determine which dependencies are actually required while also not directly requesting dependencies deep inside the code in an obscure location.

TODO: what about dynamically loading libraries at runtime?

LB-- commented 8 years ago

Maybe requesting libraries within the source code instead of the JSON isn't so bad. Needs more thought.