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

Fake 5.6 cache failure #2083

Closed
SteveGilham opened this issue Sep 9, 2018 · 11 comments
Closed

Fake 5.6 cache failure #2083

SteveGilham opened this issue Sep 9, 2018 · 11 comments

Comments

@SteveGilham
Copy link
Contributor

Description

On second and subsequent builds after clearing the .fake folders from the project

Retrieving assembly list from cache failed, please report a bug: System.Exception: Cache is invalid as 'Microsoft.Win32.Primitives, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' doesn't exist
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1645.Invoke(String message)
   at Fake.Runtime.FakeRuntime.readFromCache@393-1.Invoke(String line) in D:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 401
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@74.DoMoveNext(b& curr)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at Fake.Runtime.FakeRuntime.getKnownAssemblies@420(FakeConfig config, String cacheDir, Lazy`1 paketDependenciesFile, VerboseLevel logLevel, GroupName groupName, FrameworkIdentifier framework, FileInfo lockFilePath, String assemblyCacheHashFile, String assemblyCacheFile, Lazy`1 lockFile, Lazy`1 cache, Lazy`1 writeIntellisenseTask, Unit unitVar0) in D:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 427

Repro steps

Please provide the steps required to reproduce the problem

  1. Update build script to refer to Fake 5.6 -- simple repro sample here

setup-test.fsx.txt

  1. Run it twice

Expected behavior

It just works

Actual behavior

Cache failure message as above, then it just works

Known workarounds

Delete the .fake folder(s) and try again

Related information

  • Operating system -- Win X Home
  • Branch -- Nuget package 5.6.0
  • .NET Runtime, CoreCLR or Mono Version -- .net core Version: 2.1.3-servicing-26724-03
  • Indications of severity -- severe enough that you tell me to report it
  • Version of FAKE (4.X, 5.X) -- 5.6.0
  • (if performance issue) Performance information, links to performance testing scripts -- N/A
@matthid
Copy link
Member

matthid commented Sep 9, 2018

Thanks a lot for reporting I think I found the issue

@matthid matthid closed this as completed in 38a0c69 Sep 9, 2018
@matthid
Copy link
Member

matthid commented Sep 9, 2018

Also I unlisted the 5.6 runner packages (chocolatey, dotnet-fake and fake-cli)

@matthid
Copy link
Member

matthid commented Sep 9, 2018

5.6.1 is released and should work

@BlythMeister
Copy link
Contributor

@matthid i'm using 5.6.1 and have the same error on a fresh machine.

Retrieving assembly list from cache failed, please report a bug: System.Exception: Cache is invalid as 'Microsoft.Win32.Primitives, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' doesn't exist
   at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1645.Invoke(String message)
   at Fake.Runtime.FakeRuntime.readFromCache@393-1.Invoke(String line) in D:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 401
   at Microsoft.FSharp.Collections.Internal.IEnumerator.map@74.DoMoveNext(b& curr)
   at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
   at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
   at Fake.Runtime.FakeRuntime.getKnownAssemblies@420(FakeConfig config, String cacheDir, Lazy`1 paketDependenciesFile, VerboseLevel logLevel, GroupName groupName, FrameworkIdentifier framework, FileInfo lockFilePath, String assemblyCacheHashFile, String assemblyCacheFile, Lazy`1 lockFile, Lazy`1 cache, Lazy`1 writeIntellisenseTask, Unit unitVar0) in D:\a\1\s\src\app\Fake.Runtime\FakeRuntime.fs:line 427

@matthid
Copy link
Member

matthid commented Sep 21, 2018

@BlythMeister Please give more context and steps to reproduce ;)

@BlythMeister
Copy link
Contributor

BlythMeister commented Sep 21, 2018

i deleted the .nuget folder on my machine under my user profile (for another reason)
next time i ran fake, i got this error.
ran it again...all ok...

@matthid
Copy link
Member

matthid commented Sep 21, 2018

Yes then the cache was invalid and the detection was ok ;)

@BlythMeister
Copy link
Contributor

hmmm...big red stacktrace may not be required for an "expected exception" ;)

@matthid
Copy link
Member

matthid commented Sep 21, 2018

I feel like that is acceptable for people messing around with the cache folder by hand ;)

@BlythMeister
Copy link
Contributor

this also happened on a brand new machine, fresh checkout of repo and run...because the cache doesn't exist before the 1st load :D

@matthid
Copy link
Member

matthid commented Sep 21, 2018

but then you commited the .fake directory which you shouldn't?

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