Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "3"
members = ["crates/*"]

[workspace.package]
version = "0.1.5"
version = "0.1.6"
edition = "2024"

[workspace.lints.clippy]
Expand Down
6 changes: 3 additions & 3 deletions crates/pseudoscript-doc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ name = "pseudoscript_doc"
path = "src/lib.rs"

[dependencies]
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-emit = { path = "../pseudoscript-emit" }
pseudoscript-layout = { path = "../pseudoscript-layout" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
pseudoscript-emit = { path = "../pseudoscript-emit", version = "0.1.5" }
pseudoscript-layout = { path = "../pseudoscript-layout", version = "0.1.5" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Renders `[[doc.sidebar]]` markdown pages to HTML. Pure Rust (no C), so it
Expand Down
8 changes: 4 additions & 4 deletions crates/pseudoscript-emit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ path = "src/lib.rs"
[dependencies]
# Logging facade (target-agnostic); the subscriber is chosen at the wasm/stdio edge.
tracing = "0.1"
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-layout = { path = "../pseudoscript-layout" }
pseudoscript-dot = { path = "../pseudoscript-dot" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
pseudoscript-layout = { path = "../pseudoscript-layout", version = "0.1.5" }
pseudoscript-dot = { path = "../pseudoscript-dot", version = "0.1.5" }
serde = { version = "1", features = ["derive"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/pseudoscript-format/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name = "pseudoscript_format"
path = "src/lib.rs"

[dependencies]
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }

[dev-dependencies]
cucumber = "0.21"
Expand Down
14 changes: 7 additions & 7 deletions crates/pseudoscript-ide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"

[dependencies]
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-format = { path = "../pseudoscript-format" }
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-lsp-core = { path = "../pseudoscript-lsp-core" }
pseudoscript-emit = { path = "../pseudoscript-emit" }
pseudoscript-doc = { path = "../pseudoscript-doc" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }
pseudoscript-format = { path = "../pseudoscript-format", version = "0.1.5" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
pseudoscript-lsp-core = { path = "../pseudoscript-lsp-core", version = "0.1.5" }
pseudoscript-emit = { path = "../pseudoscript-emit", version = "0.1.5" }
pseudoscript-doc = { path = "../pseudoscript-doc", version = "0.1.5" }
# The 3D "software universe" layout — pure, wasm-safe, permissive. Builds the whole
# universe (positions + planet personalities) the in-app WebGL view renders.
pseudoscript-universe = { path = "../pseudoscript-universe" }
pseudoscript-universe = { path = "../pseudoscript-universe", version = "0.1.5" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# Parses a `pds.toml` string into the doc manifest for the host (`doc_manifest`).
Expand Down
6 changes: 3 additions & 3 deletions crates/pseudoscript-lsp-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ path = "src/lib.rs"
[dependencies]
# Logging facade (target-agnostic); the subscriber is chosen at the wasm/stdio edge.
tracing = "0.1"
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-format = { path = "../pseudoscript-format" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
pseudoscript-format = { path = "../pseudoscript-format", version = "0.1.5" }
lsp-types = "=0.94.1"
12 changes: 6 additions & 6 deletions crates/pseudoscript-lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ name = "pseudoscript_lsp"
path = "src/lib.rs"

[dependencies]
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-lsp-core = { path = "../pseudoscript-lsp-core" }
pseudoscript-format = { path = "../pseudoscript-format" }
pseudoscript-project = { path = "../pseudoscript-project" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
pseudoscript-lsp-core = { path = "../pseudoscript-lsp-core", version = "0.1.5" }
pseudoscript-format = { path = "../pseudoscript-format", version = "0.1.5" }
pseudoscript-project = { path = "../pseudoscript-project", version = "0.1.5" }
tower-lsp = "0.20"
tokio = { version = "1", features = ["full"] }
serde_json = "1"
walkdir = "2"

[dev-dependencies]
pseudoscript-lsp-core = { path = "../pseudoscript-lsp-core" }
pseudoscript-lsp-core = { path = "../pseudoscript-lsp-core", version = "0.1.5" }
cucumber = "0.21"
futures = "0.3"
tempfile = "3"
Expand Down
2 changes: 1 addition & 1 deletion crates/pseudoscript-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ path = "src/lib.rs"
[dependencies]
# Logging facade (target-agnostic); the subscriber is chosen at the wasm/stdio edge.
tracing = "0.1"
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }
anyhow = "1"
rustc-hash = "2"
serde = { version = "1", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion crates/pseudoscript-project/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ path = "src/lib.rs"
# modules off disk — delegating the slug/lock/prefix logic to the WASM-safe
# `pseudoscript-model::deps`. Depended on by the `pds` binary and the stdio LSP.
[dependencies]
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
anyhow = "1"
walkdir = "2"

Expand Down
2 changes: 1 addition & 1 deletion crates/pseudoscript-universe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ path = "src/lib.rs"

[dependencies]
# The resolved C4 model — the same source of truth the 2D view consumes. WASM-safe.
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
# The containment tree + relationship graph. MIT/Apache, WASM-safe.
petgraph = "0.6"
# Serialises the graph snapshot the renderer consumes.
Expand Down
14 changes: 7 additions & 7 deletions crates/pseudoscript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ name = "pds"
path = "src/main.rs"

[dependencies]
pseudoscript-syntax = { path = "../pseudoscript-syntax" }
pseudoscript-model = { path = "../pseudoscript-model" }
pseudoscript-format = { path = "../pseudoscript-format" }
pseudoscript-emit = { path = "../pseudoscript-emit" }
pseudoscript-lsp = { path = "../pseudoscript-lsp" }
pseudoscript-doc = { path = "../pseudoscript-doc" }
pseudoscript-project = { path = "../pseudoscript-project" }
pseudoscript-syntax = { path = "../pseudoscript-syntax", version = "0.1.5" }
pseudoscript-model = { path = "../pseudoscript-model", version = "0.1.5" }
pseudoscript-format = { path = "../pseudoscript-format", version = "0.1.5" }
pseudoscript-emit = { path = "../pseudoscript-emit", version = "0.1.5" }
pseudoscript-lsp = { path = "../pseudoscript-lsp", version = "0.1.5" }
pseudoscript-doc = { path = "../pseudoscript-doc", version = "0.1.5" }
pseudoscript-project = { path = "../pseudoscript-project", version = "0.1.5" }
clap = { version = "4", features = ["derive"] }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "io-std"] }
anyhow = "1"
Expand Down
39 changes: 31 additions & 8 deletions crates/pseudoscript/build.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
//! Assembles the `pds lang` reference bundle at build time.
//! Stages the repo-level sources `main.rs` embeds: the `pds lang` reference
//! bundle and the `pds skill` authoring skill.
//!
//! Concatenates the spec (`LANG.md`), the patterns guide (`PATTERNS.md`), and
//! every file in the `CONFORMANCE/` grammar suite into one blob under
//! `$OUT_DIR/lang-bundle.md`, which `main.rs` embeds via `include_str!`. Each
//! file is fenced with a `===== <repo-relative path> =====` header so the
//! single stream stays unambiguously splittable.
//! The bundle concatenates the spec (`LANG.md`), the patterns guide
//! (`PATTERNS.md`), and every file in the `CONFORMANCE/` grammar suite into one
//! blob under `$OUT_DIR/lang-bundle.md`. Each file is fenced with a
//! `===== <repo-relative path> =====` header so the single stream stays
//! unambiguously splittable. The skill (`.claude/skills/pseudocode/SKILL.md`)
//! is copied verbatim to `$OUT_DIR/pds-skill.md`.

use std::fmt::Write as _;
use std::fs;
Expand All @@ -17,6 +19,27 @@ fn main() {
.join("../..")
.canonicalize()
.expect("workspace root resolves from the crate manifest dir");
let out_dir = PathBuf::from(std::env::var_os("OUT_DIR").expect("OUT_DIR"));
let bundle_out = out_dir.join("lang-bundle.md");
let skill_out = out_dir.join("pds-skill.md");

// `cargo package` verify builds (release-plz runs one per release) compile
// from a tarball that cannot contain the repo-level spec sources. The crate
// is never published, so those builds get stubs; builds from the repo
// still panic on any unreadable file.
if !repo_root.join("LANG.md").exists() {
let stub = "unavailable: built outside the PseudoScript repository.\n";
for path in [&bundle_out, &skill_out] {
fs::write(path, stub)
.unwrap_or_else(|err| panic!("writing `{}`: {err}", path.display()));
}
return;
}

let skill = repo_root.join(".claude/skills/pseudocode/SKILL.md");
println!("cargo:rerun-if-changed={}", skill.display());
fs::copy(&skill, &skill_out)
.unwrap_or_else(|err| panic!("copying `{}`: {err}", skill.display()));

// Spec and patterns first, then every conformance file sorted by path so a
// case sits next to its expected-output pair (e.g. `*.pds` then `*.tokens`).
Expand All @@ -37,8 +60,8 @@ fn main() {
println!("cargo:rerun-if-changed={}", path.display());
}

let out = PathBuf::from(std::env::var_os("OUT_DIR").expect("OUT_DIR")).join("lang-bundle.md");
fs::write(&out, bundle).unwrap_or_else(|err| panic!("writing `{}`: {err}", out.display()));
fs::write(&bundle_out, bundle)
.unwrap_or_else(|err| panic!("writing `{}`: {err}", bundle_out.display()));
}

/// Appends every regular file under `dir`, recursively, to `files`.
Expand Down
10 changes: 4 additions & 6 deletions crates/pseudoscript/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ use serde::Serialize;
/// by `build.rs` and embedded so `pds lang` always matches the installed binary.
const LANG_BUNDLE: &str = include_str!(concat!(env!("OUT_DIR"), "/lang-bundle.md"));

/// The `PseudoScript` authoring-method skill, embedded verbatim so `pds skill`
/// prints it like any other skill file.
const PDS_SKILL: &str = include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/../../.claude/skills/pseudocode/SKILL.md"
));
/// The `PseudoScript` authoring-method skill, staged into `OUT_DIR` by
/// `build.rs` and embedded verbatim so `pds skill` prints it like any other
/// skill file.
const PDS_SKILL: &str = include_str!(concat!(env!("OUT_DIR"), "/pds-skill.md"));

/// The `PseudoScript` toolchain.
#[derive(Debug, Parser)]
Expand Down
5 changes: 5 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ git_tag_enable = false
git_release_enable = false

# The binary crate (`pseudoscript` → `pds`): the only tagged/released package.
# `git_only` makes release-plz read the last release from the `v*` git tags
# instead of the cargo registry — without it, an unpublished crate looks
# perpetually unreleased, so release-pr proposes the current version forever
# and never bumps (every release then needs a manual bump PR, e.g. #47, #60).
# The release is created NOT marked latest (`git_release_latest = false`); the
# release-assets workflow flips it to latest only after the installer + upgrade
# smoke test passes on all three OSes, so a broken release never becomes the one
# `/releases/latest`, scripts/install.*, and `pds upgrade` resolve.
[[package]]
name = "pseudoscript"
git_only = true
git_tag_enable = true
git_tag_name = "v{{ version }}"
git_release_enable = true
Expand Down
Loading