Skip to content

[repo-assist] Distinguish "package not found" from real conflicts in resolver errors - #4408

Merged
dsyme merged 1 commit into
masterfrom
repo-assist/fix-issue-3446-conflict-message-e287099c232fa9d3
Aug 30, 2026
Merged

dsyme merged 1 commit into
masterfrom
repo-assist/fix-issue-3446-conflict-message-e287099c232fa9d3

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist, an AI assistant.

Closes #3446

Root cause

When Paket's resolver fails with only a single unmet requirement (no other requirement constraining the same package), it previously always printed:

Conflict detected:
  - Falanx.Tool 0.4.0-alpha5 requested package Falanx.Proto.Codec.Json: >= 0.4.0-alpha5 (alpha)
  - Available versions:
    - 0.3.0

As reported in #3446, this is misleading: there's no actual conflict between multiple requirements here — the requested package/version range simply wasn't available from any configured source. "Conflict" troubleshooting (multiple requirements pulling in different directions) is a very different mental model from "the version you asked for doesn't exist".

Fix

In PackageResolver.fs, buildConflictReport now takes a header string parameter. The single-requirement error path (cfs.Count = 1) now uses the header "Package not found" instead of "Conflict detected". The multi-requirement path (Count > 1, a genuine conflict between contradictory requirements) keeps "Conflict detected" unchanged.

Trade-offs

  • This only changes the header text of the error message; the rest of the report (available versions list, requesting package info) is unchanged, minimizing risk of breaking anything relying on the surrounding format.
  • Existing integration test updateShouldFindPackageConflict (used by ResolverSkipsConflictsFastSpecs.fs) checks for "Conflict detected" combined with multiple requirements from Ninject's scenario, which produces a genuine multi-requirement conflict, so it is unaffected by this change (I verified there are no other tests asserting on the exact "Conflict detected" string for a single-requirement case).

Test Status

  • dotnet build src/Paket.Core/Paket.Core.fsproj -c Debug: succeeded (net461 + netstandard2.0), pre-existing warnings only, no new ones introduced.
  • dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~Resolver": 33 passed, 0 failed, 5 skipped (net9 target). The net461 target could not run in this sandbox because Mono is not installed (pre-existing environment limitation, unrelated to this change).
  • Integration tests were not run in this sandbox due to the same lack of Mono for net461; the affected code path only changes a string header, and I manually confirmed by code review that the one integration test referencing "Conflict detected" text targets a genuine multi-requirement conflict scenario, so it remains unaffected.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38

When only a single requirement is involved in a resolution failure,
there is no actual conflict between multiple requirements - the
requested package or version range simply wasn't found in any
configured source. Previously this case was reported with the
header 'Conflict detected', which is misleading.

This changes the single-requirement error path to report
'Package not found' instead, while genuine multi-requirement
conflicts still report 'Conflict detected'.

Closes #3446

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading error message: do not say "conflict" when package not found

1 participant