Skip to content

Ensure Component is present in generated CN1 access registry, support local/release sources, and validate Javadoc snippets#4666

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

Ensure Component is present in generated CN1 access registry, support local/release sources, and validate Javadoc snippets#4666
liannacasper wants to merge 2 commits intomasterfrom
codex/fix-playground-component-recognition-error-k8gcj2

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • Make the playground tooling reliably expose core com.codename1.ui.Component (and other key UI types) to the BeanShell CN1 access registry so loose scripts can reference Component without explicit imports.
  • Allow generating the CN1 access registry from either local repository sources or release source jars and fail fast if expected classes are missing.
  • Validate extracted Javadoc snippets before generating Javadoc to catch snippet issues early.

Description

  • Updated generate-cn1-access-registry.sh to support CN1_ACCESS_USE_LOCAL_SOURCES=true to scan local repo sources, otherwise download and extract release source jars for the configured cn1.version, with improved error handling and clearer logging.
  • Modified the registry generator (GenerateCN1AccessRegistry.java) to treat types missing from the runtime classpath as supported for registration so they can be emitted into the generated registry.
  • Changed the smoke-test runner run-playground-smoke-tests.sh to always regenerate the registry from release sources before testing, verify the presence of com.codename1.ui.Component and a set of key UI classes in the generated GeneratedCN1Access.java, and run the PlaygroundSmokeHarness via Maven.
  • Adjusted PlaygroundRunner to bind Display and UIManager to their live instances and to expose Component to the interpreter namespace, removing the previous fallback resolver methods.
  • Replaced CSS-related smoke tests with a focused smoke test (smokeComponentTypeResolvesWithoutExplicitImport) that asserts Component resolution without an explicit import in loose scripts, and simplified imports in PlaygroundSmokeHarness.
  • Added a run_with_timeout helper and a pre-Javadoc validation step in .github/scripts/build_javadocs.sh that runs validate-extracted-javadoc-snippets.sh with a 300s timeout when present.
  • Documentation (scripts/cn1playground/tools/README.md) updated to explain the local vs release source behavior and the smoke-test verification steps.

Testing

  • Ran the playground smoke tests via scripts/cn1playground/tools/run-playground-smoke-tests.sh, which regenerates the CN1 access registry, verifies required com.codename1.ui.* entries (including Component), and then executes com.codenameone.playground.PlaygroundSmokeHarness; the smoke harness completed successfully.
  • The Maven test-compile + exec invocation used by the smoke test runner completed successfully during verification.

Codex Task

…-error-k8gcj2

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