Skip to content

Commit f375eb1

Browse files
CopilotGravifer
andauthored
Add comprehensive GitHub Copilot instructions for gitrepos repository (#3299)
Co-authored-by: Gravifer <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
1 parent 4728c3c commit f375eb1

File tree

1 file changed

+202
-0
lines changed

1 file changed

+202
-0
lines changed

.github/copilot-instructions.md

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Gitrepos - Curated Development Tools Collection
2+
3+
Always reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.
4+
5+
## Repository Overview
6+
7+
This is a curated collection repository containing 35+ git submodules organized into useful categories. It serves as a centralized hub for essential development tools, libraries, and projects rather than a single buildable application. Each submodule is an independent project with its own build system and requirements.
8+
9+
## Working Effectively
10+
11+
### Essential Commands - Always Use These First
12+
13+
Initialize the repository and specific submodules:
14+
```bash
15+
# Initialize all submodules (required before working with any)
16+
git submodule init
17+
18+
# Update specific submodules only (recommended approach)
19+
git submodule update --init [path/to/submodule]
20+
21+
# NEVER run full recursive update unless absolutely necessary - takes hours
22+
# git submodule update --init --recursive # AVOID - extremely time-consuming
23+
```
24+
25+
### Core Directory Structure
26+
27+
- **Libraries/**: Core libraries (gcc, openssl, libgit2, libsodium, libzmq, mxe, three.js)
28+
- **Tools/**: Development tools (FFmpeg, bash-wakatime, gh-cli, listen1, neovim, tmux, vcpkg, vim-plug)
29+
- **Wolfram/**: Wolfram/Mathematica-related projects and tools
30+
- **Templates/**: Project templates
31+
- **Tunneling/**: VPN/tunneling tools (Qv2ray, v2rayN)
32+
- **powerline-fonts**, **powerline-shell**: Terminal customization
33+
- **WSL-Hello-sudo**: Authentication tools for WSL
34+
35+
### Timing Expectations - NEVER CANCEL OPERATIONS
36+
37+
Critical build and update timings (always set appropriate timeouts):
38+
39+
- **Individual submodule updates**: 1-30 seconds for small tools, 30-60 seconds for libraries
40+
- **Go builds (gh-cli)**: ~45 seconds. NEVER CANCEL. Set timeout to 120+ seconds.
41+
- **Python builds (powerline-shell)**: ~1 second. Set timeout to 30+ seconds.
42+
- **C/C++ library builds (libsodium)**: ~40 seconds. NEVER CANCEL. Set timeout to 120+ seconds.
43+
- **Large submodules (gcc, FFmpeg)**: Can take hours. NEVER CANCEL. Set timeout to 4+ hours.
44+
- **Full repository initialization**: Multiple hours. AVOID unless specifically needed.
45+
46+
## Validated Build Workflows
47+
48+
### Successfully Tested Tools
49+
50+
#### GitHub CLI (Go-based)
51+
```bash
52+
# Update and build - validated working
53+
git submodule update --init Tools/gh-cli
54+
cd Tools/gh-cli
55+
make bin/gh # Takes ~45 seconds, produces working binary
56+
./bin/gh --version # Verify build success
57+
```
58+
59+
#### Powerline Shell (Python-based)
60+
```bash
61+
# Update and build - validated working
62+
git submodule update --init powerline-shell
63+
cd powerline-shell
64+
python3 setup.py build # Takes ~1 second
65+
python3 setup.py install --user # Install for current user
66+
```
67+
68+
#### LibSodium (C library)
69+
```bash
70+
# Update and build - validated working
71+
git submodule update --init Libraries/libsodium
72+
cd Libraries/libsodium
73+
./autogen.sh -s && ./configure && make -j4 # Takes ~40 seconds
74+
make check # Run tests (optional)
75+
```
76+
77+
#### Powerline Fonts
78+
```bash
79+
# Update and install - validated working
80+
git submodule update --init powerline-fonts
81+
cd powerline-fonts
82+
./install.sh # Installs fonts to ~/.local/share/fonts
83+
```
84+
85+
#### WSL Hello Sudo (Rust-based)
86+
```bash
87+
# Update - build requires Windows toolchain
88+
git submodule update --init WSL-Hello-sudo
89+
cd WSL-Hello-sudo
90+
# Note: Full build requires both Linux and Windows cargo
91+
# See Makefile for cross-compilation requirements
92+
```
93+
94+
### Common Dependencies
95+
96+
Ensure these are available before building:
97+
- **Go**: Version 1.19+ (for Tools/gh-cli and other Go projects)
98+
- **Python 3**: With setuptools (for Python-based tools)
99+
- **GCC/Build tools**: `build-essential` package (for C/C++ libraries)
100+
- **Autotools**: `autoconf`, `automake`, `libtool` (for autotools-based projects)
101+
- **Rust**: `cargo` (for Rust-based tools like WSL-Hello-sudo)
102+
103+
Install on Ubuntu/Debian:
104+
```bash
105+
sudo apt-get update
106+
sudo apt-get install build-essential autoconf automake libtool python3-setuptools golang-go
107+
# Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
108+
```
109+
110+
## Validation Scenarios
111+
112+
Always test functionality after building tools:
113+
114+
### GitHub CLI Validation
115+
```bash
116+
cd Tools/gh-cli
117+
./bin/gh --version # Should show version info
118+
./bin/gh --help # Should show help menu
119+
```
120+
121+
### Powerline Shell Validation
122+
```bash
123+
cd powerline-shell
124+
python3 -c "import powerline_shell; print('Import successful')"
125+
```
126+
127+
### LibSodium Validation
128+
```bash
129+
cd Libraries/libsodium
130+
make check # Run test suite - should pass all tests
131+
```
132+
133+
## Submodule Management Best Practices
134+
135+
### Working with Specific Categories
136+
137+
Only initialize submodules you actually need:
138+
```bash
139+
# For development tools
140+
git submodule update --init Tools/neovim Tools/tmux Tools/gh-cli
141+
142+
# For cryptographic libraries
143+
git submodule update --init Libraries/libsodium Libraries/openssl
144+
145+
# For Wolfram development
146+
git submodule update --init Wolfram/WolframClientForPython Wolfram/lsp-wl
147+
```
148+
149+
### Status and Maintenance
150+
```bash
151+
# Check submodule status
152+
git submodule status
153+
154+
# Update specific submodule to latest
155+
cd [submodule-path]
156+
git checkout main # or master, stable
157+
git pull
158+
cd ../..
159+
git add [submodule-path]
160+
git commit -m "Update [submodule-name] to latest"
161+
```
162+
163+
### Large Submodule Warnings
164+
165+
These submodules are extremely large and take significant time:
166+
- **Libraries/gcc**: Multi-gigabyte, takes hours to clone
167+
- **Tools/FFmpeg**: Large multimedia codebase
168+
- **Libraries/mxe**: Cross-compilation environment, very large
169+
- **Tools/vcpkg**: Microsoft package manager, large
170+
171+
Only initialize these if specifically needed and allow ample time.
172+
173+
## Troubleshooting
174+
175+
### Common Issues and Solutions
176+
177+
**Submodule not found/empty**: Run `git submodule init` then `git submodule update --init [path]`
178+
179+
**Build fails with missing dependencies**: Install the required development packages listed above
180+
181+
**Long build times**: This is normal - many tools compile from source. Wait for completion.
182+
183+
**Permission errors during install**: Use `--user` flag for Python installs or proper sudo for system installs
184+
185+
**Git submodule update hangs**: Allow more time - some repositories are large and take time to clone
186+
187+
### Network-Dependent Operations
188+
189+
Some submodules may fail to clone in restricted network environments:
190+
- GCC uses `git://` protocol which may be blocked
191+
- Some repositories are large and may timeout on slow connections
192+
- Use `git config --global url."https://".insteadOf git://` if git:// is blocked
193+
194+
## Repository Characteristics
195+
196+
- **Not a single project**: Each submodule is independent
197+
- **No top-level build**: Build individual tools as needed
198+
- **Organizational structure**: Serves as curated bookmarks
199+
- **Mixed technologies**: Go, Python, C/C++, Rust, JavaScript, Wolfram Language
200+
- **Selective usage**: Initialize only what you need
201+
202+
Remember: This repository is a collection tool - work with individual submodules according to their specific requirements and documentation.

0 commit comments

Comments
 (0)