Skip to content

Report actionable internal resolution errors#278

Open
morgan-coded wants to merge 3 commits into
arethetypeswrong:mainfrom
morgan-coded:fix/257-internal-resolution-diagnostic
Open

Report actionable internal resolution errors#278
morgan-coded wants to merge 3 commits into
arethetypeswrong:mainfrom
morgan-coded:fix/257-internal-resolution-diagnostic

Conversation

@morgan-coded

@morgan-coded morgan-coded commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

InternalResolutionError only pointed users to -f json, so the actual resolution failure stayed hidden in the original CI run. The default output now reports the failing specifier, resolution kind, and declaration file; --verbose adds the full trace and JSON exposes the same fields. Repeated failures that share a specifier, resolution kind, and declaration file are deduplicated across entrypoints in the summary. Existing problem fields and other problem kinds are unchanged. Fixes #257

Copilot AI review requested due to automatic review settings July 11, 2026 13:31
@changeset-bot

changeset-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 15db114

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@arethetypeswrong/core Patch
@arethetypeswrong/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 24 changed files in this pull request and generated 1 comment.

Comment thread packages/cli/src/render/typed.ts Outdated

@andrewbranch andrewbranch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is looking good! I have a couple small suggestions that will hopefully make the output slightly more readable.


'./core' failed to resolve for entrypoint '@apollo/client' using node16-cjs with conditions 'import', 'types', 'node' from declaration '/node_modules/@apollo/client/index.d.ts': Module name './core' was not resolved.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's indent the start of each of these so it's more clear that they're sub-elements of the message above. Also, the "Module name './core' was not resolved." seems to be redundant with the rest of the message, so we can probably remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indented the summary lines under the description and dropped the redundant Module name … was not resolved. tail. New form: './core' failed to resolve using node16-cjs from '/node_modules/@apollo/client/index.d.ts'.

Comment thread packages/cli/src/render/typed.ts Outdated
Comment thread packages/cli/src/render/typed.ts Outdated
Indent and dedupe the internal-resolution summary lines across
entrypoints, and drop the redundant entrypoint, "declaration",
conditions, and resolver-message text from each human-readable line.
Table cells and the JSON/structured fields are unchanged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 2 comments.

Comment thread packages/cli/src/render/typed.ts
Comment on lines +255 to +258
function formatInternalResolutionError(problem: core.InternalResolutionErrorProblem): string {
return `${quote(problem.moduleSpecifier)} failed to resolve using ${problem.resolutionKind} from ${quote(
problem.fileName,
)}`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InternalResolutionError provides no actionable advice

3 participants