Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0-rc003: Paket failed with: String cannot be of zero length. Parameter name: oldValue #2405

Closed
konste opened this issue Jun 9, 2017 · 3 comments
Assignees

Comments

@konste
Copy link
Contributor

konste commented Jun 9, 2017

At the very end of "paket install" processing (AFTER displaying Performance statistics) Paket version 5.0.0-rc003 fails with: String cannot be of zero length. Parameter name: oldValue

Call stack from the debugger:`
mscorlib.dll!string.Replace(string oldValue, string newValue) (IL=~0x000E, Native=0x00007FFC1D68EAD0+0x94)

paket.exe!Paket.LibraryModule.ofFile(Paket.FrameworkDependentFile f) (IL=~0x0078, Native=0x00007FFC1E1988E0+0x1D2)
paket.exe!Paket.InstallModelModule.addPackageLegacyLibFile(Paket.NuspecReferences references, Paket.FrameworkFolder<Paket.ReferenceOrLibraryFolder> path, Paket.FrameworkDependentFile file, Paket.InstallModel @this) (IL=~0x0038, Native=0x00007FFC1E198690+0x15B)
paket.exe![email protected](Paket.FrameworkFolder<Paket.ReferenceOrLibraryFolder> path, Paket.FrameworkDependentFile file, Paket.InstallModel @this) (IL=~0x0001, Native=0x00007FFC1E198620+0x48)
paket.exe!Microsoft.FSharp.Collections.ListModule.loop@219-29<Paket.NuGet.UnparsedPackageFile, Paket.InstallModel>(Microsoft.FSharp.Core.OptimizedClosures.FSharpFunc<Paket.InstallModel, Paket.NuGet.UnparsedPackageFile, Paket.InstallModel> f, Paket.InstallModel s, Microsoft.FSharp.Collections.FSharpList<Paket.NuGet.UnparsedPackageFile> xs) (IL=~0x0019, Native=0x00007FFC1D6C0FC0+0x8B)
paket.exe!Microsoft.FSharp.Collections.ListModule.Fold<Paket.NuGet.UnparsedPackageFile, Paket.InstallModel>(Microsoft.FSharp.Core.FSharpFunc<Paket.InstallModel, Microsoft.FSharp.Core.FSharpFunc<Paket.NuGet.UnparsedPackageFile, Paket.InstallModel>> folder, Paket.InstallModel state, Microsoft.FSharp.Collections.FSharpList<Paket.NuGet.UnparsedPackageFile> list) (IL=~0x0014, Native=0x00007FFC1D6C0AA0+0xEF)
paket.exe!Paket.InstallModelModule.addLibReferences(System.Collections.Generic.IEnumerable<Paket.NuGet.UnparsedPackageFile> libs, Paket.NuspecReferences references, Paket.InstallModel installModel) (IL=~0x00AA, Native=0x00007FFC1E176300+0x3B9)
paket.exe!Paket.InstallModelModule.createFromLibs(Paket.Domain.PackageName packageName, Paket.SemVerInfo packageVersion, Paket.Requirements.FrameworkRestriction frameworkRestrictions, System.Collections.Generic.IEnumerable<Paket.NuGet.UnparsedPackageFile> libs, Microsoft.FSharp.Collections.FSharpList<Paket.NuGet.UnparsedPackageFile> targetsFiles, System.Collections.Generic.IEnumerable<Paket.NuGet.UnparsedPackageFile> analyzerFiles, Paket.Nuspec nuspec) (IL=~0x001C, Native=0x00007FFC1E1755D0+0xA1)
paket.exe!Paket.InstallModel.CreateFromLibs(Paket.Domain.PackageName packageName, Paket.SemVerInfo packageVersion, Paket.Requirements.FrameworkRestriction frameworkRestriction, System.Collections.Generic.IEnumerable<Paket.NuGet.UnparsedPackageFile> libs, Microsoft.FSharp.Collections.FSharpList<Paket.NuGet.UnparsedPackageFile> targetsFiles, System.Collections.Generic.IEnumerable<Paket.NuGet.UnparsedPackageFile> analyzerFiles, Paket.Nuspec nuspec) (IL=~0x0001, Native=0x00007FFC1E175400+0x5F)
paket.exe![email protected](System.Tuple<Paket.PackageResolver.ResolvedPackage, Paket.NuGet.UnparsedPackageFile[], Paket.NuGet.UnparsedPackageFile[], Paket.NuGet.UnparsedPackageFile[]> _arg1) (IL=~0x0071, Native=0x00007FFC1E16AF60+0x1E7)
`

Method public static Library ofFile(FrameworkDependentFile f) does this:
return new Library(fileInfo.Name.Replace(fileInfo.Extension, ""), [email protected]@, [email protected]@);

Unfortunately fileInfo.Extension can totally be empty. In my case it is "C:\$\Development\packages\boost\lib\native\include\boost\compatibility\cpp_c_headers\cassert"

The bug looks serious as it stops Paket from further processing and should repro for any package containing files with no extensions, like very popular native package "boost".

@forki
Copy link
Member

forki commented Jun 9, 2017 via email

@konste
Copy link
Contributor Author

konste commented Jun 9, 2017

Unfortunately I still have not picked up any F# :-(

@matthid
Copy link
Member

matthid commented Jun 10, 2017

AFTER displaying Performance statistics

Paket always prints them (because we wan't to know how performance is in an error case as well).
So paket was not doing any install at all.

Fix is #2407.
@konste thanks for the detailed bug report!

matthid added a commit that referenced this issue Jun 10, 2017
Paket failed with: String cannot be of zero length (#2405)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants