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

placeholder-for-3860-better-cache #3894

Closed
wants to merge 34 commits into from
Closed

placeholder-for-3860-better-cache #3894

wants to merge 34 commits into from

Conversation

elrikdante
Copy link

Note: Documentation fixes for https://docs.haskellstack.org/en/stable/ should target the "stable" branch, not master.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

snoyberg and others added 30 commits February 20, 2018 08:32
Next change will introduce another field, so a data type is always
better than a 4-tuple.
3860-better-cache FAILED [1]

Failures:

  test/integration/IntegrationSpec.hs:77:
  1) 3860-better-cache
       uncaught exception: TestFailure (Exited with ExitFailure 1

       stdout:

       stderr:
       Running: /Users/elrikdante/apps/stack-3860-better-cache/.stack-work/install/x86_64-osx/lts-10.5/8.2.2/bin/stack build stm --stack-yaml custom1/stack.yaml
       Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
       Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
       Downloading root
       Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
       Downloading timestamp
       Downloading snapshot
       Downloading mirrors
       Cannot update index (no local copy)
       Downloading index
       Updated package index downloaded
       Update complete
       Populating index cache ...
       Populated index cache.
       Stack looks for packages in the directories configured in the 'packages' and 'extra-deps' fields defined in your stack.yaml
       The current entry points to /Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/custom1/ but no .cabal or package.yaml file could be found there.
       Main.hs: Exited with exit code: ExitFailure 1
       CallStack (from HasCallStack):
         error, called at /Users/elrikdante/apps/stack-3860-better-cache/test/integration/lib/StackTest.hs:38:34 in main:StackTest
       )

Randomized with seed 1630687830

Finished in 29.1537 seconds
1 example, 1 failure
appveyor.yml     mkdocs.yml         stack.cabal
 elrikdante@elrikgroup-labbook  ~/apps/stack-3860-better-cache  ➦ e8c53a8 ●  stack runghc test/integration/IntegrationSpec.hs

3860-better-cache FAILED [1]

Failures:

  test/integration/IntegrationSpec.hs:77:
  1) 3860-better-cache
       uncaught exception: TestFailure (Exited with ExitFailure 1

       stdout:
       addDep: Package info for skip-component: Just (PIBoth (PSFiles (LocalPackage {lpPackage = Package {packageName = skip-component, packageVersion = 0.1.0.0, packageLicense = UnspecifiedLicense, packageFiles = <GetPackageFiles>, packageDeps = fromList [(base,IntersectVersionRanges (UnionVersionRanges (ThisVersion (mkVersion [4,7])) (LaterVersion (mkVersion [4,7]))) (EarlierVersion (mkVersion [5])))], packageTools = fromList [], packageAllDeps = fromList [base], packageGhcOptions = [], packageFlags = fromList [], packageDefaultFlags = fromList [], packageLibraries = HasLibraries (fromList []), packageTests = fromList [("failing-test",TestSuiteExeV10 (mkVersion [1,0]) "Spec.hs")], packageBenchmarks = fromList ["failing-bench"], packageExes = fromList ["exe","failing-exe"], packageOpts = <GetPackageOpts>, packageHasExposedModules = True, packageBuildType = Just Simple, packageSetupDeps = Nothing}, lpComponents = fromList [CExe "exe",CExe "failing-exe"], lpUnbuildable = fromList [], lpWanted = True, lpTestDeps = fromList [(base,IntersectVersionRanges (UnionVersionRanges (ThisVersion (mkVersion [4,7])) (LaterVersion (mkVersion [4,7]))) (EarlierVersion (mkVersion [5])))], lpBenchDeps = fromList [(base,IntersectVersionRanges (UnionVersionRanges (ThisVersion (mkVersion [4,7])) (LaterVersion (mkVersion [4,7]))) (EarlierVersion (mkVersion [5])))], lpTestBench = Nothing, lpDir = "/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/", lpCabalFile = "/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal", lpForceDirty = False, lpDirtyFiles = Nothing, lpNewBuildCaches = fromList [(CLib,fromList [("/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal",FileCacheInfo {fciModTime = ModTime (58171,79893 % 1), fciSize = 1251, fciHash = "b\179!3r\200\166\131\244U\176^\130e,\165\169\202\ETB\SO\155\178$[\252h<\SUB\189\235#\223"}),("/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/src/Lib.hs",FileCacheInfo {fciModTime = ModTime (58171,79893 % 1), fciSize = 88, fciHash = "\DC1\214\210U\203\&9\DEL\164Y\128\235Qn\166\133\DC4ee\217\222!\b\196\238\163V\234A\219\131d\190"})]),(CExe "exe",fromList [("/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/app/Main.hs",FileCacheInfo {fciModTime = ModTime (58171,79893 % 1), fciSize = 50, fciHash = "\200ACd\174\250O@\147\195+D\215\DC3*=d\195\137v\137\255\151M\201u\CAN\217\141w\238\253"}),("/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal",FileCacheInfo {fciModTime = ModTime (58171,79893 % 1), fciSize = 1251, fciHash = "b\179!3r\200\166\131\244U\176^\130e,\165\169\202\ETB\SO\155\178$[\252h<\SUB\189\235#\223"})]),(CExe "failing-exe",fromList [("/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/app/MainFail.hs",FileCacheInfo {fciModTime = ModTime (58171,79893 % 1), fciSize = 50, fciHash = "\200ACd\174\250O@\147\195+D\215\DC3*=d\195\137v\137\255\151M\201u\CAN\217\141w\238\253"}),("/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal",FileCacheInfo {fciModTime = ModTime (58171,79893 % 1), fciSize = 1251, fciHash = "b\179!3r\200\166\131\244U\176^\130e,\165\169\202\ETB\SO\155\178$[\252h<\SUB\189\235#\223"})])], lpComponentFiles = fromList [(CLib,fromList ["/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal","/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/src/Lib.hs"]),(CExe "exe",fromList ["/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/app/Main.hs","/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal"]),(CExe "failing-exe",fromList ["/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/app/MainFail.hs","/Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/files/skip-component.cabal"])], lpLocation = PLFilePath "."}) Local) (Library "skip-component-0.1.0.0" "skip-component-0.1.0.0-5jx85UG48XpHP4S67jn4OG" (Just (UnknownLicense "UnspecifiedLicense"))))
       installPackage: No test / bench component for skip-component so doing an all-in-one build.
       addDep: Package info for base: Just (PIOnlyInstalled Snap (Library "base-4.9.1.0" "base-4.9.1.0" (Just BSD3)))

       stderr:
       Running: /Users/elrikdante/apps/stack-3860-better-cache/.stack-work/install/x86_64-osx/lts-10.5/8.2.2/bin/stack build --stack-yaml ./stack.yaml
       Downloading lts-9.14 build plan ...
       Downloaded lts-9.14 build plan.
       Preparing to install GHC to an isolated location.
       This will not interfere with any system-level installation.
       Preparing to download ghc-8.0.2 ...
       ghc-8.0.2: download has begun
       ghc-8.0.2:    5.89 MiB / 178.17 MiB (  3.31%) downloaded...
       ghc-8.0.2:   13.20 MiB / 178.17 MiB (  7.41%) downloaded...
       ghc-8.0.2:   20.42 MiB / 178.17 MiB ( 11.46%) downloaded...
       ghc-8.0.2:   26.91 MiB / 178.17 MiB ( 15.10%) downloaded...
       ghc-8.0.2:   32.75 MiB / 178.17 MiB ( 18.38%) downloaded...
       ghc-8.0.2:   38.86 MiB / 178.17 MiB ( 21.81%) downloaded...
       ghc-8.0.2:   45.65 MiB / 178.17 MiB ( 25.62%) downloaded...
       ghc-8.0.2:   52.53 MiB / 178.17 MiB ( 29.48%) downloaded...
       ghc-8.0.2:   59.90 MiB / 178.17 MiB ( 33.62%) downloaded...
       ghc-8.0.2:   67.45 MiB / 178.17 MiB ( 37.86%) downloaded...
       ghc-8.0.2:   74.41 MiB / 178.17 MiB ( 41.76%) downloaded...
       ghc-8.0.2:   81.50 MiB / 178.17 MiB ( 45.74%) downloaded...
       ghc-8.0.2:   88.62 MiB / 178.17 MiB ( 49.74%) downloaded...
       ghc-8.0.2:   96.01 MiB / 178.17 MiB ( 53.88%) downloaded...
       ghc-8.0.2:  103.34 MiB / 178.17 MiB ( 58.00%) downloaded...
       ghc-8.0.2:  110.81 MiB / 178.17 MiB ( 62.20%) downloaded...
       ghc-8.0.2:  117.69 MiB / 178.17 MiB ( 66.05%) downloaded...
       ghc-8.0.2:  124.88 MiB / 178.17 MiB ( 70.09%) downloaded...
       ghc-8.0.2:  132.23 MiB / 178.17 MiB ( 74.22%) downloaded...
       ghc-8.0.2:  139.60 MiB / 178.17 MiB ( 78.35%) downloaded...
       ghc-8.0.2:  146.84 MiB / 178.17 MiB ( 82.42%) downloaded...
       ghc-8.0.2:  153.78 MiB / 178.17 MiB ( 86.31%) downloaded...
       ghc-8.0.2:  161.03 MiB / 178.17 MiB ( 90.38%) downloaded...
       ghc-8.0.2:  168.37 MiB / 178.17 MiB ( 94.50%) downloaded...
       ghc-8.0.2:  175.44 MiB / 178.17 MiB ( 98.47%) downloaded...
       ghc-8.0.2:  178.17 MiB / 178.17 MiB (100.00%) downloaded...
       Downloaded ghc-8.0.2.
       Unpacking GHC into /private/var/folders/2l/l887cf_x6mx2zb1nzs87ycnw0000gn/T/stackhome67767/.stack/programs/x86_64-osx/ghc-8.0.2.temp/ ...
       Configuring GHC ...
       Installing GHC ...
       Installed GHC.
       Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
       Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
       Downloading root
       Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
       Downloading timestamp
       Downloading snapshot
       Downloading mirrors
       Cannot update index (no local copy)
       Downloading index
       Updated package index downloaded
       Update complete
       Populating index cache ...
       Populated index cache.
       [1 of 2] Compiling Main             ( /private/var/folders/2l/l887cf_x6mx2zb1nzs87ycnw0000gn/T/stackhome67767/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /private/var/folders/2l/l887cf_x6mx2zb1nzs87ycnw0000gn/T/stackhome67767/.stack/setup-exe-src/setup-mPHDZzAJ.o )
       [2 of 2] Compiling StackSetupShim   ( /private/var/folders/2l/l887cf_x6mx2zb1nzs87ycnw0000gn/T/stackhome67767/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/2l/l887cf_x6mx2zb1nzs87ycnw0000gn/T/stackhome67767/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
       Linking /private/var/folders/2l/l887cf_x6mx2zb1nzs87ycnw0000gn/T/stackhome67767/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 ...
       Running: /Users/elrikdante/apps/stack-3860-better-cache/.stack-work/install/x86_64-osx/lts-10.5/8.2.2/bin/stack build --stack-yaml ./stack.yaml
       Main.hs: Didn't use precompiled!
       CallStack (from HasCallStack):
         error, called at /Users/elrikdante/apps/stack-3860-better-cache/test/integration/tests/3860-better-cache/Main.hs:9:48 in main:Main
       )

Randomized with seed 1806555365

Finished in 118.8196 seconds
1 example, 1 failure
 ✘ elrikdante@elrikgroup-labbook  ~/apps/stack-3860-better-cache  ➦ e8c53a8 ● 
next step is to derive the set of local packages that

can be cached in the immutable dir
@snoyberg
Copy link
Contributor

@elrikdante Can you give an update on where you think this PR is at? I'm not sure the changes I started with are the right direction for fixing this anymore, instead I'm focused on #3922. I haven't had time to tackle that one yet though, I'm hoping someone else is interested in learning more about the codebase.

@snoyberg
Copy link
Contributor

Let's close for now, since we'll likely end up needing a different approach.

@snoyberg snoyberg closed this Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants