Skip to content

Validate Javadoc snippets; fix playground bindings; improve CN1 access registry generation and smoke-test verification#4667

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

Validate Javadoc snippets; fix playground bindings; improve CN1 access registry generation and smoke-test verification#4667
liannacasper wants to merge 2 commits intomasterfrom
codex/fix-playground-component-recognition-error-5ek203

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Validate extracted Javadoc snippets before generating docs and avoid hangs by bounding validation with a timeout.
  • Make the playground interpreter resolve common UI bindings reliably (allowing implicit Component usage) instead of using fragile resolver methods.
  • Make generation of the CN1 access registry deterministic and verifiable by supporting a local-sources mode and adding runtime checks to the smoke-test harness.

Description

  • Add a run_with_timeout helper and pre-JavaDoc validation step that runs validate-extracted-javadoc-snippets.sh with a 300s timeout in .github/scripts/build_javadocs.sh.
  • Bind Display and UIManager directly via Display.getInstance()/UIManager.getInstance() and add an explicit Component binding and import in PlaygroundRunner.java, removing the prior resolver methods.
  • Replace CSS-related smoke checks with a new smokeComponentTypeResolvesWithoutExplicitImport() test in PlaygroundSmokeHarness that verifies implicit Component resolution works.
  • Document new behavior and environment knob in scripts/cn1playground/tools/README.md, including CN1_ACCESS_USE_LOCAL_SOURCES to control whether to scan local sources or release source jars.
  • Enhance generate-cn1-access-registry.sh to support CN1_ACCESS_USE_LOCAL_SOURCES=true, robustly download/extract release source jars when used, and present clearer errors.
  • Update run-playground-smoke-tests.sh to use bash, regenerate the CN1 access registry from release sources before testing, and assert the generated GeneratedCN1Access.java contains expected com.codename1.ui.* classes (including Component) and omits internal sentinel classes before running the smoke harness.

Testing

  • Executed the updated smoke-test driver via scripts/cn1playground/tools/run-playground-smoke-tests.sh, which regenerates the CN1 access registry and runs the PlaygroundSmokeHarness via Maven exec, and the smoke harness checks passed.
  • The registry-generation path was exercised for release-source mode and its presence/absence assertions on GeneratedCN1Access.java succeeded.

Codex Task

…-error-5ek203

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

Cloudflare Preview

@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