Skip to content

Commit 83755e8

Browse files
Copilotjava-james
andcommitted
Finalize comprehensive GitHub Copilot instructions with quick reference and emergency recovery
Co-authored-by: java-james <22756998+java-james@users.noreply.github.com>
1 parent a5f6571 commit 83755e8

1 file changed

Lines changed: 60 additions & 1 deletion

File tree

.github/copilot-instructions.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ flutter_dotenv is a Flutter/Dart package that loads configuration at runtime fro
44

55
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.
66

7+
## Quick Reference
8+
9+
**Essential Commands (run in repository root):**
10+
```bash
11+
flutter pub get # Install dependencies (30-90s, timeout: 120s+)
12+
flutter analyze # Static analysis (10-30s, timeout: 60s+)
13+
flutter test --coverage # Run all tests (30-60s, timeout: 120s+)
14+
dart format lib/ test/ example/lib/ # Format code (5-15s, timeout: 30s+)
15+
```
16+
17+
**Example App Commands (run in example/ directory):**
18+
```bash
19+
cd example/
20+
flutter pub get # Install example deps (30-90s, timeout: 120s+)
21+
flutter run # Launch app (60-180s, timeout: 300s+)
22+
flutter run -d chrome # Launch in web browser
23+
```
24+
25+
**Critical Reminder**: NEVER CANCEL any of these operations. Always set timeouts 2-3x the expected time.
26+
727
## Working Effectively
828

929
### Prerequisites and Environment Setup
@@ -229,4 +249,43 @@ dotenv.loadFromString(envString: File('test/.env').readAsStringSync());
229249
- **Always test variable substitution** (FOO=$BAR patterns)
230250
- **Always test override scenarios** (mergeWith and overrideWith parameters)
231251
- **Always test type conversions** (getInt, getBool, getDouble)
232-
- **Always test fallback values** for missing variables
252+
- **Always test fallback values** for missing variables
253+
254+
## Emergency Recovery
255+
256+
**If Flutter/Dart installation is corrupted:**
257+
```bash
258+
# Reinstall Flutter (Linux)
259+
sudo snap install flutter --classic
260+
# OR manual install
261+
git clone https://github.com/flutter/flutter.git -b stable
262+
export PATH="$PATH:/path/to/flutter/bin"
263+
flutter doctor
264+
```
265+
266+
**If dependencies are corrupted:**
267+
```bash
268+
flutter clean
269+
flutter pub get
270+
cd example/ && flutter clean && flutter pub get
271+
```
272+
273+
**If tests are failing unexpectedly:**
274+
```bash
275+
# Check that test files exist
276+
ls -la test/.env test/.env-override
277+
# Verify test file content matches expected format
278+
head test/.env
279+
# Run individual test files
280+
flutter test test/dotenv_test.dart --verbose
281+
```
282+
283+
**If example app won't run:**
284+
```bash
285+
# Check assets are properly declared
286+
grep -A5 "assets:" example/pubspec.yaml
287+
# Verify .env files exist
288+
ls -la example/assets/
289+
# Clean and rebuild
290+
cd example/ && flutter clean && flutter pub get && flutter run
291+
```

0 commit comments

Comments
 (0)