fsprojects / fsprojects/Paket

Unable to search for packages in nuget server without SearchAutocompleteService

Open
#3,964 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

Paket 5.257.0

I am unable to get packages from private Azure DevOps nuget server with "dotnet paket find-packages ". When I run this command with "--verbose" flag, I can see this error:

getSearchAPI: System.Exception: could not find an AutoComplete endpoint for https://pkgs.dev.azure.com/<snip_for_privacy_reasons>/nuget/v3/index.json
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1645.Invoke(String message)
   at Paket.NuGetV3.getNuGetV3Resource@143-1.Invoke(FSharpMap`2 _arg2) in D:\code\Paket\src\Paket.Core\Dependencies\NuGetV3.fs:line 146
   at Microsoft.FSharp.Control.AsyncBuilderImpl.args@506-1.Invoke(a a)

All of the other Nuget tools work fine with this server (built-in tools in Visual Studio and JetBrains Rider). I think that they must be using "SearchQueryService" instead of "SearchAutocompleteService". FYI, my private server doesn't list "SearchAutocompleteService" as an available resource.

It is worth mentioning that this only affects searching for packages, other Paket functionality works fine.

Repro steps

Please provide the steps required to reproduce the problem

  1. Have a nuget server that doesn't implement AutoComplete service. (I'm using Azure DevOps "Artifacts")

  2. Try to use "find-packages" command.

Expected behavior

Packages from my private nuget can be seen just like they used to in Visual Studio and Rider so Paket can be drop-in replacement for other tools.

Actual behavior

My nuget source is ignored by this command.

Known workarounds

Using web based tools to search for packages.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/Paket.Core/Dependencies/NuGetV3.fs around line 146 and trace the find-packages search-resource lookup for the private Azure DevOps NuGet source. Check how SearchAutocompleteService is selected and how SearchQueryService is exposed; done means find-packages can search sources without an autocomplete endpoint, while existing Paket functionality remains unaffected.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.