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

generate_load_scripts prevents restore after update. #2382

Closed
matthid opened this issue Aug 21, 2019 · 2 comments
Closed

generate_load_scripts prevents restore after update. #2382

matthid opened this issue Aug 21, 2019 · 2 comments

Comments

@matthid
Copy link
Member

matthid commented Aug 21, 2019

Description

While trying to reproduce #2381 I noticed the following:

#r #"paket:
framework: netstandard2.0
//generate_load_scripts: true

nuget FSharp.Core
nuget Fake.Core.Target
nuget Fake.DotNet.Cli
nuget Fake.IO.FileSystem
nuget Microsoft.ServiceFabric.Client.Http 3.0.0-preview16 

//also produces error at lower version
nuget FSharp.Data
nuget Fake.IO.Zip
nuget TaskBuilder.fs 2.1.0 //"

open System.Collections.Generic
open System
open System.Threading
open System.Management.Automation



let connect creds =
    let sfClient = ServiceFabricClientBuilder()
                    .UseEndpoints(Uri(@"https://"+cluster+":19080"))
                    .UseX509Security(Func<CancellationToken,Task<SecuritySettings>>(getcreds))
                    .UseEndpoints(Uri(creds.Endpoint))
                    .UseX509Security(Func<CancellationToken,Task<SecuritySettings>>(getCreds creds))
                    .BuildAsync().GetAwaiter().GetResult();
    sfClient

> fake -vv run test.fsx
There was a problem while setting up the environment:
-> Folder C:\Users\matth\.nuget\packages\microsoft.servicefabric.client.http\3.0.0-preview16 doesn't exist. Did you restore group Main? Try to delete paket-files\paket.restore.cached and trying again.
   StackTrace:
        at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1637.Invoke(String message) in E:\A\_work\130\s\src\fsharp\FSharp.Core\printf.fs:line 1637
        at <StartupCode$Paket-Core>[email protected](PackageInfo package)
        at Microsoft.FSharp.Primitives.Basics.List.iter[T](FSharpFunc`2 f, FSharpList`1 x) in E:\A\_work\130\s\src\fsharp\FSharp.Core\local.fs:line 91
        at Paket.DependencyCache.StartSetupGroup(GroupName groupName)
        at Paket.DependencyCache.OrderedGroups(GroupName groupName)
        at [email protected](GroupName g)
        at Microsoft.FSharp.Collections.Internal.IEnumerator.map@75.DoMoveNext(b& curr) in E:\A\_work\130\s\src\fsharp\FSharp.Core\seq.fs:line 78
        at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seq.fs:line 64
        at Microsoft.FSharp.Collections.Internal.IEnumerator.map@75.DoMoveNext(b& curr) in E:\A\_work\130\s\src\fsharp\FSharp.Core\seq.fs:line 77
        at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seq.fs:line 64
        at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
        at Paket.LoadingScripts.ScriptGeneration.generateScriptContent(PaketContext ctx)
        at Paket.LoadingScripts.ScriptGeneration.scriptData@338-1.GenerateNext(IEnumerable`1& next)
        at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
        at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
        at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
        at Paket.LoadingScripts.ScriptGeneration.scriptData@336.GenerateNext(IEnumerable`1& next)
        at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 371
        at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.System-Collections-IEnumerator-MoveNext() in E:\A\_work\130\s\src\fsharp\FSharp.Core\seqcore.fs:line 403
        at Paket.LoadingScripts.ScriptGeneration.constructScriptsFromData(DependencyCache depCache, FSharpList`1 groups, FSharpList`1 providedFrameworks, FSharpList`1 providedScriptTypes)
        at Paket.UpdateProcess.SmartInstall(DependenciesFile dependenciesFile, UpdateMode updateMode, UpdaterOptions options)
        at Paket.UpdateProcess.UpdateGroup(String dependenciesFileName, GroupName groupName, UpdaterOptions options)
        at <StartupCode$Paket-Core>[email protected](Unit unitVar0)
        at Paket.Utils.RunInLockedAccessMode[a](String lockedFolder, FSharpFunc`2 action)
        at Fake.Runtime.FakeRuntime.restoreOrUpdate@242(FakeConfig config, String cacheDir, Dependencies paketApi, FSharpOption`1 group, VerboseLevel logLevel, String script, String groupStr, FileInfo lockFilePath, Unit unitVar0) in d:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 254
        at Fake.Runtime.FakeRuntime.paketCachingProvider(FakeConfig config, String cacheDir, Dependencies paketApi, Lazy`1 paketDependenciesFile, FSharpOption`1 group) in d:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 344
        at Fake.Runtime.FakeRuntime.runScript(PrepareInfo preparedScript) in d:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 596
        at Program.runOrBuild(RunArguments args) in d:\a\1\s\src\app\Fake.netcore\Program.fs:line 156
Hint: If you just upgraded the fake-runner you can try to remove the .fake directory and try again.

Expected behavior

"Works" (compiler error)

Actual behavior

Doesn't even start downloading nuget packages.

Known workarounds

remove generate_load_scripts: true temporarily

Related information

I guess this only reproduces when the nuget cache is missing the above packages.

@matthid
Copy link
Member Author

matthid commented Aug 21, 2019

This looks like a paket bug but I cannot reproduce this with standalone paket update.

@matthid
Copy link
Member Author

matthid commented Aug 21, 2019

This is actually fsprojects/Paket#2785 again

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

1 participant