-
Notifications
You must be signed in to change notification settings - Fork 23
Description
right now nim imports several projects by copying their files directly into nim's own git index. This makes it hard/impossible to update nim's version of those from upstream, and is just bad general practice anyways, for so many reaons. eg, it's impossible to tell which changes are our own modifications to those projects vs which ones are from upstream.
Eg: it's impossible to review a PR like nim-lang/Nim#6593 (for tinyc) or nim-lang/Nim#5357 (for linenoise) as we can't tell which change is form upstream vs local.
There is a much simpler, standard, way:
- either using git submodules for these (which is essentially a git hash that gets version controlled)
- or some logic to
git clone
those external projects at a specific git hash (very similar), to be called insidekoch boot
orbuild_all.{sh/bat}
main benefit: allows our versions of these external projects to be rebased against upstream regularly, while being able to maintain our own modifications of this (and independenly of nim's own git repo). We'd maintain our own forks if any modification to upstream is needed.
example external projects that should be moved out of Nim's index
- Nim/tinyc (large dependency) => https://github.com/TinyCC/tinycc
- lib/wrappers/linenoise (not large but important dependency for some users, and it's out of date) => https://github.com/antirez/linenoise
- tools/niminst => https://github.com/nim-lang/niminst
pretty bad, both copies have diverged, with different bugs being fixed in both (see niminst source code duplicated (with divergences): nim-lang/niminst vs Nim/tools/niminst/niminst.nim Nim#13406) - Nim/csources (=> https://github.com/nim-lang/csources) at least this one is a separate repo already; if we are using git submodules, this could become a submodule; I know that it's archived, but IMO we should keep updating at regular intervals the version of nim that nim bootstraps from, otherwise it prevents doing important cleanup in nim code. So this could be a csources2 if we want to avoid Nim/csources which is "heavy"
EDIT: => fixed via CIs: attempt to use csources_v1 Nim#16282 and refactor all code that builds csources Nim#17815 - Nim/tests/niminaction (not sure, couldn't find original git repo)
-
linenoise
(it mixes its own history and upstream one) - and these:
- Nim/tests/deps/jester-#head/
- Nim/tests/deps/opengl-1.1.0/
- Nim/tests/deps/x11-1.0/
- Nim/tests/deps/zip-0.2.1/