Skip to content

Declaration-build failures surface as catch-all AB5000 with the TypeScript diagnostics swallowed #176

Description

@ScriptedAlchemy

Problem

Today an emit-only TS4023 regression—exported factories referencing an unexported type (#150 / #174)—surfaced only as:

error Failed to generate declaration files. (agent-bundle-index)
[{"code":"AB5000","message":"Error occurred in agent-bundle-index declaration files generation."}]

The five underlying TS4023 diagnostics were hidden by rslib's one-line error.

This creates two DX problems:

  1. It conflates declaration-build failures with AB5000's dev-lock meaning ("another dev process owns this project"), which misled initial triage.
  2. It forced a manual tsc --declaration --emitDeclarationOnly replay to reveal the actual errors.

Requested improvements

  • Surface the underlying TypeScript diagnostics—including file, line, and diagnostic code—through the declaration-build failure path.
  • Give declaration-build failures their own AB code instead of using the AB5000 catch-all.
  • Add a hint that emit-only errors can be invisible to --noEmit.

See #174's root-cause writeup for the concrete regression and diagnosis.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions