Skip to content

[repo-assist] Fix tab characters in paket.dependencies causing resolution failure - #4398

Merged
dsyme merged 1 commit into
masterfrom
repo-assist/fix-issue-2172-tab-parsing-63f763ca5e26c6e4
Aug 29, 2026
Merged

dsyme merged 1 commit into
masterfrom
repo-assist/fix-issue-2172-tab-parsing-63f763ca5e26c6e4

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

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

Closes #2172

Root cause

DependenciesFileParser.fs tokenizes nuget/clitool/external_lock lines and version-requirement strings by splitting on the space character only (Split([|' '|], ...)). If a line contains a tab (e.g. between the version and prerelease, as reported in #2172), the tab stays glued to the adjacent token, producing an unparseable version string and a resolver failure ("Could not resolve package ...").

Fix

Split on both space and tab (Split([|' '; '\t'|], ...)) in the four affected call sites: parseVersionRequirement, the Package active pattern, the CliTool active pattern, and the ExternalLock active pattern. This makes tab whitespace behave the same as a space, which is how most editors' indentation/auto-complete can accidentally insert it.

Trade-offs

  • Purely additive to the accepted whitespace set; no existing space-delimited parsing behavior changes.
  • Does not attempt broader whitespace normalization (e.g. multiple/mixed runs), just accepts tabs as a token separator like spaces.

Test Status

  • Added a regression test should read config with tab between version and prerelease in tests/Paket.Tests/DependenciesFile/ParserSpecs.fs reproducing the exact issue Tab characters in paket.dependencies cause resolution failure  #2172 scenario (tab between version and prerelease).
  • Ran dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~ParserSpecs": 157/157 passed on net9.0 (including the new test). The net461 host could not run in this sandbox (mono not installed) — pre-existing infrastructure limitation unrelated to this change.

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

Closes #2172

The nuget/clitool/version-requirement/external_lock line parsers in
DependenciesFileParser.fs split tokens only on the space character.
A stray tab between the version and options (e.g. 'prerelease')
therefore stayed attached to the previous token, producing an
unparseable version string and a resolver failure.

Split on both space and tab so accidental tab whitespace no longer
breaks parsing, matching how most text editors insert either
character interchangeably.

Co-authored-by: Copilot <[email protected]>
@dsyme
dsyme marked this pull request as ready for review August 29, 2026 17:13
@dsyme
dsyme merged commit 6e59fc9 into master Aug 29, 2026
10 checks passed
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.

Tab characters in paket.dependencies cause resolution failure

1 participant