dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.92k stars 389 forks source link

Spaces mess up `#i` and `#r` using #r in F# notebook #571

Open dsyme opened 4 years ago

dsyme commented 4 years ago

Adding spaces to the start of #i and #r causes whackiness

  1. Open F# notebook at https://mybinder.org/v2/gh/dotnet/interactive/master?urlpath=lab

  2. Compare this (with spaces)

    #i "nuget: https://ci.appveyor.com/nuget/diffsharp"
    #r "nuget: DiffSharp-reference,0.9.5-preview-2006210200"

v this (no spaces)

#i "nuget: https://ci.appveyor.com/nuget/diffsharp"
#r "nuget: DiffSharp-reference,0.9.5-preview-2006210200"

Expected: both resolve the package or a decent error message.

Actual: The second resolves the package but the first gives this whackiness (after executing a code cell):

Microsoft (R) Build Engine version 16.6.0+5ff7b0c9e for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
/tmp/nuget/71--ec37649b-c55e-4aa4-b7ac-7232545aa90c/Project.fsproj : error NU1101: Unable to find package DiffSharp-reference. No packages exist with this id in source(s): nuget.org
  Failed to restore /tmp/nuget/71--ec37649b-c55e-4aa4-b7ac-7232545aa90c/Project.fsproj (in 1.34 sec).

Which version of .NET Interactive are you using?

.NET Interactive

© 2020 Microsoft Corporation

Version: 1.0.131806+2c386dc8675c1e5bcfcf4467d15c8ea7e2c0e46b

Build date: 2020-06-19T07:22:34.0000000Z
dsyme commented 4 years ago

related https://github.com/dotnet/fsharp/issues/9539, https://github.com/dotnet/fsharp/issues/9540, https://github.com/dotnet/fsharp/issues/9270, https://github.com/dotnet/interactive/issues/474