Skip to content

Commit ff75aa6

Browse files
committed
fix: move generate_fixtures to standalone crate + bump to 1.0.0-beta.8
The beta.7 fix (required-features) prevented the binary from compiling but Tauri's bundler reads Cargo metadata and still tried to copy every declared [[bin]] into the bundle — failing on all 4 platforms with: 'Failed to copy binary ...generate_fixtures: does not exist' Fix: move generate_fixtures entirely out of the src-tauri package into tools/generate-fixtures/ (its own Cargo.toml, only depends on image). Tauri's bundler never scans outside src-tauri/, so the binary is fully invisible to the release build. To regenerate test fixtures: cargo run --manifest-path tools/generate-fixtures/Cargo.toml
1 parent c78c504 commit ff75aa6

11 files changed

Lines changed: 53 additions & 43 deletions

File tree

.claude/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ See `.claude/project_rules_decisions.md` for all architectural decisions and rul
1717

1818
**Always read `.claude/project_rules_decisions.md` before starting work.** Key rules P007–P010 apply to every change:
1919

20-
- **P007 — Committed fixtures:** Any new processing pipeline must have a real binary fixture in `test-fixtures/` (not synthetic stubs). Generate with the Rust binary: `cd src-tauri && cargo run --bin generate_fixtures --features fixtures`.
20+
- **P007 — Committed fixtures:** Any new processing pipeline must have a real binary fixture in `test-fixtures/` (not synthetic stubs). Generate with the Rust binary: `cargo run --manifest-path tools/generate-fixtures/Cargo.toml`.
2121
- **P008 — Parallel TEST_PLAN.md entries:** When adding a test, add its ID to the "Automated vs Manual" table in `.planning/TEST_PLAN.md`.
2222
- **P009 — Bug-to-test:** Every bug fix must ship with a regression test that would have caught the original failure.
2323
- **P010 — TDD:** Write the failing test FIRST, confirm it is red, then implement the fix. Commit both together.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to Papercut will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.0-beta.8] - 2026-04-27
9+
10+
### Fixed
11+
- Release build failures on all platforms: the beta.7 fix used Cargo `required-features` to exclude `generate_fixtures` from compilation, but Tauri's bundler still reads `Cargo.toml` metadata and tries to copy every declared `[[bin]]` into the bundle — failing because the binary was never compiled. Fix: moved `generate_fixtures` to a completely independent Cargo crate at `tools/generate-fixtures/` that `tauri build` never sees. To run: `cargo run --manifest-path tools/generate-fixtures/Cargo.toml`.
12+
813
## [1.0.0-beta.7] - 2026-04-27
914

1015
### Fixed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tauri-app",
33
"private": true,
4-
"version": "1.0.0-beta.7",
4+
"version": "1.0.0-beta.8",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tauri-app"
3-
version = "1.0.0-beta.7"
3+
version = "1.0.0-beta.8"
44
description = "A Tauri App"
55
authors = ["you"]
66
edition = "2021"
@@ -35,16 +35,4 @@ uuid = { version = "1", features = ["v4"] }
3535
[target.'cfg(debug_assertions)'.dependencies]
3636
tauri-plugin-webdriver-automation = "0.1"
3737

38-
# generate_fixtures is a dev-only binary for producing test fixtures.
39-
# Gating it behind a feature prevents it from being compiled during
40-
# `cargo tauri build`, which would otherwise bundle it into Contents/MacOS/
41-
# alongside tauri-app and break the ad-hoc codesign on macOS.
42-
# To run it: cargo run --bin generate_fixtures --features fixtures
43-
[features]
44-
fixtures = []
45-
46-
[[bin]]
47-
name = "generate_fixtures"
48-
path = "src/bin/generate_fixtures.rs"
49-
required-features = ["fixtures"]
5038

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "Papercut",
4-
"version": "1.0.0-beta.7",
4+
"version": "1.0.0-beta.8",
55
"identifier": "com.papercut.app",
66
"build": {
77
"beforeDevCommand": "npm run dev",

src/components/AboutDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { openUrl } from '@tauri-apps/plugin-opener';
44

55
const GITHUB_REPO_URL = 'https://github.com/shyhunter/Papercut';
66

7-
const APP_VERSION_FALLBACK = '1.0.0-beta.7';
7+
const APP_VERSION_FALLBACK = '1.0.0-beta.8';
88

99
interface AboutDialogProps {
1010
open: boolean;

src/components/Dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export function Dashboard() {
250250
const { favorites, toggleFavorite, reorderFavorites, isFavorite } = useFavorites();
251251
const { isAvailable, getHint } = useDependencies();
252252
const [aboutOpen, setAboutOpen] = useState(false);
253-
const [appVersion, setAppVersion] = useState('1.0.0-beta.7');
253+
const [appVersion, setAppVersion] = useState('1.0.0-beta.8');
254254

255255
useEffect(() => {
256256
import('@tauri-apps/api/app')

src/components/SplashScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface SplashScreenProps {
55
onComplete: () => void;
66
}
77

8-
const APP_VERSION = '1.0.0-beta.7';
8+
const APP_VERSION = '1.0.0-beta.8';
99

1010
export function SplashScreen({ onComplete }: SplashScreenProps) {
1111
const [fadeOut, setFadeOut] = useState(false);

tools/generate-fixtures/Cargo.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "generate-fixtures"
3+
version = "0.1.0"
4+
edition = "2021"
5+
description = "Dev-only tool: generates committed test fixtures in test-fixtures/"
6+
publish = false
7+
8+
# This crate is intentionally NOT part of the src-tauri Cargo package so that
9+
# `cargo tauri build` never compiles or bundles it.
10+
# To run: cargo run --manifest-path tools/generate-fixtures/Cargo.toml
11+
12+
[dependencies]
13+
image = "0.25"

0 commit comments

Comments
 (0)