Skip to content

Commit

Permalink
fix(docs): fix spelling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohe-Am committed Jan 9, 2024
1 parent 005bf7b commit d3741b3
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 51 deletions.
42 changes: 41 additions & 1 deletion .ghjk/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions .ghjk/lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
]
],
"version": "0.1.0",
"moduleSpecifier": "file:///data/home/ghjk/ports/act.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/act.ts"
}
},
{
Expand Down Expand Up @@ -189,7 +189,7 @@
"name": "cpy_bs_ghrel"
}
],
"moduleSpecifier": "file:///data/home/ghjk/ports/pipi.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/pipi.ts"
},
"packageName": "pre-commit"
},
Expand Down Expand Up @@ -232,7 +232,7 @@
"name": "zstd_aa"
}
],
"moduleSpecifier": "file:///data/home/ghjk/ports/cpy_bs.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/cpy_bs.ts"
}
}
],
Expand Down Expand Up @@ -524,7 +524,7 @@
]
],
"version": "0.1.0",
"moduleSpecifier": "file:///data/home/ghjk/ports/cargo-binstall.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/cargo-binstall.ts"
},
"defaultInst": {
"portRef": "[email protected]"
Expand Down Expand Up @@ -561,7 +561,7 @@
]
],
"version": "0.1.0",
"moduleSpecifier": "file:///data/home/ghjk/ports/pnpm.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/pnpm.ts"
},
"defaultInst": {
"portRef": "[email protected]"
Expand Down Expand Up @@ -608,7 +608,7 @@
"name": "git_aa"
}
],
"moduleSpecifier": "file:///data/home/ghjk/ports/asdf_plugin_git.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/asdf_plugin_git.ts"
},
"defaultInst": {
"portRef": "[email protected]"
Expand Down Expand Up @@ -650,7 +650,7 @@
"name": "tar_aa"
}
],
"moduleSpecifier": "file:///data/home/ghjk/ports/node.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/node.ts"
},
"defaultInst": {
"portRef": "[email protected]"
Expand Down Expand Up @@ -695,7 +695,7 @@
"name": "zstd_aa"
}
],
"moduleSpecifier": "file:///data/home/ghjk/ports/cpy_bs.ts"
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/cpy_bs.ts"
},
"defaultInst": {
"portRef": "[email protected]"
Expand Down Expand Up @@ -727,7 +727,7 @@
"ty": "denoWorker@v1",
"name": "protoc_ghrel",
"version": "0.1.0",
"moduleSpecifier": "file:///data/home/ghjk/ports/protoc.ts",
"moduleSpecifier": "file:///home/asdf/repos/ecma/ghjk/ports/protoc.ts",
"platforms": [
[
"linux",
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,13 @@
},
"cSpell.words": [
"ghjk"
],
"spellright.language": [
"en-US-10-1."
],
"spellright.documentTypes": [
"markdown",
"latex",
"plaintext"
]
}
73 changes: 32 additions & 41 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
# Architecture

> [!WARNING] Ghjk is currently very early stages of development so expect
> [!WARNING] Ghjk is currently at very early stages of development so expect
> unstable apis, large refactors and all kinds of insects and dragons if you
> intend to use it. A lot of the what's outlined in this document might change
> as the problem/design space is exploired.
> as the problem/design space is explored.
## TLDR

> [!INFO] There's a overview diagram avail
> [here](https://www.tldraw.com/s/v2_c_MewHuw1lKwZzwv3XG8-Y6?viewport=-3756%2C-1126%2C10279%2C6280&page=page%3Apage).
> Be sure to update the [backup](./architecture.tldr) if you update that.
Ghjk is made up of a set of modules that each implement and encapsulate a set of
related features. The program is primarily consumed through the provided CLI. It
as an argument a path to a ghjkfile (through `$GHJKFILE`) and if no such
argument is provided, it'll look for a file named `ghjk.ts` in the current or
any of the parent directories and treat it as the config file. It then loads the
config file in a `WebWorker` to obtain a config object which is expected to
contain configuration for any of the modules it's intersted in. The modules then
process their configuration and, based on it, outline the cli commands and flags
to expose through the CLI. The modules are also allowed to export entries to the
lockfile which is treated as a _memo_ of the processed config file. If As of
January 1, 2024 the following modules are imlemented/planned:
Ghjk is made up of a set of modules that each implement and encapsulate a set of related features.
The program is primarily consumed through the provided CLI.
It takes as an argument a path to a ghjkfile (through `$GHJKFILE`) and if no such argument is provided, it'll look for a file named `ghjk.ts` in the current or any of the parent directories and treat it as the config file.
It then loads the config file in a `WebWorker` to obtain a config object which is expected to contain configuration for any of the modules it's interested in.
The modules then process their configuration and, based on it, outline the cli commands and flags to expose through the CLI.
The modules are also allowed to export entries to the lockfile which is treated as a _memo_ of the processed config file.
As of January 1, 2024 the following modules are implemented/planned:

- Ports: download and install executables and libraries
- Envs (TBD): make CLI shell environments that have access to specific programs
Expand All @@ -38,18 +34,13 @@ Ghjk is composed of two distinct spheres:
- The host
- loads and processes config files

Config files are the primary entry point for interacting with `ghjk` and provide
the vector of programmability for end users. As of today, only `ghjk.ts` config
files are supported but the `ghjk` is designed to support alternatives. You'll
observe that this kind of modularity and extensability will is a core motif of
the design, providing consraints, guidance and tension that's informed a lot of
the current design. A lot of decisions and abstractions will thus appear YAGNI
at this early stage but programmability is the name of the game in ghjk is
programmability so we prefer to err on the side of modularity.
Ghjkfiles are the primary entry point for interacting with `ghjk` and provide the vector of programmability for end users. As of today, only `ghjk.ts` config files are supported but the `ghjk` is designed to support alternatives.
You'll observe that this kind of modularity and extendability is a core motif of the design, providing constraints, guidance and tension that's informed a lot of the current design.
A lot of decisions and abstractions will thus appear YAGNI (you ain't going to need it) at this early stage but programmability is the name of the game in ghjk is programmability so we prefer to err on the side of modularity.

### Ghjkfiles

### `ghjk.ts`
#### `ghjk.ts`

- They're loaded in a `WebWorker` (Deno flavoured) with access limited to:
- `--allow-read=$PWD`
Expand All @@ -64,9 +55,15 @@ programmability so we prefer to err on the side of modularity.
but as far as the host is concerned, it's only aware of the `getConfig`
interface.

#### `ghjk.lock.json`
### Ghjkdir

- TODO
- Contains files specific to a certain ghjkfile
- Expected and placed in `.ghjk/` within the same dir of the ghjkfile.
- Contents:
- `lock.json`: lockfile generated from the ghjkfile. Intended to be version control.
- `deno.lock`: lockfile for any modules used by ghjk when working with that specific lockfile. Intended to be version controlled.
- `hash.json`: serves as a store for hashes used to determine weather re-serialization is necessary. Don't put in version control.
- `envs`: the shims and loaders of the different environments

### Host

Expand All @@ -79,19 +76,14 @@ The host is the section of the program expected to:

### Modules

Ghjk is made up of a set of interacting modules implementing specific
functionality. Listed below are the modules that we think will make ghjk a
complete runtime manager but note that we don't currently plan on implementing
all of them. Getting each module to become competitive with equivalent tools let
alone achieving feature parity is beyond the resources available to the authors
today and their design is only considered here to provide a holistic framework
for development of ghjk. It's afterall a _programmable runtime manager_ and we
intend to make the core of ghjk (i.e. the host) modular enough that:
Ghjk is made up of a set of interacting modules implementing specific functionality.
Listed below are the modules that we think will make ghjk a complete runtime manager but note that we don't currently plan on implementing all of them.
Getting each module to become competitive with equivalent tools let alone achieving feature parity is beyond the resources available to the authors today and their design is only considered here to provide a holistic framework for development of ghjk.
It is, after all, a _programmable runtime manager_ and we intend to make the core of ghjk (i.e. the host) modular enough that:

- Future implementations shouldn't require large refactors
- Easy intergration of external tools as modules
- Easy to swap implementation of modules without requring lot of changes in
other dependent modules
- Easy integration of external tools as modules
- Easy to swap implementation of modules without requiring lot of changes in other dependent modules

#### Ports module

Expand All @@ -107,7 +99,7 @@ Equivalent tools:
and libraries.
- Executables, shared libraries, header files, documentation (TODO) are all in
scope.
- Installations are put in a centeral location and are shared across all the
- Installations are put in a central location and are shared across all the
ghjk environments that make use of them.
- The config for the ports module expects:
- `allowedPortDeps`: the list of ports other ports are allowed to depend on at
Expand All @@ -128,7 +120,7 @@ Equivalent tools:
- I.e. non standard dependencies will have to be manually declared there
by users.
- `InstallConfig` can optionally contain a `version`.
- If found, the `version` is sanity checked agains the list of versions
- If found, the `version` is sanity checked against the list of versions
returned by `listAll`.
- [ ] Fuzzy matching can optionally take place.
- If not found, the `latestStable` version routine of the `Port` is
Expand All @@ -148,7 +140,7 @@ Equivalent tools:
- `latestStable`: the version to install when no version is specified by the
user.
- `download`: fetch distribution files into a provided dir
- Any archives are preferrably extracted prior to placement in download dir
- Any archives are preferably extracted prior to placement in download dir
- `install`: build, process, transform the downloaded files in any way
required to create the final artifacts.
- Artifacts are placed into the installDir
Expand Down Expand Up @@ -182,9 +174,8 @@ Equivalent tools:

#### Envs module

Reproducable CLI shell environments that can access specific tools and
variables. Including support to auto-load an environment when a specific shell
`cd`'s to the ghjk root.
Reproducible CLI shell environments that can access specific tools and variables.
Including support to auto-load an environment when a specific shell `cd`'s to the ghjk root.

Prior art:

Expand Down

0 comments on commit d3741b3

Please sign in to comment.