feat: implement build backend and += env operator, add style guide

- Replace build stub with full phase execution (prepare/build/check/install)
  via /bin/sh with variable interpolation, config file generation, and
  env handling (hard-set, soft/?=, append/+=)

- Add += append operator for environment variables across DSL, parser,
  system config parser, build backend, and formatter

- Add STYLEGUIDE.md documenting all codebase conventions

- Replace EnvEntry bool soft with EnvMode enum (Set/Soft/Append)

- Add Plus token type to lexer for += parsing
This commit is contained in:
2026-08-04 12:58:38 -04:00
parent 0aca4b49ca
commit e817e58698
9 changed files with 828 additions and 19 deletions
+2 -3
View File
@@ -13,9 +13,8 @@ struct BuildResult {
};
// Build a single package step into work_dir.
//
// NOTE: compile-only stub — the real build backend was never committed.
// Always fails so the rebuild pipeline never records a fake install.
// Runs prepare, build, check, and install phases in order,
// with full variable interpolation and config file generation.
BuildResult build(const resolve::BuildStep& step,
const std::string& work_dir,
int jobs);
+4 -1
View File
@@ -1,5 +1,6 @@
#pragma once
#include <cstdint>
#include <string>
#include <unordered_map>
#include <unordered_set>
@@ -38,10 +39,12 @@ struct Patch {
int level = 1;
};
enum class EnvMode : std::uint8_t { Set, Soft, Append };
struct EnvEntry {
std::string key;
std::string value;
bool soft = false;
EnvMode mode = EnvMode::Set;
};
struct NamedService {
+1
View File
@@ -13,6 +13,7 @@ enum class TokenType {
Lbrace, // {
Rbrace, // }
Equals, // =
Plus, // +
Lbracket, // [
Rbracket, // ]
Comma, // ,