add renpy#31
Conversation
|
Claude finished @cloud9c's task in 2m 17s —— View job Code ReviewAdds Ren'Py as a fifth engine. The change is small (+27/−1) and faithfully follows the JsDos/Ruffle pattern across Two issues worth fixing before merge, plus one optional cleanup. Issues1. Stale error message in The conflict-detection branch now also fires for A user who puts 2. Stale doc comments referencing only JSDOS/Ruffle (inline comment posted) Four spots still say "For JSDOS/Ruffle" but now also apply to Ren'Py:
Optional — refactor to reduce duplication
Notes
Todos
|
| self.unity.is_some().then_some(EngineKind::Unity), | ||
| self.jsdos.is_some().then_some(EngineKind::JsDos), | ||
| self.ruffle.is_some().then_some(EngineKind::Ruffle), | ||
| self.renpy.is_some().then_some(EngineKind::RenPy), |
There was a problem hiding this comment.
Adding RenPy here means the conflict-detection branch directly below (line 263) now also fires for renpy combinations, but its error message wasn't updated:
"Config must have at most one engine section: [godot], [unity], [jsdos], or [ruffle]"A user who accidentally combines [godot] + [renpy] will be told the valid engines but won't see [renpy] in the list. Please update the message to include [renpy].
| } else if let Some(ref renpy) = self.renpy { | ||
| let mut params = serde_json::json!({ "executable": renpy.executable }); | ||
| if let Some(ref loader_url) = renpy.loader_url { | ||
| params["loaderUrl"] = serde_json::json!(loader_url); | ||
| } | ||
| Some(params) |
There was a problem hiding this comment.
This branch is the third near-identical copy of the same shape (executable + optional loader_url). Two related observations:
- The doc comment on
executable_entrypoint_params(line 297) and onexecutable_files_to_validate(line 322) still say "For JSDOS/Ruffle engines" — they need an update to include Ren'Py. Same for the comments atsrc/file_staging.rs:35andsrc/builds.rs:71. - Since
JsDosSection,RuffleSection, andRenPySectionare now byte-for-byte identical (version,executable,loader_url), consider extracting a sharedExecutableEngineSectionstruct and a small helper that yields(executable, loader_url)for whichever variant is active. Would collapse the three if/else branches here and inexecutable_files_to_validateandengine_versioninto a single match, and make adding the next engine a one-line change. Not blocking — just calling out that the duplication has crossed the threshold where it's starting to cost.
No description provided.