Repository navigation
[repo-assist] Improve error message when package missing from paket.lock - #4365
Merged
dsyme merged 1 commit intoAug 27, 2026
Conversation
Closes #3277 CheckIfPackageExistsInAnyGroup previously returned an empty string when a referenced package was not found in any lock file group, leaving the resulting error message with no actionable guidance. Now suggests running 'paket install' or 'paket update' to regenerate paket.lock, which is the common fix for this situation (e.g. after manually editing paket.lock). Co-authored-by: Copilot <[email protected]>
dsyme
marked this pull request as ready for review
August 26, 2026 22:15
This was referenced Oct 5, 2026
This was referenced Oct 14, 2026
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant. Please review carefully before merging.
Closes #3277
Root cause
LockFile.CheckIfPackageExistsInAnyGroupreturns an empty string when a referenced package cannot be found in any lock file group, so the resulting"Package X was referenced in ..., but it was not found in the paket.lock file in group Y."error gives the user no next step. This is exactly the confusing situation reported in #3277, where the reporter had manually editedpaket.lockand was left unsure what command to run to fix it.Fix
When the package genuinely isn't in any group, the helper now appends a short, actionable hint:
This is a minimal, surgical change — the existing "however it was found in group Y" branch is untouched.
Trade-offs
install/update) rather than trying to detect the precise required command, since that would require broader analysis of the specific inconsistency; a generic pointer is safe and almost always correct.Test Status
should give actionable error message when package is missing from lock file in any groupintests/Paket.Tests/Lockfile/QuerySpecs.fs.dotnet build src/Paket.Core/Paket.Core.fsproj -f netstandard2.0— succeeded, 0 errors.dotnet test tests/Paket.Tests/Paket.Tests.fsproj -f net9 --filter "FullyQualifiedName~QuerySpecs"— 5/5 passed (4 pre-existing + 1 new).Add this agentic workflow to your repo
To install this agentic workflow, run