fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
2.02k stars 525 forks source link

paket find-packages with empty arg is broken when using the bootstrapper #2545

Closed agross closed 7 years ago

agross commented 7 years ago

Description

paket find-packages '' is used to search for top packages to provide completion. This has been working with 5.5 but seems broken now.

Repro steps

Please provide the steps required to reproduce the problem

  1. paket find-packages ''
  2. paket enters interactive mode when it should find top packages

Expected behavior

Top packages should be listed

Actual behavior

Interactive mode is entered

agross commented 7 years ago

Could be a breaking change in NuGet, seems like search doesn't work at all.

$ paket find-packages "FA"
Paket version 5.79.3
Ignoring error when requesting 'https://www.nuget.org/api/v2': Request to 'https://api.nuget.org/v3-flatcontainer/?q=FA&take=10000' failed with: 'BadRequest'
Performance:
 - Average Request Time: 778 milliseconds
 - Number of Requests: 3
 - Runtime: 3 seconds
agross commented 7 years ago

5.5.3 is the last version that works.

agross commented 7 years ago

paket find-packages "" doesn't work yet

matthid commented 7 years ago

For me it is working:

{ simplenugetserverpaketrepro } master » .paket/paket.exe find-packages ""                                                                                                                            /c/proj/simplenugetserverpaketrepro
Paket version 5.80.0
Ignoring error when requesting 'http://localhost:5000': Could not retrieve data from 'http://localhost:5000/Packages()?$filter=IsLatestVersion and IsAbsoluteLatestVersion and substringof('',tolower(Id))'
Newtonsoft.Json
NUnit
EntityFramework
jQuery
bootstrap
AutoMapper
NUnit.Runners
Microsoft.AspNet.Mvc
log4net
NuGet.Core
Npgsql
HtmlAgilityPack
SlowCheetah.Xdt
Microsoft.Owin.Host.SystemWeb
NLog
Microsoft.AspNet.SignalR
Microsoft.AspNet.WebApi
jQuery.UI.Combined
AjaxControlToolkit
angularjs
Performance:
 - Average Request Time: 429 milliseconds
 - Number of Requests: 3
 - Runtime: 2 seconds
agross commented 7 years ago

Hm, for me it's not:

cmd.exe:

$ .paket/paket.exe find-packages ""
Paket version 5.80.0
 - Please enter search text (:q for exit):

zsh/bash:

$ .paket/paket.exe find-packages ""
Paket version 5.80.0
 - Please enter search text (:q for exit):
:q

$ .paket/paket.exe find-packages ''
Paket version 5.80.0
 - Please enter search text (:q for exit):
agross commented 7 years ago

Do you use magic mode? It seems that the arg is lost in translation:

2017-07-20_23-00-20

matthid commented 7 years ago

no I did not in my tests, so yes that could be the reason...

matthid commented 7 years ago

Thanks for posting so quickly, was trying every shell I could find, and all were working ;)

agross commented 7 years ago

Tested again with the latest bootstrapper. No dice.

matthid commented 7 years ago

So technically it's a different issue which was there ever since magic mode was introduced I guess?

agross commented 7 years ago

Probably, yes. During completion development I only tested against locally compiled paket.exes since I required args that were not released yet.

matthid commented 7 years ago

Can we open a new one? I'd like to keep that one as a reminder to add a regression test for the initial issue.

agross commented 7 years ago

Or we can fix the issue :)