Skip to content

allow stdlib+compiler to have their own locked down, isolated nimble dependencies that live in a separate namespace (eg stdx/regex) #793

@timotheecour

Description

@timotheecour

the following would IMO be the perfect solution, allowing stdlib/compiler/tools to use nimble packages, while not clashing with user installed packages

import std/strutils # stdlib
import stdx/regex # controlled via `nimble install regex` from compiler installation, using fixed hashes for all dependent pkgs
import pkg/regex # controlled via `nimble install regex` from user; stdx/regex and pkg/regex resolve as separate modules
import regex # same as pkg/regex

the rare case of exportc procs can be dealt with using a exportc prefix (eg "stdx") to avoid duplicate definition errors

the stdx prefix is not even essential, ie, std/regex could be used to, and modules could transparently be re-mapped to a separate nimble package without breaking user code nor interfering with user installed nimble packages (which could be a different version or same, irrelevant) ; neat.

links

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions