You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rework proof script to use existing proof/ Java files instead of YAML proofCode
The existing proof/ directory (from a parallel branch) contains 105 individual
JBang scripts - one per pattern - that were missed in the initial approach.
Changes:
- Add all 105 proof/**/*.java scripts from proof/ directory
- Rewrite html-generators/proof.java to run proof/**/*.java via jbang
instead of parsing YAML proofCode fields through JShell
- Revert the proofCode field additions from 10 YAML content files
- Revert proofCode from generate.java/generate.py EXCLUDED_KEYS
- Revert proofCode from content/template.json
- Update .github/workflows/proof.yml to trigger on proof/** changes
- Update html-generators/README.md, CONTRIBUTING.md, and
.github/copilot-instructions.md to document the proof/ directory
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
@@ -100,8 +104,7 @@ Each `content/category/slug.json` file has this structure:
100
104
],
101
105
"docs": [
102
106
{ "title": "Javadoc or Guide Title", "href": "https://docs.oracle.com/..." }
103
-
],
104
-
"proofCode": "// Optional: self-contained JShell snippet proving the modern approach works.\n// Run with: jbang html-generators/proof.java"
107
+
]
105
108
}
106
109
```
107
110
@@ -139,7 +142,8 @@ Categories and their display names are defined in `html-generators/categories.pr
139
142
1. Create `content/category/new-slug.json` with all required fields
140
143
2. Update `prev`/`next` in the adjacent patterns' JSON files
141
144
3. Run `jbang html-generators/generate.java`
142
-
4. (Optional) Create translated content files under `translations/content/{locale}/category/new-slug.json` with only translatable fields — or let the AI translation workflow handle it
145
+
4. Add a proof script at `proof/category/SlugName.java` (JBang, `//JAVA 25+`) — run `jbang html-generators/proof.java` to verify
146
+
5. (Optional) Create translated content files under `translations/content/{locale}/category/new-slug.json` with only translatable fields — or let the AI translation workflow handle it
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Contributions are welcome! Content is managed as YAML files — never edit gener
9
9
3. Copy [`content/template.json`](content/template.json) as a starting point for all required fields (see the [snippet schema](.github/copilot-instructions.md) for details)
10
10
4. Update the `prev`/`next` fields in adjacent pattern files to maintain navigation
11
11
5. Run `jbang html-generators/generate.java` to verify your changes build correctly
12
-
6.Optionally add a `proofCode` field — a self-contained JShell snippet that proves the modern approach works. Run`jbang html-generators/proof.java` to validate it.
12
+
6.Add a proof script at `proof/<category>/SlugName.java`that uses the modern approach and run`jbang html-generators/proof.java` to verify it passes
13
13
7. Open a pull request
14
14
15
15
Please ensure JDK version labels only reference the version where a feature became **final** (non-preview).
0 commit comments