Skip to content

Commit fe54a20

Browse files
committed
Move DSL sources into hm-dsl-engine crate
dsls/harmont-py and dsls/harmont-ts lived outside the crate directory, so `cargo install` from crates.io failed — the include_dir! proc macro couldn't find the Python sources and the build.rs couldn't find the TS sources. Moving them into crates/hm-dsl-engine/ makes everything self-contained within the crate boundary.
1 parent beb7086 commit fe54a20

149 files changed

Lines changed: 30 additions & 29 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- uses: Swatinem/rust-cache@v2
2525

2626
- name: Install esbuild (for harmont-ts bundle)
27-
working-directory: dsls/harmont-ts
27+
working-directory: crates/hm-dsl-engine/harmont-ts
2828
run: npm ci
2929

3030
- name: cargo build (all targets)
@@ -52,19 +52,19 @@ jobs:
5252
cache: pip
5353

5454
- name: Install harmont + dev extras
55-
working-directory: dsls/harmont-py
55+
working-directory: crates/hm-dsl-engine/harmont-py
5656
run: pip install -e '.[dev]'
5757

5858
- name: ruff check
59-
working-directory: dsls/harmont-py
59+
working-directory: crates/hm-dsl-engine/harmont-py
6060
run: ruff check .
6161

6262
- name: ty
63-
working-directory: dsls/harmont-py
63+
working-directory: crates/hm-dsl-engine/harmont-py
6464
run: ty check harmont
6565

6666
- name: pytest
67-
working-directory: dsls/harmont-py
67+
working-directory: crates/hm-dsl-engine/harmont-py
6868
run: |
6969
pytest -v \
7070
--deselect tests/test_gradle.py \
@@ -80,18 +80,18 @@ jobs:
8080
with:
8181
node-version: "20"
8282
cache: npm
83-
cache-dependency-path: dsls/harmont-ts/package-lock.json
83+
cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json
8484

8585
- name: Install
86-
working-directory: dsls/harmont-ts
86+
working-directory: crates/hm-dsl-engine/harmont-ts
8787
run: npm ci
8888

8989
- name: Type check
90-
working-directory: dsls/harmont-ts
90+
working-directory: crates/hm-dsl-engine/harmont-ts
9191
run: npx tsc --noEmit
9292

9393
- name: Test
94-
working-directory: dsls/harmont-ts
94+
working-directory: crates/hm-dsl-engine/harmont-ts
9595
run: npm test
9696

9797
dogfood:
@@ -112,10 +112,10 @@ jobs:
112112
with:
113113
node-version: "23"
114114
cache: npm
115-
cache-dependency-path: dsls/harmont-ts/package-lock.json
115+
cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json
116116

117117
- name: Install esbuild (for harmont-ts bundle)
118-
working-directory: dsls/harmont-ts
118+
working-directory: crates/hm-dsl-engine/harmont-ts
119119
run: npm ci
120120

121121
- name: Build hm

.github/workflows/examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
shared-key: examples-hm
5656

5757
- name: Install esbuild (for harmont-ts bundle)
58-
working-directory: dsls/harmont-ts
58+
working-directory: crates/hm-dsl-engine/harmont-ts
5959
run: npm ci
6060

6161
- name: Build hm

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: Swatinem/rust-cache@v2
2727

2828
- name: Install esbuild (for harmont-ts bundle)
29-
working-directory: dsls/harmont-ts
29+
working-directory: crates/hm-dsl-engine/harmont-ts
3030
run: npm ci
3131

3232
- name: Set version from tag
@@ -147,10 +147,10 @@ jobs:
147147
with:
148148
node-version: "20"
149149
cache: npm
150-
cache-dependency-path: dsls/harmont-ts/package-lock.json
150+
cache-dependency-path: crates/hm-dsl-engine/harmont-ts/package-lock.json
151151

152152
- name: Install esbuild
153-
working-directory: dsls/harmont-ts
153+
working-directory: crates/hm-dsl-engine/harmont-ts
154154
run: npm ci
155155

156156
- name: Set version from tag

CLAUDE.md

Lines changed: 6 additions & 4 deletions

crates/hm-dsl-engine/build.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@ use std::process::Command;
1414
fn main() {
1515
let manifest_dir = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap());
1616
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
17-
let workspace_root = manifest_dir.join("../..").canonicalize().unwrap();
18-
let ts_src = workspace_root.join("dsls/harmont-ts/src");
17+
let ts_src = manifest_dir.join("harmont-ts/src");
1918

2019
println!("cargo:rerun-if-changed=build.rs");
2120
println!("cargo:rerun-if-changed={}", ts_src.display());
2221

23-
let esbuild = find_esbuild(&workspace_root);
22+
let esbuild = find_esbuild(&manifest_dir);
2423

2524
let Some(esbuild) = esbuild else {
2625
eprintln!(
2726
"cargo:warning=esbuild not found; writing stub bundles. \
28-
Run `npm ci` in dsls/harmont-ts/ for real bundles."
27+
Run `npm ci` in crates/hm-dsl-engine/harmont-ts/ for real bundles."
2928
);
3029
fs::write(out_dir.join("harmont-index.mjs"), "// stub\nexport {};").unwrap();
3130
fs::write(
@@ -61,8 +60,8 @@ fn bundle(esbuild: &Path, entry: &Path, outfile: &Path) {
6160
assert!(status.success(), "esbuild failed for {}", entry.display());
6261
}
6362

64-
fn find_esbuild(workspace_root: &Path) -> Option<PathBuf> {
65-
let local = workspace_root.join("dsls/harmont-ts/node_modules/.bin/esbuild");
63+
fn find_esbuild(manifest_dir: &Path) -> Option<PathBuf> {
64+
let local = manifest_dir.join("harmont-ts/node_modules/.bin/esbuild");
6665
if local.exists() {
6766
return Some(local);
6867
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)