Skip to content

Commit 1d519c9

Browse files
committed
codex: setup files and instructions for handling the lack of internet connectivity
1 parent 89056b1 commit 1d519c9

File tree

5 files changed

+63
-0
lines changed

5 files changed

+63
-0
lines changed

.codex/build_all_targets.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
CODEX_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
cd $CODEX_DIR
5+
6+
pushd ..
7+
just build-extension
8+
popd

.codex/deps_src/AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This directory contains cloned repositories with source code for some
2+
of the development dependencies. This might be useful as a reference.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
DOWNLOADS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
cd $DOWNLOADS_DIR
5+
6+
# Download the specification of the CodeTracer trace json format.
7+
# Read the trace_json_spec.md file to understand what json records
8+
# should be produced by the tracers in this repo.
9+
wget https://raw.githubusercontent.com/metacraft-labs/runtime_tracing/refs/heads/master/docs/trace_json_spec.md

.codex/setup.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env bash
2+
3+
CODEX_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
cd $CODEX_DIR
5+
6+
apt-get update
7+
apt-get install -y --no-install-recommends just
8+
9+
pushd deps_src
10+
git clone https://github.com/metacraft-labs/runtime_tracing
11+
popd
12+
13+
./build_all_targets.sh
14+

AGENTS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,36 @@ To run the benchmark, execute:
2020
just bench
2121
```
2222

23+
# You don't have access to the internet
24+
25+
During development, certain commands will fail because you don't have
26+
access to the intenet.
27+
28+
The script `.codex/internet_resources/download.sh` is executed before
29+
your development session stars while your computer is still connected
30+
to the internet.
31+
32+
You can examine this script to see what kind of internet resources
33+
have been downloaded for offline use. If it's difficult for you to
34+
achieve a task without access to additional internet resources, you
35+
can always propose a PR that modifies the download.sh script instead
36+
of completing your main task.
37+
38+
Downloading development dependencies may also fail due to the lack of
39+
internet connectivity. We are trying to maintain the script `.codex/build_all_targets.sh`
40+
that is also executed before your development session starts while
41+
your computer is still connected to the internet. It tries to run
42+
all build commands that need development dependencies in order to
43+
cache the dependencies for offline use. Please propose changes to
44+
this script when you introduce new build targets with dependencies.
45+
46+
When you need to consult the documentation or source code modules
47+
for a particular dependency, always try to find where this dependency
48+
have been downloaded and try to access the necessary files through
49+
the file system (i.e. depending on the programming language, the
50+
operating system and the package manager being used, they should
51+
be in their standard location).
52+
2353
# Code quality guidelines
2454

2555
- Strive to achieve high code quality.

0 commit comments

Comments
 (0)