Description
tl;dr: I'm calling for a moratorium on copying third-party code into the repo, and I'm proposing that we move a few dirs around.
We all hate code duplication. So why is it okay for us to needlessly copy entire codebases?
snip (Cut out a bunch of back-and-forth here since I feel none of you need to be convinced this is a good idea, only that it's worth the effort to do it. edit: Apparently natt did need convincing. Scroll down for arguments.)
So let's assess the damage (I think this is up-to-date as of 2.10; checkboxes are for arbitrary threshold of 50 kLOC):
/ExternalCoreProjects/Virtu
, Virtu core, < 11 kLOC, upstream is https://github.com/digital-jellyfish/Virtu/tree/master/Virtu/ExternalProjects/NLua
, Lua host, < 10 kLOC, upstream is https://github.com/NLua/NLua/ExternalProjects/iso-parser
, disc system, < 2 kLOC, upstream was on Google Code/blip_buf
, multiple cores, < 2 kLOC, upstream was on Google Code-
/libmupen64plus
, Mupen64Plus and plugins, < 340 kLOC, upstreams are under https://github.com/mupen64plus /lynx
, Handy core, < 12 kLOC, upstream is in tarball (or https://github.com/TASEmulators/mednafen/tree/master/src/lynx)-
/psx
, Octoshock core, < 68 kLOC, upstream is in tarball (or https://github.com/TASEmulators/mednafen/tree/master/src/psx)- resolved by Drop Octoshock #4180
replaced with submodule/quicknes
-
/waterbox/ares64/ares
, Ares64 core, < 55 kLOC, upstream is https://github.com/ares-emulator/ares -
/waterbox/bsnescore/bsnes
, (new) BSNES core, < 67 kLOC, upstream is https://github.com/bsnes-emu/bsnes- moved from my personal notes #11
-
replaced with submodule/waterbox/gpgx
-
/waterbox/libsnes
, (old) BSNES core, < 63 kLOC, upstream is https://github.com/bsnes-emu/bsnes- resolved by Drop old BSNES #4183
/waterbox/nyma/zlib
, zlib for Nyma cores, < 19 kLOC, upstream is https://github.com/madler/zlib-
/waterbox/picodrive
, PicoDrive core, < 79 kLOC, upstream is https://github.com/notaz/picodrive /waterbox/tic80
, TIC-80 core, < 17 kLOC, upstream is https://github.com/nesbox/TIC-80/waterbox/uzem
, Uzem core, < 5 kLOC, upstream is https://github.com/Uzebox/uzebox/tree/master/tools/uzem-
/waterbox/virtualjaguar/src
, Virtual Jaguar core, < 52 kLOC, upstream was on a self-hosted Git server /wonderswan
, Cygne core, < 8 kLOC, upstream is in tarball (or https://github.com/TASEmulators/mednafen/tree/master/src/wswan)
In total, the upper bound is 917 kLOC of source code, severed from its trunks and waiting to bitrot. (For reference, just the BizHawk solution is ~450 kLOC, and Mesen is ~325 kLOC.)
Not listed are several binaries in /Assets/dll
which are rundeps for unmanaged cores. I'll be looking at these as part of my Nix experiments. I also discounted dependencies of these projects whenever I noticed e.g. .../vendor
near the bottom of the filesize list—but they are nonetheless checked-in to this repo.
I propose that from today we only use Git submodules for this purpose:
- if possible, pulling in the upstream and only checking-in build scripts and patches, or else having a mirror/fork in the TASEmulators org (TODO copy and expand 2af6bf3#commitcomment-140199736); and
- placing submodules in
/submodules
, and supplemental files like Makefiles or shell scripts in one of/ExternalProjects
,/ExternalCoreProjects
, or/waterbox
when those are necessary.
I also propose we migrate all subprojects, starting with those listed above, to the same scheme.
Adding a submodule and removing the checked-in copy can be squished into a single commit.
Moved here from my personal notes #118; see also #2423 and #2312.