Skip to content

Fix cn1-playground reflection mapping generation with released source roots#4669

Closed
liannacasper wants to merge 1 commit intomasterfrom
codex/fix-reflection-source-mappings-in-cn1-playground
Closed

Fix cn1-playground reflection mapping generation with released source roots#4669
liannacasper wants to merge 1 commit intomasterfrom
codex/fix-reflection-source-mappings-in-cn1-playground

Conversation

@liannacasper
Copy link
Copy Markdown
Collaborator

Motivation

  • The playground generator moved to scanning downloaded CN1 source jars and runs without CN1 runtime jars on the tool classpath, but the generator still filtered CN1 types by attempting to load them at runtime which caused valid CN1 types to be dropped and produced broken reflection mappings.

Description

  • Remove runtime-class visibility filtering for com.codename1.* types by deleting isPublicRuntimeType/filterKnownTypes usage and the associated cache so discovery no longer depends on Class.forName for CN1 types.
  • Adjust isDispatchClass and isSupportedType logic to keep package-level exclusions (e.g. com.codename1.impl) while avoiding runtime visibility checks that are invalid for the source-jar workflow.
  • Change is limited to scripts/cn1playground/tools/src/main/java/com/codenameone/playground/tools/GenerateCN1AccessRegistry.java to restore correct reflection registry generation from source roots.

Testing

  • Compiled the generator with javac -d /tmp/cn1tool scripts/cn1playground/tools/src/main/java/com/codenameone/playground/tools/GenerateCN1AccessRegistry.java, which succeeded.
  • Attempted to run ./scripts/cn1playground/tools/generate-cn1-access-registry.sh and CN1_VERSION=7.0.230 ./scripts/cn1playground/tools/generate-cn1-access-registry.sh, but both runs failed to download source jars due to curl: (22) 403 from the Maven endpoint in this environment, preventing a full end-to-end generation smoke test.

Codex Task

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