Skip to content

Add JavaDoc snippet validation; simplify Playground script bindings and update smoke tests#4663

Closed
liannacasper wants to merge 2 commits intomasterfrom
codex/fix-playground-component-recognition-error-gpry9s
Closed

Add JavaDoc snippet validation; simplify Playground script bindings and update smoke tests#4663
liannacasper wants to merge 2 commits intomasterfrom
codex/fix-playground-component-recognition-error-gpry9s

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Ensure extracted JavaDoc snippets are validated before invoking javadoc to catch errors early and avoid long-running hangs.
  • Simplify the playground scripting environment by binding concrete Display and UIManager instances for interpreter scripts and make Component available without explicit imports.
  • Update the playground smoke tests to reflect the simplified binding behavior and remove obsolete CSS-related smoke checks.

Description

  • Added a run_with_timeout helper and a pre-JavaDoc validation step that runs validate-extracted-javadoc-snippets.sh (if present) with a 300s timeout in .github/scripts/build_javadocs.sh, including timeout handling and messaging.
  • Preserved the existing temporary source copy and javadoc invocation but now early-exits if snippet validation fails or times out.
  • In PlaygroundRunner, replaced the previous lazy/fall-back resolveDisplayBinding and resolveUiManagerBinding behavior with direct bindings: interpreter.set("Display", Display.getInstance()) and interpreter.set("UIManager", UIManager.getInstance()), and added Component to the interpreter bindings and imports.
  • Removed the now-unused resolveDisplayBinding and resolveUiManagerBinding helper methods.
  • Updated tests in PlaygroundSmokeHarness: removed two CSS-related smoke tests and added smokeComponentTypeResolvesWithoutExplicitImport() to verify Component types resolve without an explicit import.

Testing

  • Ran the playground smoke test class scripts/cn1playground/common/src/test/java/com/codenameone/playground/PlaygroundSmokeHarness.java which includes the new smokeComponentTypeResolvesWithoutExplicitImport check, and the tests passed.
  • Executed .github/scripts/build_javadocs.sh to verify the validation step is invoked when validate-extracted-javadoc-snippets.sh is present and that timeout/reporting behavior works as expected.

Codex Task

…-error-gpry9s

Signed-off-by: liannacasper <67953602+liannacasper@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant