Contributing to Sesi
First off, thank you for considering contributing to Sesi! Sesi is building natively concise programming layers, and community contributions are incredibly valuable.
Setting Up Your Development Environment
To start developing Sesi locally, you'll need Node.js and TypeScript installed.
- Clone the repository:
bash
git clone https://github.com/Misterscan/sesi.git
cd Sesi
- Install dependencies:
bash
npm install
- Build the project:
The Sesi core is written in TypeScript. You must compile it to generate the executable engine.
bash
npm run build
- Install the CLI globally (optional but recommended):
bash
npm install -g .
Now you can use the sesi command anywhere.
- Set up your environment variables:
Create a .env file in the root directory for Gemini access:
env
GEMINI_API_KEY="your_api_key_here"
Understanding the Architecture
Before making changes, we highly recommend reading the following documentation:
Core Guidelines
- AST Modifications: If you add syntax, you must update
src/lexer.ts,src/parser.ts, andsrc/types.tsbefore modifyingsrc/interpreter.ts. - TypeScript Settings: Do not remove
import { type ... }statements, as they are mandatory for type narrowing. - Interpreter Logic: Tree-walking in
interpreter.tsuses dynamic casting andanytypes by design. This is intentional for functional execution; do not attempt to "clean up" the dynamicanycasts in the interpreter core.
Testing Your Changes
Testing in Sesi involves both internal TypeScript testing and Sesi script execution.
- Run Unit Tests: The core engine logic is tested via automated TypeScript tests found in the
tests/directory
bash
npm test
- Run Sesi Integration Scripts: After making a change, rebuild the project and run the testing scripts inside the
main/tests/orexamples/directories to verify feature behavior end-to-end:
bash
npm run build
sesi examples/01_hello.sesi
sesi main/tests/test_syntax.sesi
Submitting a Pull Request
- Fork the repository and create your branch from
main. - Ensure you have run
npm run buildto verify your TypeScript compiles. - Write Unit Tests: If you are adding a new core feature, built-in, or fixing a bug, you must write automated TypeScript unit tests in the
tests/directory to cover your logic. - Write Integration Scripts: Write or update
.sesitest scripts inmain/tests/to demonstrate your feature or bug fix functioning end-to-end. - Follow standard conventional commits for your commit messages.
- Create a descriptive Pull Request explaining the why and how of your changes
Issues and Feature Requests
If you find a bug or have a proposal for the language's roadmap, please open an issue. Provide as much context as possible, including system details, error output, and stripped-down reproducible .sesi scripts!