Skip to main content

Sketchy PROS Compiler Wrapper

A build system wrapper for PROS robotics projects that provides file change tracking, build logging, and binary backups.

Installation

Install from PyPI:

pip install sketchy-pros-compiler

Install from git

git clone https://github.com/zxzimeng/sketchy_pros_compiler.git
cd sketchy_pros_compiler
pip install .

Features

  • Tracks changes between compilations
  • Concatenates source files for faster compilation
  • Preserves original file structure
  • Maintains build history with timestamps
  • Backs up binary files after successful builds
  • Diff output for file changes to see the changes made since last compile

Performance Benefits

Standard PROS Build

$time pros --no-analytics make  
> 21.58s user 1.90s system 98% cpu 23.819 total

$ls -s bin/hot.package.elf
Binary size: 9064KB (bin/hot.package.elf)

Sketchy PROS Compiler

$time sketchy_pros_compiler
> 2.77s user 0.47s system 85% cpu 3.769 total

$ls -s bin/hot.package.elf
Binary size: 6728KB (bin/hot.package.elf)

Improvements:

  • Faster compilation, smaller compiliation size on larger projects
  • Maintains full functionality, file structure, and readability
  • Includes change tracking and backup features

Directory Structure

~/tmp/sketchycompiler/
├── hard/                     # Temporary build files
├── softstorage/             # Source file snapshots for diff comparison
└── logstorage/             
    ├── build_history.log    # Complete build history
    └── [timestamp]/         # Per-build archives
        ├── changes.log      # File changes for this build
        └── bin/*            # Binary backup from this build

Example Structure:

❯ tree -r
.
├── softstorage
│   ├── pid_tune_assist
│   │   └── pid_tune_assist.cpp
│   ├── opcontrol.cpp
│   ├── odometry.cpp
│   ├── main.cpp
│   ├── deprecated_auton
│   │   ├── blue_right.cpp
│   │   └── blue_left.cpp
│   ├── auxilliary_control.cpp
│   ├── auton_selector
│   │   └── auton_selector.cpp
│   └── auton_programs
│       ├── sixty_second.cpp
│       ├── red_right.cpp
│       ├── red_left.cpp
│       ├── no_risk_auton_programs.cpp
│       ├── map_selector_functions_and_logic.cpp
│       ├── blue_right.cpp
│       └── blue_left.cpp
├── logstorage
│   ├── build_history.log
│   └── March_04_21_07_05_2025
│       ├── main.cpp.o
│       ├── hot.package.elf
│       ├── hot.package.bin
│       ├── cold.package.elf
│       ├── cold.package.bin
│       ├── changes.log
│       ├── auton_selector
│       │   └── auton_selector.cpp.o
│       └── _pros_ld_timestamp.o
└── hard
    ├── pid_tune_assist
    ├── deprecated_auton
    └── auton_programs

13 directories, 24 files

Usage

After installing to path, run from within a PROS project directory to build:

pros_sketchy

The script will:

  1. Show changes since last compilation
  2. Concatenate source files (excluding auton_selector)
  3. Run PROS build system
  4. Restore original file structure
  5. Archive build artifacts and changes

Requirements

  • PROS CLI installed and configured
  • macOS environment

Sample Run Output

❯ pros_sketchy 
[34m=== Changes since last compilation ===[0m

[36m=== File: auton_programs/blue_right.cpp ===[0m
@@ -11,7 +11,7 @@

         // Get First Mogo
         chassis.processMovement(Movement{
-                                    .pose = {-41.652, -36.117, 270}, .offset_distance = 0, .perp_offset_distance = 0,
+                                    .pose = {-43, -5, 270}, .offset_distance = 0, .perp_offset_distance = 0,
                                     .moveParams = MoveToPoseParams{.forwards = false, .minSpeed = 70},
                                     .exitDistance = 0,
                                     .timeout = 4000

[35m════════════════════════════════════════════════════════════════[0m
[36m                      PROS Build Output                           [0m
[35m════════════════════════════════════════════════════════════════[0m

Compiled src/main.cpp [WARNINGS]
src/main.cpp: In member function 'void Aux::watchIndexer()':
src/main.cpp:2321:23: warning: comparison between 'enum Aux::ConveyorState' and 'enum Aux::IntakeClawSystemState' [-Wenum-compare]
 2321 |     if (conveyorState == AUTO_CONVEYOR) {
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ./include/lemlib/api.hpp:5,
                 from ./include/main.h:43,
                 from src/main.cpp:1:
./include/lemlib/util.hpp: At global scope:
./include/lemlib/util.hpp:78:17: warning: inline function 'constexpr float lemlib::sanitizeAngle(float, bool)' used but never defined
   78 | constexpr float sanitizeAngle(float angle, bool radians = true);
      |                 ^~~~~~~~~~~~~
Adding timestamp [OK]
Linking hot project with ./bin/cold.package.elf and LemLib,libc,liblvgl,libm,libpros [OK]
Section sizes:
   text	  data	   bss	 total	   hex	filename
  97356	    20	48249600	48346976	2e1b760	bin/hot.package.elf
Creating bin/hot.package.bin for VEX EDR V5 [DONE]
Compilation complete and files restored successfully.

[35m════════════════════════════════════════════════════════════════[0m
[36m                      Final File Status                           [0m
[35m════════════════════════════════════════════════════════════════[0m

[34m=== Changes since last compilation ===[0m
[33mNo changes detected in any files[0m

Build Archives

Each build creates a timestamped directory containing:

  • Binary files from successful builds
  • Detailed change logs
  • Compilation status and warnings
  • Full build output history

Access previous builds in ~/tmp/sketchycompiler/logstorage/

How It Works

  1. Change Detection

    • Tracks file modifications between builds
    • Shows colorized diffs of changes
    • Maintains history of all modifications
  2. Build Optimization

    • Concatenates source files for faster compilation
    • Reduces binary size through optimized linking
    • Preserves original project structure
  3. Backup System

    • Archives each build with timestamp
    • Stores binary files and changes
    • Maintains complete build history
  4. File Management

    • Temporary build directory for compilation
    • Automatic restoration of original files
    • Structured storage of build artifacts

Limitations

You may not use the same variable names for the variables in different files as they will be compiled in one file, variable hashing is not supported yet.

Release files for sketchy-pros-compiler 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sketchy-pros-compiler 1.0.2
File Size Uploaded
sketchy_pros_compiler-1.0.2.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sketchy-pros-compiler 1.0.2
File Interpreter ABI Platform
sketchy_pros_compiler-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / sketchy_pros_compiler-1.0.2.tar.gz

Download URL sketchy_pros_compiler-1.0.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5f0c5ee714fb8cfde48c05eb38225bfa69facdd642c19c7f5802b68048e3ec67
BLAKE2b-256 checksum
How to use checksums
8da71ecc131470fbb582bcd5f4459ee18fb2e60d4c98aa9e9d0afe8f6c3272fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / sketchy_pros_compiler-1.0.2-py3-none-any.whl

Download URL sketchy_pros_compiler-1.0.2-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4997bd380b147111fd1e40223f3a7188b4cc7f1ad226d599a67042ae09da5e03
BLAKE2b-256 checksum
How to use checksums
f9c5f6dfd3452df18f0a20d951e170cea8be9ae3580792b1f456b34e06bb31c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page