3# Helper script to quickly try different error examples
6 echo "Usage: ./try-example.sh <example-number>"
8 echo "Available examples:"
9 echo " 1 - Missing config entirely"
10 echo " 2 - Partial context (have logger, missing database)"
11 echo " 3 - Multiple missing dependencies"
12 echo " 4 - Success case (all dependencies provided)"
14 echo "Example: ./try-example.sh 1"
18echo "๐ Trying Example $1..."
21cd /Users/mark/Developer/purescript-yoga-om
25 echo "โ Expected: Missing 'config' dependency"
26 npx spago build -p yoga-om-layer 2>&1 | grep -B 2 -A 20 'example1' || echo "No example1 uncommented"
29 echo "โ Expected: Missing 'database' dependency"
30 npx spago build -p yoga-om-layer 2>&1 | grep -B 2 -A 20 'example2' || echo "No example2 uncommented"
33 echo "โ Expected: Multiple missing dependencies"
34 npx spago build -p yoga-om-layer 2>&1 | grep -B 2 -A 20 'example3' || echo "No example3 uncommented"
37 echo "โ
Expected: Success!"
38 npx spago build -p yoga-om-layer 2>&1 | grep -E "Build succeeded|example4"
41 echo "Invalid example number. Use 1, 2, 3, or 4"
48echo "To see the error, manually uncomment example$1 in test/Playground.purs"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list