-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathjustfile
More file actions
64 lines (49 loc) · 1.99 KB
/
Copy pathjustfile
File metadata and controls
64 lines (49 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
native_target := `rustc -vV | grep host | awk '{print $2}'`
ext_dir := if os() == "macos" { env("HOME") / "Library/Application Support/Zed/extensions/work/java" } else if os() == "linux" { env("HOME") / ".local/share/zed/extensions/work/java" } else { env("LOCALAPPDATA") / "Zed/extensions/work/java" }
proxy_bin := ext_dir / "bin" / "java-lsp-proxy"
tasks_bin := ext_dir / "bin" / "java-task-helper"
# Build proxy in debug mode
proxy-build:
cd proxy && cargo build --target {{ native_target }}
# Build proxy in release mode
proxy-release:
cd proxy && cargo build --release --target {{ native_target }}
# Build proxy release and install to extension workdir for testing
proxy-install: proxy-release
mkdir -p "{{ ext_dir }}/bin"
cp "target/{{ native_target }}/release/java-lsp-proxy" "{{ proxy_bin }}"
@echo "Installed to {{ ext_dir }}"
# --- Task helper recipes ---
# Build task helper in debug mode
task-build:
cd task_helper && cargo build --target {{ native_target }}
# Build task helper in release mode
task-release:
cd task_helper && cargo build --release --target {{ native_target }}
# Build task helper release and install to extension workdir for testing
task-install: task-release
mkdir -p "{{ ext_dir }}/bin"
cp "target/{{ native_target }}/release/java-task-helper" "{{ tasks_bin }}"
@echo "Installed to {{ ext_dir }}"
# Run task helper tests
task-test:
cd task_helper && cargo test
# Clean task helper build
task-clean:
cd task_helper && cargo clean
# --- Core recipes ---
# Build WASM extension in release mode
ext-build:
cargo build --release
# Format all code
fmt:
cargo fmt --all
ts_query_ls format languages
# Run clippy on both crates
clippy:
cargo clippy --all-targets --fix --allow-dirty
cd proxy && cargo clippy --all-targets --fix --allow-dirty --target {{ native_target }}
# Format and lint all code
lint: fmt clippy
# Build everything: lint, extension, and install proxy & task helper
all: lint ext-build proxy-install task-install