Skip to content

Engine-java package hygiene: move JSPromise to jsengine, document the package layout rule #689

Description

@romain-pm

Follow-up from the architecture review of the feature/js-server-extensions branch (PR #687). Internal-only refactor — no exported package is affected (Export-Package lists only …engine.sdk), so this is non-breaking and can land anytime.

  1. Move JSPromise from …engine.actions to …engine.jsengine. It is a general GraalJS facility (settling promises through microtask draining), not an actions concern; its current home would force unrelated features (see Retrofit async (promise) support to server extension-point callbacks #688) to import from actions.
  2. Document the package layout rule in a package-info.java for …engine.registrars: single-class bridges live flat in registrars/; multi-class verticals get a subpackage (validation/, contentpatches/); non-registrar surfaces live outside (actions/ endpoint, sdk/ facade). The rule exists implicitly today, which makes the mixed layout look accidental to newcomers.

Acceptance. JSPromiseTest moved along with the class; mvn test green; package-info.java present with the rule stated in 3–4 sentences.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions