-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdkproject.jsonc
83 lines (83 loc) · 6.13 KB
/
dkproject.jsonc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
"$comment": "Documentation is available at https://gitlab.com/diskuv/dksdk-access/-/blob/main/README.md",
"dependencies": {
// This dependency is required, and in this version of DkSDK it must be 1.0
"dksdk": "1.0",
// Abstract dependencies (ie. templates) to minimize boilerplate. When you inherit from
// abstract dependencies they are merged and any arrays (like `urls` below) are concatenated.
"_local": {
"abstract": true,
// What is this? The URLs are searched in order. The first accessible URL will be used.
//
// Why search URLs? ...
// Problem 1: You may want to edit the source code for a dependency. By searching in places
// under your control, DkSDK can see where you edited the source code and use that.
//
// Problem 2: DkSDK can build the project on a second machine (WSL2, Docker container, virtual
// machine, etc.) while the original source code is on a first machine. Often it is slow
// to access the original source code during a build, so the build should prefer to use a
// local copy of the original source code.
//
// Net effect: Any dependency that uses `_local` will *first* check if there is a project
// matching the dependency name already checked out beside this project. If not the fetch/
// subfolder of this project is also checked. The original source code machine (if any)
// is also checked.
"urls": [
"file://${projectParentDir}/${dependencyName}",
"file://${projectDir}/fetch/${dependencyName}",
"file://${sourceParentDir}/${dependencyName}",
"file://${sourceDir}/fetch/${dependencyName}"
]
},
"_mirror": {
"abstract": true,
// Problem 1: Many packaging systems like CMake will copy dependencies into a build directory.
// However, if the dependencies are simultaneously being edited by you, those
// dependencies can have multi-gigabyte package and build directories that are copied.
// Examples include a `node_modules` Javascript subdirectory, a `_build` OCaml Dune
// subdirectory, a `_opam` OCaml Opam subdirectory, and a `build` CMake subdirectory.
//
// Solution: Use [_mirror]. It uses the `file://destination?mirror=source` URL which will
// copy *source code* (and nothing but source code) from <source> on the first machine to
// <destination> on the second machine. Or if there is no <source> it will use what is at
// <destination>.
// So [_mirror] will clone the source code of a dependency *beside* this project and place it
// in the fetch/ subfolder of this project on the build machine. That means you can edit the
// dependency's source code regardless of the build machine.
"urls": [
// The first two URLs are for when SonicScoutBackend is a `git subtree` or `git submodule` of some
// `<other_project=sonicapps>/vendor/SonicScoutBackend`, and when SonicScoutBackend is integration tested by
// tests/build-and-test/CMakeLists.txt in `<SonicScoutBackend>/build/_bt/p`.
"file://${projectDir}/fetch/${dependencyName}?mirror=${sourceParentDir}/../fetch/${dependencyName}",
"file://${projectDir}/fetch/${dependencyName}?mirror=${sourceParentDir}/../../fetch/${dependencyName}",
"file://${projectDir}/fetch/${dependencyName}?mirror=${sourceParentDir}/${dependencyName}",
"file://${projectDir}/fetch/${dependencyName}?mirror=${sourceDir}/fetch/${dependencyName}"
]
},
// DkSDK Access is needed to get any other dependencies
// manylinux Docker container only mounts the project, so _all_ dependencies are needed inside fetch/
"dksdk-access": { "inherits": "_mirror", "urls": [ "https://gitlab.com/diskuv/dksdk-access.git#main" ] },
// The next set of dependencies (dksdk-*) are available to DkSDK subscribers
// dksdk-cmake is the source of DKSDK_VERSION_MAJMIN.
// dksdk-cmake_GITREF defaults to 'main' but can be overridden with `./dk dksdk.project.get DKSDK_CMAKE_GITREF <ref>`
"dksdk-cmake": { "inherits": "_mirror", "urls": [ "${dksdk-cmake_REPOSITORY}#${dksdk-cmake_GITREF}" ] },
"dksdk-ffi-c": { "inherits": "_mirror", "urls": [ "${dksdk-ffi-c_REPOSITORY}#${DKSDK_VERSION_MAJMIN}" ] },
"dksdk-ffi-ocaml": { "inherits": "_mirror", "urls": [ "${dksdk-ffi-ocaml_REPOSITORY}#${DKSDK_VERSION_MAJMIN}" ] },
"dksdk-opam-repository-core": { "inherits": "_local", "urls": [ "${dksdk-opam-repository-core_REPOSITORY}#${DKSDK_VERSION_MAJMIN}" ] },
"dksdk-opam-repository-js": { "inherits": "_local", "urls": [ "${dksdk-opam-repository-js_REPOSITORY}#${DKSDK_VERSION_MAJMIN}" ] },
// The remaining dependencies are third-party open source projects
"dkml-runtime-common": { "inherits": "_local", "urls": [ "https://github.com/diskuv/dkml-runtime-common.git" ] },
"dkml-runtime-distribution": { "inherits": "_local", "urls": [ "https://github.com/diskuv/dkml-runtime-distribution.git" ] },
"dkml-compiler": { "inherits": "_local", "urls": [ "https://github.com/diskuv/dkml-compiler.git" ] },
// @2024-11-11: Remove test/opam-overlays/packages symlink
// earlier: need https://github.com/dune-universe/opam-overlays/pull/217
"opam-repository-dune-universe": { "inherits": "_local", "urls": [ "https://github.com/jonahbeckford/opam-overlays.git#dkcoder" ] },
// @2024-12-16: (for DkCoder) need ocaml-lsp-server.1.20.1-4.14
// @2024-11-30: (for DkCoder) need ocaml-lsp-server.1.20.0-4.14
// @2024-11-13: (for DkCoder) need res.5.0.2
// @2024-11-11: (from dksdk-coder) need https://github.com/mirage/ocaml-tar/pull/150 (tar 3.1.1)
"opam-repository-ocaml": { "inherits": "_local", "urls": [ "https://github.com/ocaml/opam-repository.git#ef2fa30ecdfacbdf4dc3742f39753750a49974ee" ] },
// @2024-11-12: 2.1.3 +28 commits. Use old conf-sdl2.1 that works with MSVC
"opam-repository-dkml": { "inherits": "_local", "urls": [ "https://github.com/diskuv/diskuv-opam-repository.git#c0b7cd9badd9e1e29a6b4646cdad4c1b1b008494" ] }
}
}