Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

First attempt at multi component support#361

Closed
cocreature wants to merge 5 commits intomasterfrom
multi-component
Closed

First attempt at multi component support#361
cocreature wants to merge 5 commits intomasterfrom
multi-component

Conversation

@cocreature
Copy link
Collaborator

This implements multi-component using separate HscEnv’s which is not
great but semes to work somehow.

The biggest issue atm is files it autogen directories which need to
be explicitly specified in hie.yaml which is rather annoying.

We need to find some solution for that and stop spinning up one HscEnv
per component before merging this.

@ocharles
Copy link
Contributor

We need to find some solution for that and stop spinning up one HscEnv
per component before merging this.

Is the problem memory usage or performance?

@pepeiborra
Copy link
Collaborator

Multiple HscEnvs in the same process are not well supported by GHC <8.10

@cocreature
Copy link
Collaborator Author

It uses more memory, is slower (if nothing else than just because the GC will be slower with more memory being used) and a bit fragile as @pepeiborra pointed out although I think the runtime linker is mostly an issue with TH and I would expect that merging it into one HscEnv doesn’t help with any way since at that point it’s definitely not isolated between components. And if components are compatible the fact that it’s global state shouldn’t be an issue I believe.

This implements multi-component using separate HscEnv’s which is not
great but semes to work somehow.

The biggest issue atm is files it `autogen` directories which need to
be explicitly specified in hie.yaml which is rather annoying.

We need to find some solution for that and stop spinning up one HscEnv
per component before merging this.
@domenkozar
Copy link
Contributor

The biggest issue atm is files it autogen directories which need to
be explicitly specified in hie.yaml which is rather annoying.

Sounds like that's better than no multi-cradle support :)

@cocreature
Copy link
Collaborator Author

Not sure when I’ll have time to continue working on this so if someone wants to pick it up, just leave a comment here.

Currently, it’s a bit in an awkward state where it tries to use a single HscEnv but doesn’t handle -inplace package flags properly.

@domenkozar
Copy link
Contributor

@cocreature would it makes sense to merge multi-component support in current state? I don't mind using extra memory and adding the autogen directories, opposed to current alternative which is that it doesn't work at all :)

@cocreature
Copy link
Collaborator Author

In the current state this is probably going to cause more problems than it solves. I’d rather implement this properly than merge some half-baked thing.

@alanz
Copy link
Collaborator

alanz commented Feb 5, 2020

Do we have anyone with knowledge and interest to be able to do this task justice?

@mpickering
Copy link
Contributor

I am going to pick this patch up.

@mpickering
Copy link
Contributor

mpickering commented Feb 18, 2020

One thing to note is that cabal uses inplace dependencies for components but also other packages specified in the cabal.project file. Loading other packages into ghci doesn't seem to work in cabal at least as the package flags are set incorrectly.

EDIT: It does appear to work after trying again, it was a .ghci file which was messing things up I think.

@mpickering
Copy link
Contributor

@cocreature How well do you think this will work?

  1. Open file "A.hs", from component C which depends on component D. When it is first loaded we don't know anything about component D so at first we just use D-inplace as built by cabal.
  2. Later on, we open a file from component D so we learn all about it. At this point, unload D-inplace and use the local version instead as managed by ghcide. So if you modify a file in D then A.hs will also get recompiled to reflect the changed.

This scheme avoids the need to know about all the components up front.

@cocreature
Copy link
Collaborator Author

@mpickering that sounds very sensible and like it should give us a nice UX. Not quite sure how easy the unloading is. You probably have to recompile all the modules from the component.

@mpickering
Copy link
Contributor

It might be that we have to create a new HscEnv as we discover new components.

@mpickering
Copy link
Contributor

mpickering commented Mar 8, 2020

If there is anyone brave, you can try my branch - https://github.com/mpickering/ghcide/tree/wip/multi

Jumping between components will only work once you have opened one file from each component in your editor.

@pwm
Copy link

pwm commented Mar 9, 2020

@mpickering Many thanks for working on this! I've just tried out your branch on our monorepo and, after creating a suitable multi-cradle hie.yaml, I'm happy to report that it works!

@ocharles
Copy link
Contributor

ocharles commented Mar 9, 2020

It seems to work, but I get interesting output from running it in my terminal. For example, I see:

Shelling out to cabal "/home/ollie/work/circuithub/quoting/lib/CircuitHub/Quoting/BoardPricing/Composite/Offer.hs"
Shelling out to cabal "/home/ollie/work/circuithub/quoting/tests/Data/MonotoneMap/Tests.hs"
Shelling out to cabal "/home/ollie/work/circuithub/quoting/exe-compare/NoMatch.hs"
Shelling out to cabal "/home/ollie/work/circuithub/quoting/exe-compare/Main.hs"
Shelling out to cabal "/home/ollie/work/circuithub/quoting/exe-picofactory-cost-model/CircuitHub/Quoting/PicofactoryCostModel/Features.hs"
Shelling out to cabal "/home/ollie/work/circuithub/quoting/exe-picofactory-cost-model/Main.hs"

Note that for exe-compare, it called Cabal twice - but in my hie.yaml both files match the same cradle:

    - path: "quoting/tests"
      config: { cradle: { cabal: { component: "quoting:test:tests" } } }
    - path: "quoting/exe-compare"
      config: { cradle: { cabal: { component: "exe:quoting-compare" } } }
    - path: "quoting/exe-picofactory-cost-model"
      config: { cradle: { cabal: { component: "exe:picofactory-cost-model" } } }

Is this to be expected?

@ocharles
Copy link
Contributor

ocharles commented Mar 9, 2020

It doesn't even need a Cabal file to have multiple components. Here's the output of ghcide prelude:

https://gist.github.com/ocharles/db84fe5d56e8e569a9cfbfad6bb67fec

Notice that it called Cabal twice

@mpickering
Copy link
Contributor

@ocharles circuithub-prelude does not list Data.Proxy.Extra as one of the targets so it is probably missing from the cabal file there?

@ocharles
Copy link
Contributor

ocharles commented Mar 10, 2020

Haha, wow. You're entirely correct - this was the problem.

So not only is ghcide an editor, it's also a tool for dead code detection! Amazing.

@ocharles
Copy link
Contributor

Ok, the next problem I'm having seems to be some instances have vanished:

File:     /home/ollie/work/circuithub/api/src/Handler/Pallets.hs
Hidden:   no
Range:    1143:62-1143:67
Source:   typecheck
Severity: DsError
Message: 
  /home/ollie/work/circuithub/api/src/Handler/Pallets.hs:1143:63: error:
  • No instance for (Show
  Database.PostgreSQL.Simple.Errors.ConstraintViolation)
  arising from a use of ‘tshow’
  • In the second argument of ‘(.)’, namely ‘tshow’
  In the second argument of ‘constraintViolationToFailure’, namely
  ‘(FailurePublic . tshow)’
  In the expression:
  constraintViolationToFailure neverAborts (FailurePublic . tshow)

But this is rather strange, given: https://hackage.haskell.org/package/postgresql-simple-0.6.2/docs/Database-PostgreSQL-Simple-Errors.html#t:ConstraintViolation - there is Show instance right there!

Here's how the component was configured:

ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build","-odir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build","-hidir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build","-stubdir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build","-i","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build","-i/home/ollie/work/circuithub/api/src","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build/autogen","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build/global-autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build/autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build/global-autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build","-optP-include","-optP/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/build/autogen/cabal_macros.h","-optl-fuse-ld=gold","-optl-fuse-ld=gold","-this-unit-id","circuithub-api-0.0.4-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/ollie/.cabal/store/ghc-8.8.1/package.db","-package-db","/home/ollie/work/circuithub/dist-newstyle/packagedb/ghc-8.8.1","-package-db","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/circuithub-api-0.0.4/noopt/package.conf.inplace","-package-id","Diff-0.3.4-KnNniBc90vYAlOfdgizeI0","-package-id","SHA-1.6.4.4-B8HlB7w6lRxAcy0FxPDfJs","-package-id","access-0.1.3-PpNoddgToJ3aWDRqNwgGV","-package-id","aeson-1.4.5.0-il1ivCETMJ3UZ0bilBI8S","-package-id","amqp-0.18.3-LjC4Iz8NK85EXRTcKPY6ZY","-package-id","attoparsec-0.13.2.2-E4Lzjr9KlwUCxVwtPPhSCO","-package-id","aws-0.21.1-J8Ba9VwJltAPXXnSwl4gu","-package-id","base-4.13.0.0","-package-id","bcrypt-0.0.11-6wVK5cHEcuQ53MJ0L1ccfY","-package-id","binary-0.8.7.0","-package-id","blaze-html-0.9.1.1-33WcIyqYVgD5VaoqVVlvK9","-package-id","bytestring-0.10.9.0","-package-id","case-insensitive-1.2.0.11-AvBKPR9awRLCB4aBCWnA72","-package-id","cassava-0.5.2.0-JiI4NX9Ur6v4sXmZnEnQqw","-package-id","cereal-0.5.8.1-8L4yHTimfdG69i93k03vyK","-package-id","ch-aws-0.1.0.0-inplace","-package-id","ch-eda-0.0.0-inplace","-package-id","ch-linear-0.1.0.0-inplace","-package-id","ch-model-0.1.0.0-inplace","-package-id","ch-persistence-1.0-inplace","-package-id","ch-segment-0.1.0.0-inplace","-package-id","ch-servant-auth-1.0-inplace","-package-id","ch-stripe-0.1.0.0-inplace","-package-id","ch-wai-extra-0.1.0.0-inplace","-package-id","chunked-data-0.3.1-7xbENvaSLpcJtRdpzEfOSt","-package-id","circuithub-entities-0.0.182-inplace","-package-id","circuithub-prelude-0.0.28-inplace","-package-id","clock-0.8-A49D1ulhgED3S3X2LkGyEI","-package-id","conduit-1.3.1.1-H4gZnLg2V4lLb3j0JLikGB","-package-id","conduit-extra-1.3.4-CIstVGmc8sf8shVjwtohbU","-package-id","containers-0.6.2.1","-package-id","cookie-0.4.4-AZE0DQ9EHSNKzJd7D2C2wN","-package-id","data-default-0.7.1.1-KEeCD1Cs1a13oywMEv8f4D","-package-id","data-list-sequences-0.1-IrDUYC819HB6IaQFTUPANU","-package-id","diagrams-core-1.4.2-1sfZ4G3iZh96wYPXLjbP26","-package-id","diagrams-lib-1.4.3-Ba4LatSbGimGJIHXkGxTIZ","-package-id","dlist-0.8.0.7-1z22Z0xT8xxKPJiNF8Wtg8","-package-id","edit-distance-0.2.2.1-8rWHxHktvu79n8WNwwVSg","-package-id","either-5.0.1.1-B67ynCgoC2JInAIlTnb7cV","-package-id","email-validate-2.3.2.12-6Dxzhmdi1vnDswq0rlX1Vc","-package-id","errors-2.3.0-ISkAEQFRQwS8PEMfNSEmqx","-package-id","esqueleto-3.2.2-BgeaxLsQrtq14cOGiqVxn8","-package-id","ex-pool-prometheus-1.0.0-inplace","-package-id","exceptions-0.10.3-JszyIMpFx84JlNkpTlajDE","-package-id","exhaustive-1.1.8-7BJaQ69RneaG9lGHPSZY8S","-package-id","fast-logger-2.4.16-20sQicodLr86z3d52yDWWU","-package-id","filepath-1.4.2.1","-package-id","filepicker-policy-0.2.6-JGmUUsSgl8TDL7I1yoDJ0O","-package-id","foldl-1.4.5-EMmKubPo0Kl3eRUrhL9BPt","-package-id","free-5.1.2-KB9TyuYmCW9JlsXjIzthlv","-package-id","generics-sop-0.5.0.0-F6YwC8rgK7PDSFuhTeyj9","-package-id","gerber-0.2.0.0-inplace","-package-id","gerber-diagrams-0.1.0.0-inplace","-package-id","gravatar-0.8.0-4yVP5UTnAB660JyqOlKcOr","-package-id","hashable-1.2.7.0-1xcHQnlL64kD58lBBYxUfc","-package-id","hedis-0.12.7-8jASHFch1x4CLiVreTgzXH","-package-id","hedis-simple-effects-1.0-inplace","-package-id","hexpat-lens-0.1.8-8uJGmm470VtB8aUPBsO9Ol","-package-id","http-client-0.6.4-3YJnoFInpjcKbGyUuycW9m","-package-id","http-client-simple-effects-1.0-inplace","-package-id","http-client-tls-0.3.5.3-BqtUkw1CeCP7fwrJSP9vKn","-package-id","http-conduit-2.3.7.1-2JjAoPvUWwA772zFuejLui","-package-id","http-types-0.12.3-7coT1Rhp4Sx1znxkREYoom","-package-id","immortal-0.3-3LZrJgCtc5X4ZYPROpO4gJ","-package-id","integer-gmp-1.0.2.0","-package-id","lattices-2.0.1-aklITYx9LhDhIpao6yYSv","-package-id","lens-4.18.1-9NcKz8PIP9NFwcvwi2OqE4","-package-id","lens-aeson-1.0.2-ZxfXzvIuEuDV2pxjNTzQ0","-package-id","linear-1.20.9-Cb5LDuP4s6q5uF7x5SzAs4","-package-id","logging-effect-1.3.8-GHQYjgrK7KJKsYh1YAFqPn","-package-id","mandrill-0.5.4.0-DqKrtIdNQBr1L3JeRUto5w","-package-id","memory-0.14.18-BCtc9qRwG0mLaz0tHaA5Iw","-package-id","monad-logger-0.3.30-G2oi8St5W9iChz9YizDXpc","-package-id","monad-loops-0.4.3-C8HVjGIUjThHQf0rWvll1w","-package-id","monoidal-containers-0.6.0.1-3Otbs2yKmCEL1MM1lpm2Lw","-package-id","mtl-2.2.2","-package-id","natural-transformation-0.4-3axdB3at0RbFYmTDZXu9oZ","-package-id","network-2.8.0.1-BKs0Lgn2EcA9oyPB6h8o8q","-package-id","network-uri-2.6.1.0-A3hqGbBd1YAJu5ocg1ICh5","-package-id","octopart-0.0.20-inplace","-package-id","opaleye-0.6.7004.0-58NLFRMEvyPI8ENOnFweWa","-package-id","panelisation-0.1.0.0-inplace","-package-id","pcre-light-0.4.0.4-AXl5bwTQLNi2uQ3Pk2zI22","-package-id","persistent-2.10.4-E7DHiVX5IF7Jew7yd8ZxaE","-package-id","persistent-postgresql-2.10.1-8G7ontN6fMyLWm1Ntt804n","-package-id","postgresql-simple-0.6.2-3wLjf8iAHs8Epq6DeovRbn","-package-id","prettyprinter-1.3.0-2BhjeqKluNT1mfOKia9cWr","-package-id","primitive-0.6.4.0-GUriRcfULOAJnEG0nWTXBq","-package-id","product-profunctors-0.10.0.0-5tHqRq5ASdSDQKAwx6MipQ","-package-id","profunctors-5.3-5jkmphowxjy2kLh0iQT3PH","-package-id","prometheus-client-1.0.0-BpvGOMKEjnWKW5G8DjwKFT","-package-id","prometheus-metrics-ghc-1.0.0-Jg1ApnbndsO7XC3d4d2XQ9","-package-id","quoting-1.0.0-inplace","-package-id","rel8-0.1.0.0-8JIqt5yQoXYZmTuNN2uCb","-package-id","resourcet-1.2.2-9hIc09mjhGiK3ig6XZ875i","-package-id","retry-0.8.1.0-11z3XhMYTY8CUpZwis7ffx","-package-id","safe-0.3.17-Forn3ejvIUy1lwF2V8NpB2","-package-id","safe-exceptions-0.1.7.0-F13Yq6GdRk58HzNWCzx8l0","-package-id","safe-money-0.9-KQIcqltvVoOKkdJ3OKC9Go","-package-id","safe-money-aeson-0.1.1-14RW3JD6kI9D9nHx5z9prh","-package-id","scientific-0.3.6.2-94HKAAhdi3JKzEraXjNiAk","-package-id","servant-client-core-0.16-CNzHGeCHzkASqeZhc8ktV","-package-id","servant-hmac-auth-0.1.0-JERl8xpaJjnw4qW1CsT8V","-package-id","servant-server-0.16.2-Dsamh0ZrvpLxe2Ic4Gt8p","-package-id","simple-effects-0.13.0.0-We7DnAWErgJkfdWjn5e7U","-package-id","singletons-2.6-4hGH46FDRRwGs6PBZcrNZQ","-package-id","socket-activation-0.1.0.2-8wMyCaO8FRlKCbJyAxqoWF","-package-id","split-0.2.3.3-7tYYGShBWE2PnLJK8pwJ6","-package-id","stm-2.5.0.0","-package-id","streaming-0.2.3.0-BaxpyJnBKUXLP2VWpCAJPT","-package-id","template-haskell-2.15.0.0","-package-id","text-1.2.4.0","-package-id","text-icu-0.7.0.1-1I3HLejVSG8BkacPnLl7EW","-package-id","time-1.9.3","-package-id","transformers-0.5.6.2","-package-id","unbounded-delays-0.1.1.0-4sj42R47NHJDAQ5TZPZvQZ","-package-id","universe-base-1.1.1-FY3yYUzQ6Y3LTEKan7tkQQ","-package-id","unix-2.7.2.2","-package-id","unliftio-0.2.12-2WxhnYYvq0y4AP9pwq1QgX","-package-id","unordered-containers-0.2.10.0-LB3XghHZFndHC15fxqZfMw","-package-id","uuid-1.3.13-5fcLf6s7Iw887gTy5Sxz0q","-package-id","vector-0.12.0.3-I6wipzDp7M5Gl9B8Jz3keV","-package-id","wai-3.2.2.1-1tZJXKwjnUeBROVfW0H8EW","-package-id","wai-cors-0.2.7-DCSpOUxZxky366AR9uk0t5","-package-id","wai-extra-3.0.28-ALRZcTWOQThFa4SlvM0xdJ","-package-id","wai-logger-2.3.5-D2SEGS4mVhS1R9IP2UTTEz","-package-id","wai-middleware-prometheus-1.0.0-F9CIJ9uY8LlJoTwrPMpRGJ","-package-id","warp-3.2.28-GjqhZSCeEnoCQSn4xvcda9","-package-id","wreq-0.5.3.2-HD0767TaDkaV389QIJ8uv","-package-id","yesod-core-1.6.16.1-6S6D2NVGo0eE26FUJNotyW","-package-id","yesod-persistent-1.6.0.3-57YEWwc4TiIEUgshp8HRsb","-package-id","zip-archive-0.4.1-Kz6oTmaHX5BEpMmpOWKfcs","-XHaskell2010","AppMain","AppFoundation","Application.Core","Application.Environment","Application.Factory","Application.FactorySettings","Application.Settings","Daemon.Import","Daemon.Periodically","Database.Redis.Extra","Fabrication.Gerber.Utils","Foundation","Handler.OctopartV3.Internal","MagicConstants","MyData","Order.Util","Pallet.Util","Prometheus.Extra","Query.Inst","Query.Issue","Query.Opaleye.MyData.Pallet","Query.Opaleye.Pallet","Query.Opaleye.Part","Query.Order","Query.Part","Query.PartAggregate","Query.Rack","Query.TrayWithConsignedOrder","Request.Board","Request.Firmware","Request.Organization","Request.Part","Request.Source","Response.Board","Response.Bom","Response.Firmware","Response.Flow","Response.Issue","Response.Opaleye.PurchaseOrder","Response.Output","Response.Package","Response.Pallet","Response.Part","Response.Source","Route.AuthError","Route.Authorized","Route.AuthorizeResource","Route.LookupResource","Route.Resource","YesodConfig","YesodMain","Application","Application.Log","Application.Lookup","Application.Presentation.ActiveUserContext","Application.Presentation.UserContext","Application.Session","Application.Session.RedisBackend","Application.Settings.Development","Assembly.Hash","Assembly.Types","BatchedQueries","Board.Types","Board.Util","Bom.Util","CadExport","CadExport.Export","CircuitHub.Persistence.Transaction.Extra","Control.Monad.Logger.Extra","Control.Monad.Octopart","Daemon.Bom.ApproveSubstitutes","Daemon.Notification.Consignment","Daemon.Notification.OrderSubstitution","Data.URL","Database.Esqueleto.Extra","Error.Extra","Fabrication.OutputFiles","Flow","Footprint.Util","GHC.Stack.Extra","Handler","Handler.Assembly","Handler.Bins","Handler.BoardOrders","Handler.BoardRFQs","Handler.Boards","Handler.BomSnapshots","Handler.Boms","Handler.Categories","Handler.Charge","Handler.CostTypes","Handler.Costs","Handler.Failure","Handler.Firmware","Handler.Flow","Handler.Import","Handler.Insts","Handler.Issues","Handler.KitBox","Handler.Linescan","Handler.Lots","Handler.MyData","Handler.Notifications","Handler.Orders","Handler.Orders.Internal","Handler.Orders.Notification","Handler.Organizations","Handler.OrphanInstances","Handler.Outputs","Handler.Pallets","Handler.Panels","Handler.Parts","Handler.Placements","Handler.Projects","Handler.PurchaseOrders","Handler.Rack","Handler.Registration","Handler.Revisions","Handler.Robots","Handler.Schematics","Handler.Sources","Handler.Stock","Handler.Substitutes","Handler.Tasks","Handler.Trays","Handler.Users","Import","Inst.Util","Network.API.Mandrill.Extra","Network.Filepicker.Policies","Network.HTTP.Client.Extra","Network.HTTP.Types.URI.Extra","Network.WAI.Logger.Apache.CircuitHub","Notification.Common","Notification.Order","Notification.Project","Notification.Slack","Notification.Slack.Format","Notification.Slack.Monad","Notification.Slack.QueueItem","Notification.Slack.Sender","Notification.Slack.Types","Order.Board.Util","Order.OrderFailureReason","Order.Payment","Order.Shipping","Order.StatusAssignment","Order.StripeFailure","Part.Util","Progress.Wait","Project.Bom.Util","Project.Fork","Project.Util","Query","Query.AccessControlList","Query.Assembly","Query.Board","Query.BoardOrder","Query.Bom","Query.Category","Query.Charge","Query.Costs","Query.Document","Query.Flow","Query.Footprint","Query.Import","Query.Opaleye.BoardOrder","Query.Opaleye.Bom","Query.Opaleye.Category","Query.Opaleye.Costs","Query.Opaleye.Document","Query.Opaleye.Footprint","Query.Opaleye.Import","Query.Opaleye.Inst","Query.Opaleye.Issue","Query.Opaleye.KitBox","Query.Opaleye.Order","Query.Opaleye.Package","Query.Opaleye.PartCache","Query.Opaleye.Placement","Query.Opaleye.Progress","Query.Opaleye.Project","Query.Opaleye.PurchaseOrder","Query.Opaleye.Quote","Query.Opaleye.Revision","Query.Opaleye.Schematic","Query.Opaleye.Shipment","Query.Opaleye.Source","Query.Opaleye.Substitute","Query.Opaleye.User","Query.Organization","Query.Outputs","Query.PartCache","Query.Progress","Query.Project","Query.Quote","Query.Revision","Query.Schematic","Query.Source","Query.Stock","Query.Substitute","Query.User","Query.UserAddress","Quote.Board.Storm","Rel8.Paginate","Request.Assembly","Request.BoardOrder","Request.BoardRFQs","Request.Bom","Request.BomSnapshot","Request.Charge","Request.Comment","Request.Cost","Request.Import","Request.Issue","Request.KitBox","Request.MyData","Request.Order","Request.Package","Request.Pallet","Request.Panel","Request.Placement","Request.Project","Request.PurchaseOrder","Request.Rack","Request.Shipment","Request.Substitute","Request.Types","Request.User","RequestContext","Response.Assembly","Response.BoardOrder","Response.BomSnapshot","Response.Charge","Response.Cost","Response.Import","Response.JetProgramPreview","Response.KitBox","Response.Landing","Response.License","Response.Linescan","Response.Lots","Response.MyData","Response.Opaleye.Comment","Response.Opaleye.Inst","Response.Opaleye.Issue","Response.Opaleye.Organization","Response.Opaleye.Project","Response.Opaleye.Shipment","Response.Opaleye.User","Response.Order","Response.Organization","Response.Panel","Response.PanelsSummary","Response.Project","Response.Rack","Response.Registration","Response.Revision","Response.Schematic","Response.Stock","Response.Task","Response.Types","Response.User","Route.Authorize","Route.AuthorizeHandler","Route.MatchParams","Route.ResourceFromModel","Route.ResourcePatterns","Route.Routes","Schematic.Util","Statistics.Hash","Statistics.Sample.Extra","Statistics.SimpleHistogram","Text.SubstringMatches","Util","Web.Mandrill","Web.Segment.Order","Yesod.Core.Handler.Extra","Yesod.Session.Redis","YesodConfig2","-Wall","-Werror=missing-fields","-fwarn-incomplete-uni-patterns","-hide-all-packages","-j2","-optl-fuse-ld=gold","-j4","-optl-fuse-ld=gold"], componentDependencies = ["cabal.project"]}

@mpickering
Copy link
Contributor

I have seen this happen but I thought I eliminated it. The issue is that when a new component is created it creates a new HscEnv which means everything needs to be typechecked again. It seems that one of the dependencies is not being typechecked again for some reason.

@ocharles
Copy link
Contributor

I think there might also be a problem with hs-boot files causing new components:

Shelling out to cabal "/home/ollie/work/circuithub/ch-persistence/src/CircuitHub/Persistence/Panel/NewAOI.hs"
> Warning: The package list for 'hackage.haskell.org' is 18 days old.
> Run 'cabal update' to get the latest list of available packages.
> Resolving dependencies...
> Build profile: -w ghc-8.8.1 -O0
> In order, the following will be built (use -v for more details):
>  - ch-linear-0.1.0.0 (lib) (configuration changed)
>  - circuithub-prelude-0.0.28 (lib) (configuration changed)
>  - ex-pool-prometheus-1.0.0 (lib) (configuration changed)
>  - octopart-0.0.20 (lib) (configuration changed)
>  - ch-model-0.1.0.0 (lib) (configuration changed)
>  - circuithub-entities-0.0.182 (lib) (configuration changed)
>  - ch-persistence-1.0 (lib) (configuration changed)
> Configuring library for ch-linear-0.1.0.0..
> Configuring library for ex-pool-prometheus-1.0.0..
> Configuring library for circuithub-prelude-0.0.28..
> Preprocessing library for ex-pool-prometheus-1.0.0..
> Building library for ex-pool-prometheus-1.0.0..
> Preprocessing library for ch-linear-0.1.0.0..
> Building library for ch-linear-0.1.0.0..
> Preprocessing library for circuithub-prelude-0.0.28..
> Building library for circuithub-prelude-0.0.28..
> Configuring library for octopart-0.0.20..
> Preprocessing library for octopart-0.0.20..
> Building library for octopart-0.0.20..
> Configuring library for ch-model-0.1.0.0..
> Preprocessing library for ch-model-0.1.0.0..
> Building library for ch-model-0.1.0.0..
> Configuring library for circuithub-entities-0.0.182..
> Preprocessing library for circuithub-entities-0.0.182..
> Building library for circuithub-entities-0.0.182..
> Configuring library for ch-persistence-1.0..
> Preprocessing library for ch-persistence-1.0..
ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-odir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-hidir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-stubdir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-i","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-i/home/ollie/work/circuithub/ch-persistence/src","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/autogen","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/global-autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/global-autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-optP-include","-optP/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/autogen/cabal_macros.h","-optl-fuse-ld=gold","-optl-fuse-ld=gold","-this-unit-id","ch-persistence-1.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/ollie/.cabal/store/ghc-8.8.1/package.db","-package-db","/home/ollie/work/circuithub/dist-newstyle/packagedb/ghc-8.8.1","-package-db","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/package.conf.inplace","-package-id","HDBC-2.4.0.3-64w8MKmViDo6MlRFUoGPuE","-package-id","HDBC-postgresql-2.3.2.7-GeT82PgZyKT5o1FKs64tv9","-package-id","aeson-1.4.5.0-il1ivCETMJ3UZ0bilBI8S","-package-id","base-4.13.0.0","-package-id","beam-core-0.8.1.0-I4ge5HZKLCr84M6C3nSJyY","-package-id","beam-postgres-0.4.1.0-De1Z0rUglbLvOccm62WHp","-package-id","bytestring-0.10.9.0","-package-id","ch-linear-0.1.0.0-inplace","-package-id","ch-model-0.1.0.0-inplace","-package-id","circuithub-entities-0.0.182-inplace","-package-id","circuithub-prelude-0.0.28-inplace","-package-id","conduit-1.3.1.1-H4gZnLg2V4lLb3j0JLikGB","-package-id","containers-0.6.2.1","-package-id","dbmigrations-2.0.0-BZJV4FrDlFsJ2jR6wnZpx8","-package-id","esqueleto-3.2.2-BgeaxLsQrtq14cOGiqVxn8","-package-id","ex-pool-prometheus-1.0.0-inplace","-package-id","free-5.1.2-KB9TyuYmCW9JlsXjIzthlv","-package-id","lens-4.18.1-9NcKz8PIP9NFwcvwi2OqE4","-package-id","lifted-base-0.2.3.12-7VjZcXlzCs7BVFdMalumQJ","-package-id","linear-1.20.9-Cb5LDuP4s6q5uF7x5SzAs4","-package-id","monad-control-1.0.2.3-IZHkVYxw9rJ1P72U2wnOr3","-package-id","mtl-2.2.2","-package-id","natural-transformation-0.4-3axdB3at0RbFYmTDZXu9oZ","-package-id","opaleye-0.6.7004.0-58NLFRMEvyPI8ENOnFweWa","-package-id","persistent-2.10.4-E7DHiVX5IF7Jew7yd8ZxaE","-package-id","persistent-postgresql-2.10.1-8G7ontN6fMyLWm1Ntt804n","-package-id","postgresql-simple-0.6.2-3wLjf8iAHs8Epq6DeovRbn","-package-id","profunctors-5.3-5jkmphowxjy2kLh0iQT3PH","-package-id","prometheus-client-1.0.0-BpvGOMKEjnWKW5G8DjwKFT","-package-id","rel8-0.1.0.0-8JIqt5yQoXYZmTuNN2uCb","-package-id","resourcet-1.2.2-9hIc09mjhGiK3ig6XZ875i","-package-id","rio-0.1.12.0-8aUkLnVXFhUFqb4xBvO1Tx","-package-id","silently-1.2.5.1-LjJTNUL27gb9ihdedUe6lc","-package-id","simple-effects-0.13.0.0-We7DnAWErgJkfdWjn5e7U","-package-id","split-0.2.3.3-7tYYGShBWE2PnLJK8pwJ6","-package-id","tasty-1.2.3-5RGRShhYPR98IMcBGUvnko","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","tmp-postgres-1.34.1.0-7hLQc2CSGQI9LYo5sqyPNf","-package-id","transformers-0.5.6.2","-package-id","transformers-base-0.4.5.2-DX3wCJVOlEpDL5aWsF5COJ","-XHaskell2010","CircuitHub.Pallet","CircuitHub.Pallet.TrayInstallation","CircuitHub.Pallet.FromPalletToInstalledSpace","CircuitHub.Pallet.UpdateCircuitHubTraysFromMycronic","CircuitHub.Persistence.Bin","CircuitHub.Persistence.Bin.Bin","CircuitHub.Persistence.Issue","CircuitHub.Persistence.Issue.NewIssue","CircuitHub.Persistence.Linescan","CircuitHub.Persistence.Lot","CircuitHub.Persistence.Lot.Factoryless","CircuitHub.Persistence.Lot.Lot","CircuitHub.Persistence.Lot.NewLot","CircuitHub.Persistence.Lot.PurchaseOrder","CircuitHub.Persistence.Pallet","CircuitHub.Persistence.Pallet.Fiducials","CircuitHub.Persistence.Pallet.InstalledPallet","CircuitHub.Persistence.Pallet.InstalledTray","CircuitHub.Persistence.Pallet.NewInstalledPallet","CircuitHub.Persistence.Pallet.TrayEvent","CircuitHub.Persistence.Pallet.TrayLocation","CircuitHub.Persistence.Pallet.UpdateInstalledTray","CircuitHub.Persistence.Panel","CircuitHub.Persistence.Panel.AOIAnnotation","CircuitHub.Persistence.Panel.Actioned","CircuitHub.Persistence.Panel.GetPanelAOIResult","CircuitHub.Persistence.Panel.Location","CircuitHub.Persistence.Panel.NewAOI","CircuitHub.Persistence.Panel.NewAOIImage","CircuitHub.Persistence.Panel.NewAnnotation","CircuitHub.Persistence.Panel.NewOverlay","CircuitHub.Persistence.Panel.NewPanel","CircuitHub.Persistence.Panel.OriginalWithThumbnail","CircuitHub.Persistence.Panel.Overlay","CircuitHub.Persistence.Panel.PanelSummary","CircuitHub.Persistence.Panel.Signoff","CircuitHub.Persistence.Panel.UpdateAnnotation","CircuitHub.Persistence.PostgreSQL","CircuitHub.Persistence.PostgreSQL.Statement","CircuitHub.Persistence.PostgreSQL.Statement.Beam","CircuitHub.Persistence.PostgreSQL.Statement.Persistent","CircuitHub.Persistence.PostgreSQL.Statement.PostgreSQLSimple","CircuitHub.Persistence.PostgreSQL.Statement.Rel8","CircuitHub.Persistence.PostgreSQL.TestDatabase","CircuitHub.Persistence.Rack","CircuitHub.Persistence.Rack.Location","CircuitHub.Persistence.Transaction","CircuitHub.Persistence.Workcell","CircuitHub.Persistence.Workcell.RackSlot","CircuitHub.Query.BOM","CircuitHub.Query.Factory","CircuitHub.Query.Lot.Lots","CircuitHub.Query.NotDeleted","CircuitHub.Query.Order","CircuitHub.Query.Pallet","CircuitHub.Query.Pallet.InstalledPallets","CircuitHub.Query.Panel","CircuitHub.Query.PurchaseOrder.PurchaseOrderPartAggrs","CircuitHub.Query.PurchaseOrder.PurchaseOrderPartReceivedToAggrs","Mycronic.DatabaseTag","Mycronic.Persistence","Mycronic.Persistence.Component","Mycronic.Persistence.Component.UpdateComponentPackage","Mycronic.Persistence.Events","Mycronic.Persistence.Layout","Mycronic.Persistence.Pallet","Mycronic.Persistence.Pallet.PalletInAtm","Mycronic.Persistence.Pallet.Traydata","Mycronic.Persistence.Pallet.UpdateTraydata","Mycronic.Query.Component","Mycronic.Query.Pallet","Mycronic.Query.Pallet.PalletsInAtms","Mycronic.Query.Schemas","Rel8.Tabulate","CircuitHub.Persistence.Pallet.PostgreSQL","CircuitHub.Persistence.Pallet.Syntax","CircuitHub.Query.Panel.FiducialAnnotationsRow","CircuitHub.Query.Panel.PanelSummaryRow","Mycronic.Persistence.Events.PostgreSQL","Mycronic.Persistence.Events.Syntax","Mycronic.Persistence.Layout.PostgreSQL","Mycronic.Persistence.Layout.Syntax","Mycronic.Persistence.Pallet.PostgreSQL","Mycronic.Persistence.Pallet.Syntax","-Wall","-fwarn-incomplete-uni-patterns","-hide-all-packages","-j2","-optl-fuse-ld=gold","-j4","-optl-fuse-ld=gold"], componentDependencies = ["cabal.project"]}
"Making new HscEnv[ch-persistence-1.0-inplace,main]"
...
Shelling out to cabal "/home/ollie/work/circuithub/ch-persistence/src/CircuitHub/Persistence/PostgreSQL/Statement/Beam.hs-boot"
> Warning: The package list for 'hackage.haskell.org' is 18 days old.
> Run 'cabal update' to get the latest list of available packages.
> Resolving dependencies...
> Build profile: -w ghc-8.8.1 -O0
> In order, the following will be built (use -v for more details):
>  - ch-linear-0.1.0.0 (lib) (configuration changed)
>  - circuithub-prelude-0.0.28 (lib) (configuration changed)
>  - ex-pool-prometheus-1.0.0 (lib) (configuration changed)
>  - octopart-0.0.20 (lib) (configuration changed)
>  - ch-model-0.1.0.0 (lib) (configuration changed)
>  - circuithub-entities-0.0.182 (lib) (configuration changed)
>  - ch-persistence-1.0 (lib) (configuration changed)
> Configuring library for ch-linear-0.1.0.0..
> Configuring library for ex-pool-prometheus-1.0.0..
> Configuring library for circuithub-prelude-0.0.28..
> Preprocessing library for ex-pool-prometheus-1.0.0..
> Building library for ex-pool-prometheus-1.0.0..
> Preprocessing library for ch-linear-0.1.0.0..
> Building library for ch-linear-0.1.0.0..
> Preprocessing library for circuithub-prelude-0.0.28..
> Building library for circuithub-prelude-0.0.28..
> Configuring library for octopart-0.0.20..
> Preprocessing library for octopart-0.0.20..
> Building library for octopart-0.0.20..
> Configuring library for ch-model-0.1.0.0..
> Preprocessing library for ch-model-0.1.0.0..
> Building library for ch-model-0.1.0.0..
> Configuring library for circuithub-entities-0.0.182..
> Preprocessing library for circuithub-entities-0.0.182..
> Building library for circuithub-entities-0.0.182..
> Configuring library for ch-persistence-1.0..
> Preprocessing library for ch-persistence-1.0..
ComponentOptions {componentOptions = ["-fbuilding-cabal-package","-O0","-outputdir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-odir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-hidir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-stubdir","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-i","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-i/home/ollie/work/circuithub/ch-persistence/src","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/autogen","-i/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/global-autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/global-autogen","-I/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build","-optP-include","-optP/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/build/autogen/cabal_macros.h","-optl-fuse-ld=gold","-optl-fuse-ld=gold","-this-unit-id","ch-persistence-1.0-inplace","-hide-all-packages","-Wmissing-home-modules","-no-user-package-db","-package-db","/home/ollie/.cabal/store/ghc-8.8.1/package.db","-package-db","/home/ollie/work/circuithub/dist-newstyle/packagedb/ghc-8.8.1","-package-db","/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ch-persistence-1.0/noopt/package.conf.inplace","-package-id","HDBC-2.4.0.3-64w8MKmViDo6MlRFUoGPuE","-package-id","HDBC-postgresql-2.3.2.7-GeT82PgZyKT5o1FKs64tv9","-package-id","aeson-1.4.5.0-il1ivCETMJ3UZ0bilBI8S","-package-id","base-4.13.0.0","-package-id","beam-core-0.8.1.0-I4ge5HZKLCr84M6C3nSJyY","-package-id","beam-postgres-0.4.1.0-De1Z0rUglbLvOccm62WHp","-package-id","bytestring-0.10.9.0","-package-id","ch-linear-0.1.0.0-inplace","-package-id","ch-model-0.1.0.0-inplace","-package-id","circuithub-entities-0.0.182-inplace","-package-id","circuithub-prelude-0.0.28-inplace","-package-id","conduit-1.3.1.1-H4gZnLg2V4lLb3j0JLikGB","-package-id","containers-0.6.2.1","-package-id","dbmigrations-2.0.0-BZJV4FrDlFsJ2jR6wnZpx8","-package-id","esqueleto-3.2.2-BgeaxLsQrtq14cOGiqVxn8","-package-id","ex-pool-prometheus-1.0.0-inplace","-package-id","free-5.1.2-KB9TyuYmCW9JlsXjIzthlv","-package-id","lens-4.18.1-9NcKz8PIP9NFwcvwi2OqE4","-package-id","lifted-base-0.2.3.12-7VjZcXlzCs7BVFdMalumQJ","-package-id","linear-1.20.9-Cb5LDuP4s6q5uF7x5SzAs4","-package-id","monad-control-1.0.2.3-IZHkVYxw9rJ1P72U2wnOr3","-package-id","mtl-2.2.2","-package-id","natural-transformation-0.4-3axdB3at0RbFYmTDZXu9oZ","-package-id","opaleye-0.6.7004.0-58NLFRMEvyPI8ENOnFweWa","-package-id","persistent-2.10.4-E7DHiVX5IF7Jew7yd8ZxaE","-package-id","persistent-postgresql-2.10.1-8G7ontN6fMyLWm1Ntt804n","-package-id","postgresql-simple-0.6.2-3wLjf8iAHs8Epq6DeovRbn","-package-id","profunctors-5.3-5jkmphowxjy2kLh0iQT3PH","-package-id","prometheus-client-1.0.0-BpvGOMKEjnWKW5G8DjwKFT","-package-id","rel8-0.1.0.0-8JIqt5yQoXYZmTuNN2uCb","-package-id","resourcet-1.2.2-9hIc09mjhGiK3ig6XZ875i","-package-id","rio-0.1.12.0-8aUkLnVXFhUFqb4xBvO1Tx","-package-id","silently-1.2.5.1-LjJTNUL27gb9ihdedUe6lc","-package-id","simple-effects-0.13.0.0-We7DnAWErgJkfdWjn5e7U","-package-id","split-0.2.3.3-7tYYGShBWE2PnLJK8pwJ6","-package-id","tasty-1.2.3-5RGRShhYPR98IMcBGUvnko","-package-id","text-1.2.4.0","-package-id","time-1.9.3","-package-id","tmp-postgres-1.34.1.0-7hLQc2CSGQI9LYo5sqyPNf","-package-id","transformers-0.5.6.2","-package-id","transformers-base-0.4.5.2-DX3wCJVOlEpDL5aWsF5COJ","-XHaskell2010","CircuitHub.Pallet","CircuitHub.Pallet.TrayInstallation","CircuitHub.Pallet.FromPalletToInstalledSpace","CircuitHub.Pallet.UpdateCircuitHubTraysFromMycronic","CircuitHub.Persistence.Bin","CircuitHub.Persistence.Bin.Bin","CircuitHub.Persistence.Issue","CircuitHub.Persistence.Issue.NewIssue","CircuitHub.Persistence.Linescan","CircuitHub.Persistence.Lot","CircuitHub.Persistence.Lot.Factoryless","CircuitHub.Persistence.Lot.Lot","CircuitHub.Persistence.Lot.NewLot","CircuitHub.Persistence.Lot.PurchaseOrder","CircuitHub.Persistence.Pallet","CircuitHub.Persistence.Pallet.Fiducials","CircuitHub.Persistence.Pallet.InstalledPallet","CircuitHub.Persistence.Pallet.InstalledTray","CircuitHub.Persistence.Pallet.NewInstalledPallet","CircuitHub.Persistence.Pallet.TrayEvent","CircuitHub.Persistence.Pallet.TrayLocation","CircuitHub.Persistence.Pallet.UpdateInstalledTray","CircuitHub.Persistence.Panel","CircuitHub.Persistence.Panel.AOIAnnotation","CircuitHub.Persistence.Panel.Actioned","CircuitHub.Persistence.Panel.GetPanelAOIResult","CircuitHub.Persistence.Panel.Location","CircuitHub.Persistence.Panel.NewAOI","CircuitHub.Persistence.Panel.NewAOIImage","CircuitHub.Persistence.Panel.NewAnnotation","CircuitHub.Persistence.Panel.NewOverlay","CircuitHub.Persistence.Panel.NewPanel","CircuitHub.Persistence.Panel.OriginalWithThumbnail","CircuitHub.Persistence.Panel.Overlay","CircuitHub.Persistence.Panel.PanelSummary","CircuitHub.Persistence.Panel.Signoff","CircuitHub.Persistence.Panel.UpdateAnnotation","CircuitHub.Persistence.PostgreSQL","CircuitHub.Persistence.PostgreSQL.Statement","CircuitHub.Persistence.PostgreSQL.Statement.Beam","CircuitHub.Persistence.PostgreSQL.Statement.Persistent","CircuitHub.Persistence.PostgreSQL.Statement.PostgreSQLSimple","CircuitHub.Persistence.PostgreSQL.Statement.Rel8","CircuitHub.Persistence.PostgreSQL.TestDatabase","CircuitHub.Persistence.Rack","CircuitHub.Persistence.Rack.Location","CircuitHub.Persistence.Transaction","CircuitHub.Persistence.Workcell","CircuitHub.Persistence.Workcell.RackSlot","CircuitHub.Query.BOM","CircuitHub.Query.Factory","CircuitHub.Query.Lot.Lots","CircuitHub.Query.NotDeleted","CircuitHub.Query.Order","CircuitHub.Query.Pallet","CircuitHub.Query.Pallet.InstalledPallets","CircuitHub.Query.Panel","CircuitHub.Query.PurchaseOrder.PurchaseOrderPartAggrs","CircuitHub.Query.PurchaseOrder.PurchaseOrderPartReceivedToAggrs","Mycronic.DatabaseTag","Mycronic.Persistence","Mycronic.Persistence.Component","Mycronic.Persistence.Component.UpdateComponentPackage","Mycronic.Persistence.Events","Mycronic.Persistence.Layout","Mycronic.Persistence.Pallet","Mycronic.Persistence.Pallet.PalletInAtm","Mycronic.Persistence.Pallet.Traydata","Mycronic.Persistence.Pallet.UpdateTraydata","Mycronic.Query.Component","Mycronic.Query.Pallet","Mycronic.Query.Pallet.PalletsInAtms","Mycronic.Query.Schemas","Rel8.Tabulate","CircuitHub.Persistence.Pallet.PostgreSQL","CircuitHub.Persistence.Pallet.Syntax","CircuitHub.Query.Panel.FiducialAnnotationsRow","CircuitHub.Query.Panel.PanelSummaryRow","Mycronic.Persistence.Events.PostgreSQL","Mycronic.Persistence.Events.Syntax","Mycronic.Persistence.Layout.PostgreSQL","Mycronic.Persistence.Layout.Syntax","Mycronic.Persistence.Pallet.PostgreSQL","Mycronic.Persistence.Pallet.Syntax","-Wall","-fwarn-incomplete-uni-patterns","-hide-all-packages","-j2","-optl-fuse-ld=gold","-j4","-optl-fuse-ld=gold"], componentDependencies = ["cabal.project"]}
"Making new HscEnv[ch-persistence-1.0-inplace,main,ch-persistence-1.0-inplace,main]"
Cached component of "/home/ollie/work/circuithub/ch-persistence/src/Mycronic/Persistence/Layout.hs"
Shelling out to cabal "/home/ollie/work/circuithub/ch-persistence/src/CircuitHub/Persistence/PostgreSQL/Statement/Persistent.hs-boot"
...

@Avi-D-coder
Copy link
Contributor

@mpickering I don't believe so, but other components are able to be loaded by hie, when using cabal new style builds.

@TomMD
Copy link

TomMD commented Mar 18, 2020

Is 45 seconds unsurprising for running this ghcide branch on a 2 project, 2 lines of code, repo?

What I have is:

tommd@ovdak /tmp/xyz% tree | rg -v 'CHANGELOG.md|LICENSE|Setup.hs'
.
├── cabal.project
├── hie.yaml
├── x
│   ├── src
│   │   └── X.hs
│   └── x.cabal
└── y
    ├── src
    │   └── Y.hs
    └── y.cabal

4 directories, 12 files
tommd@ovdak /tmp/xyz% cat hie.yaml
cradle:
    multi:
        - path: "./x"
          config: {cradle: {cabal: {component: "lib:x"}}}
        - path: "./y"
          config: {cradle: {cabal: {component: "lib:y"}}}

Package x:

tommd@ovdak /tmp/xyz% cat x/src/x.hs
module X where

x :: Int
x = 4

Package y:

tommd@ovdak /tmp/xyz% cat y/src/y.hs
module Y where

import X

y :: Double
y = fromIntegral x * 10 + 2

@mpickering
Copy link
Contributor

@TomMD Loading two components from ghcide takes 20s on my machine. So if your machine is twice as slow then it's not unexpected. The cost should only occur once at initialisation.

@mpickering
Copy link
Contributor

Updated branch - https://github.com/mpickering/ghcide/tree/wip/multi-rebase

Can you try it again please @ocharles?

If you are also using Template Haskell then you probably should also try
https://github.com/mpickering/ghcide/tree/wip/object-files

@fendor
Copy link
Collaborator

fendor commented Mar 18, 2020

I got an issue with basic TH stuff and stack. Works fine with a cabal cradle.
hie.yaml:

cradle:
  stack:

Lib.hs:

module Lib where

main :: IO ()
main = putStrLn "Hello, World"

Everything seems to work fine.
However, if I change Lib.hs to

module Lib where
import Paths_package
main :: IO ()
main = putStrLn "Hello, World"

then every hover request forces a recompile of the package, slowing hover down a lot.

Logs:
ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: /home/baldr/.cabal/store/ghc-8.6.5/ghcide-0.1.0-da95de730b76b2993f0ca9b8f22ebfe75ada83ed24c0802978e9d85a0576f731/bin/ghcide)
Starting LSP server...
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.02s
[DEBUG] Set files of interest to: [NormalizedFilePath "/home/baldr/Documents/haskell/fprog/src/Lib.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Opened text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/src/Lib.hs"
[DEBUG] Finishing shakeRun (took 0.04s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/src/Lib.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main]"
[DEBUG] Finishing shakeRun (took 4.63s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.08s, completed)
[INFO] Hover request at position 8:14 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 10:14 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 10:6 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 10:6 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 10:25 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 10:28 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.27s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.05s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.06s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.14s, exception: AsyncCancelled)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.05s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.06s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.05s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.04s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.06s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.04s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.06s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.07s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.23s, exception: AsyncCancelled)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Cancelled request IdInt 43
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 1.02s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
[DEBUG] Cancelled request IdInt 46
[INFO] Hover request at position 5:19 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Cancelled request IdInt 47
[INFO] Hover request at position 5:18 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 3.67s, exception: AsyncCancelled)
[DEBUG] Cancelled request IdInt 48
[INFO] Hover request at position 7:[DEBUG] Cancelled request IdInt 49
[INFO] Hover request at position 7:[DEBUG] Cancelled request IdInt 50
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Cancelled request IdInt 51
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 1.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main]"
[DEBUG] Cancelled request IdInt 54
[INFO] Hover request at position 10:15 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 4.91s, exception: AsyncCancelled)
[DEBUG] Cancelled request IdInt 55
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[INFO] Hover request at position 10:15 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.16s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main]"
[INFO] Definition request at position 10:15 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 4.02s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main,main]"
[DEBUG] Finishing shakeRun (took 5.99s, completed)
[INFO] Hover request at position 6:1 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Cancelled request IdInt 58
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.53s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.35s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.15s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.05s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 8:12 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 8:12 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[INFO] Hover request at position 5:1 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.04s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.08s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.03s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.11s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Finishing shakeRun (took 0.04s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.02s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.10s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.03s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.08s, completed)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Modified text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Finishing shakeRun (took 0.25s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Cancelled request IdInt 84
[DEBUG] Finishing shakeRun (took 1.02s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.01s, exception: AsyncCancelled)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
[INFO] Hover request at position 8:14 in file: /home/baldr/Documents/haskell/fprog/src/Lib.hs
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main,main,main]"
[DEBUG] Finishing shakeRun (took 4.43s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main,main,main,main]"
[DEBUG] Finishing shakeRun (took 4.51s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Saved text document: file:///home/baldr/Documents/haskell/fprog/src/Lib.hs
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main,main,main,main,main]"
[DEBUG] Finishing shakeRun (took 4.79s, completed)
Output of `ghcide`
ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: /home/baldr/.cabal/store/ghc-8.6.5/ghcide-0.1.0-da95de730b76b2993f0ca9b8f22ebfe75ada83ed24c0802978e9d85a0576f731/bin/ghcide)
Ghcide setup tester in /home/baldr/Documents/haskell/fprog.
Report bugs at https://github.com/digital-asset/ghcide/issues

Step 1/6: Finding files to test in /home/baldr/Documents/haskell/fprog
Found 5 files

Step 2/6: Looking for hie.yaml files that control setup
Found 1 cradle

Step 3/6: Initializing the IDE
[DEBUG] Warning: Client does not support watched files. Falling back to OS polling

Step 4/6: Type checking the files
[DEBUG] Set files of interest to: [NormalizedFilePath "/home/baldr/Documents/haskell/fprog/app/Main.hs",NormalizedFilePath "/home/baldr/Documents/haskell/fprog/Setup.hs",NormalizedFilePath "/home/baldr/Documents/haskell/fprog/src/Lib2.hs",NormalizedFilePath "/home/baldr/Documents/haskell/fprog/app/IntCode.hs",NormalizedFilePath "/home/baldr/Documents/haskell/fprog/src/Lib.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[DEBUG] Finishing shakeRun (took 0.00s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/src/Lib2.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main]"
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/Setup.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main]"
File:     /home/baldr/Documents/haskell/fprog/Setup.hs
Hidden:   no
Range:    1:7-1:26
Source:   not found
Severity: DsError
Message: 
  Could not load module ‘Distribution.Simple’
  It is a member of the hidden package ‘Cabal-2.4.0.1’.
  You can run ‘:set -package Cabal’ to expose it.
  (Note: this unloads all the modules in the current scope.)
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/app/IntCode.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main]"
Shelling out to cabal "/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen/Paths_fprog.hs"
> Using main module: 1. Package `fprog' component fprog:exe:fprog with main-is file: /home/baldr/Documents/haskell/fprog/app/Main.hs
> Building all executables for `fprog' once. After a successful build of all of them, only specified executables will be rebuilt.
> fprog> initial-build-steps (lib + exe)
> The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
> Configuring GHCi with the following packages: fprog
> /home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb:/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
ComponentOptions {componentOptions = ["-i","-odir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hidir=/home/baldr/Documents/haskell/fprog/.stack-work/odir","-hide-all-packages","-XNamedFieldPuns","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-i/home/baldr/Documents/haskell/fprog/src","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/global-autogen","-stubdir=/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build","-I/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/include","-I/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/include","-I/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/include","-I/nix/store/a7qdsbw0fnk4rdbi50m65i26202wwr71-gmp-6.1.2-dev/include","-L/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib","-L/nix/store/dff9gdmszcqrmnbikvzzx5x0v85a1q28-git-2.23.1/lib","-L/nix/store/291ldi6fqsbmkbvbs8is4mcg3jb64ld4-gcc-wrapper-8.3.0/lib","-L/nix/store/sisy13ic6giv9yn0fyl2n9cpm84xscvx-gmp-6.1.2/lib","-package-id=base-4.12.0.0","-package-id=containers-0.6.0.1","-package-id=data-ordlist-0.4.7.0-JijOptHq8X5AysaK6Liyhk","-package-id=unordered-containers-0.2.10.0-LgoTL3wbBEY5bZIDJiyxW4","-package-id=gitrev-1.3.1-28bODUJmuLsJT3tLybQkQz","-package-id=optparse-simple-0.1.1.2-1cpryBxW0nEilYBxIGTnk","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog","-i/home/baldr/Documents/haskell/fprog/app","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/autogen","-i/home/baldr/Documents/haskell/fprog/.stack-work/dist/x86_64-linux-nix/Cabal-2.4.0.1/build/fprog/fprog-tmp","-rtsopts","-with-rtsopts=-N","-optP-include","-optP/home/baldr/Documents/haskell/fprog/.stack-work/ghci/35d3cecf/cabal_macros.h","-ghci-script=/run/user/1000/haskell-stack-ghci/b81ca1df/ghci-script","-package-db","/home/baldr/Documents/haskell/fprog/.stack-work/install/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/home/baldr/.stack/snapshots/x86_64-linux-nix/98434b710ad720295fe0a0e5c753b03794de6b29dd993f96754e0f54a9981c5a/8.6.5/pkgdb","-package-db","/nix/store/8kqs76zywv59b9ry08gnmy4jf8qqcnwl-ghc-8.6.5/lib/ghc-8.6.5/package.conf.d"], componentDependencies = ["fprog.cabal","package.yaml","stack.yaml"]}
"Making new HscEnv[main,main,main,main]"

Everything else is pretty stable so far!

@TomMD
Copy link

TomMD commented Mar 18, 2020

@mpickering If it were just a sub-minute time I wouldn't be too concerned. What I'm seeing isn't just a 20-40 second delay, but perhaps an n^2 operation where n is the number of packages. For me that number is 19, so ghcide probably won't finish loading before I retire.

Let's take a smaller example two to four packages with linear dependencies. I have hosted a tiny example repository and script for this purpose. There are four packages w, z, y x with the dependency tree of w->z->y->x.

Observation: ghcide is not deterministic even if I remove dist-newstyle and run fresh. In a clean run there are varying numbers of configurations each time.

Running the script (git clone https://github.com/tomd/multi-target-check ; cd multi-target-check/broken-three-* ; ./run.sh) I get the bottom project, x, being configured 7, 5, 4, then 2 times - so the deeper it is in the dependency tree the more it is being configured.

Phrased another way we have the function:

f :: NumberOfPackages -> NumberOfCabalConfigurationCalls
f 1 = 2
f 2 = 6
f 3 = 9
f 4 = 18

Example output of the script with today's rebased branch is:

Executing test on projects: w z y x
x was configured  6 times and built  5 times.
y was configured  5 times and built  4 times.
z was configured  4 times and built  2 times.
w was configured  2 times and built  0 times.
Executing test on projects: x y z w
x was configured  7 times and built  5 times.
y was configured  5 times and built  4 times.
z was configured  4 times and built  2 times.
w was configured  2 times and built  0 times.
Executing test on projects: x y z
x was configured  5 times and built  3 times.
y was configured  3 times and built  1 times.
z was configured  1 times and built  0 times.
w was configured  0 times and built  0 times.
Executing test on projects: x y
x was configured  4 times and built  2 times.
y was configured  2 times and built  0 times.
z was configured  0 times and built  0 times.
w was configured  0 times and built  0 times.
Executing test on projects: x
x was configured  2 times and built  0 times.
y was configured  0 times and built  0 times.
z was configured  0 times and built  0 times.
w was configured  0 times and built  0 times.

Perhaps this isn't surprising to you (I'm curious here if this is expected behavior), but it is a blocker for ghcide being useful on the majority of projects for which one would really want an IDE.

@mpickering
Copy link
Contributor

@TomMD The branch has barely been working for 6 hours, further refinements are possible but for much better performance, the build tools will have to be changed which is a much longer project.

@mpickering
Copy link
Contributor

The link in your comment appears to be dead, and also it seems that you are running ghcide on the command line rather than in the editor. Things may be much more sensible if you load the project into an editor as it will only load components if you open a file from them.

@TomMD
Copy link

TomMD commented Mar 18, 2020

@mpickering Link fixed by edit (https://github.com/TomMD/ghcide-examples) but I don't think that matters at this point. I didn't consider that ghcide on the command line isn't a suitable evaluation. I do see this works in a suitable timeframe in my current workflow. Thank you!

@mpickering
Copy link
Contributor

I got an issue with basic TH stuff and stack.

The issue appears to be two things.

  1. The Paths_package is not listed as a target by stack, this is a bug in stack I think.
  2. When a cradle is initialised, it should always add the file which triggered the cradle load as a target so even in this bad case, cabal is only called an additional time rather than repeatedly.

@mpickering
Copy link
Contributor

I didn't consider that ghcide on the command line isn't a suitable evaluation.

There are quite a few reasons now how the command line has diverged from the usage as a language server. If you want to test using the command line then the best way in my experience is to specify just a few files you want to test loading, for example, one from each component.

ghcide src/Foo.hs exe/Main.hs

Please let me know if you run into any issues during normal usage.

@TomMD
Copy link

TomMD commented Mar 19, 2020

I'm trying to hover a symbol in production code (large-ish codebase) without success. I understand what the problem is but the behavior is errant and probably interesting to you (?).

My hie.yaml mentions the cabal exe:package component and not the lib:package. I'm editing something from the library directory. I then hover a symbol - vim-lsp, ghc, cabal, and ghc get to work. After one minute I see Making new HscEnv in the log and the hover location is null for reasons mentioned above.

Now the odd part. If I hover again then allegedly the configuration of many of my local dependencies have changed (packages in this project & repo as well as packages acquired via git as specified in the cabal.project). The hover again configures and builds the package and again loads up a new HscEnv with a growing set of main. After five runs I see:

Thu Mar 19 08:24:44 2020:["<---(stderr)", 3, "haskell", ["\"Making new HscEnv[main,main,main,main,main]\"", ""]]

As an aside, adding a lib:package component to hie.yaml doesn't help - having two components for one directory unsurprisingly doesn't mean what one might want. Probably worth me opening a ticket I'm guessing.

@mpickering
Copy link
Contributor

mpickering commented Mar 19, 2020

@TomMD Can you try a hie.yaml which doesn't specify any components explicitly (just specifying to use cabal)? If you only configure the executable component then I surprised anything works when editing the library component.

@TomMD
Copy link

TomMD commented Mar 19, 2020

@mpickering If I entirely remove the hie.yaml then things work well editing the library (I can hover) but for the executable there is no hover information and a log of:

Thu Mar 19 09:50:20 2020:["<---(stderr)", 4, "haskell", ["[INFO] Hover request at position 74:64 in file: <main.hs>", "[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)", "Shelling out to cabal \"<main.hs>\"", ""]]
Thu Mar 19 09:50:20 2020:["<---(stderr)", 4, "haskell", ["> cabal: Unknown target", ""]]

If there's something more to specify cabal but not the target that would help then I'm game (I don't see that in the hie-bios docs) but there doesn't seem to be any issue in determining to use cabal, just in getting the right target.

@sebeaumont
Copy link

I'm seeing Message: user error ('none' cradle is not yet supported) with a suitable hie.yaml for our very large monorepo with many non-haskell trees.

@mpickering
Copy link
Contributor

I'm seeing Message: user error ('none' cradle is not yet supported) with a suitable hie.yaml for our very large monorepo with many non-haskell trees.

That would be because the none cradle is not supported yet (and I have no immediate plans to work on it). You don't need it normally, it sounds like you are using the CLI to test?

@sebeaumont
Copy link

sebeaumont commented Mar 19, 2020

Yes indeed -- I run up the cli just to make sure stuff is working -- I have to generate the hie.yaml as our repo is so large -- I'm now working with it behind lsp in emacs.

I'd assumed that none: => dont' even look in here... it's just not haskell.

@sebeaumont
Copy link

sebeaumont commented Mar 19, 2020

Does the multi version take a performance penalty (vs the current version) when being used on a single component project?

I'm seeing huge resident sets (8Gb on the ghcide project itself) and very slow response times.

@mpickering
Copy link
Contributor

Does the multi version take a performance penalty (vs the current version) when being used on a single component project?

It is possible, what are you observing?

@sebeaumont
Copy link

Resident set size in excess of 8Gb and response time for type hovers > 3 secs when working with the ghcide codebase (stack built) -- I've just re-installed the head version and ghcide is back around 2Gb res and response times are acceptable on the same codebase.

@mpickering
Copy link
Contributor

That doesn't sound normal, perhaps it is the same issue as @fendor reported with stack not returning all targets. Do you observe the same with cabal?

@runeksvendsen
Copy link

I just want to report that the mpickering/wip/multi branch (1f64d52) works perfectly for a project (runeksvendsen/crypto-orderbook-db@1c2d760) that contains two Main modules as long as I create a hie.yaml file that mirrors the output of stack ide targets (along with the component path):

$ stack ide targets
crypto-orderbook-db:lib
crypto-orderbook-db:exe:crypto-orderbook-db
crypto-orderbook-db:exe:crypto-orderbook-db-create-tables
crypto-orderbook-db:test:crypto-orderbook-db-test

$ cat hie.yaml
cradle:
  stack:
    - path: "./src"
      component: "crypto-orderbook-db:lib"
    - path: "./exe/app"
      component: "crypto-orderbook-db:exe:crypto-orderbook-db"
    - path: "./exe/create-tables"
      component: "crypto-orderbook-db:exe:crypto-orderbook-db-create-tables"
    - path: "./test"
      component: "crypto-orderbook-db:test:crypto-orderbook-db-test"

However, if I remove the above hie.yaml file, nothing works because Stack complains that it doesn't know which main module to load:

ghcide version: 0.1.0 (GHC: 8.6.5) (PATH: /Users/runesvendsen/.local/bin/ghcide) (GIT hash: 1f64d523807b62dc53e1fbafb69ddd3068dc0fe7)
Starting LSP server...
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.00s
[DEBUG] Set files of interest to: [NormalizedFilePath "/Users/runesvendsen/code/crypto-orderbook-db/src/CryptoDepth/OrderBook/Db/Insert.hs"]
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
[INFO] Opened text document: file:///Users/runesvendsen/code/crypto-orderbook-db/src/CryptoDepth/OrderBook/Db/Insert.hs
Shelling out to cabal "/Users/runesvendsen/code/crypto-orderbook-db/src/CryptoDepth/OrderBook/Db/Insert.hs"
[DEBUG] Finishing shakeRun (took 0.04s, exception: AsyncCancelled)
[DEBUG] Starting shakeRun (aborting the previous one took 0.00s)
Shelling out to cabal "/Users/runesvendsen/code/crypto-orderbook-db/src/CryptoDepth/OrderBook/Db/Insert.hs"
> 
> * * * * * * * *
> The main module to load is ambiguous. Candidates are: 
> 1. Package `crypto-orderbook-db' component crypto-orderbook-db:exe:crypto-orderbook-db with main-is file: /Users/runesvendsen/code/crypto-orderbook-db/exe/app/Main.hs
> 2. Package `crypto-orderbook-db' component crypto-orderbook-db:exe:crypto-orderbook-db-create-tables with main-is file: /Users/runesvendsen/code/crypto-orderbook-db/exe/create-tables/Main.hs
> You can specify which one to pick by: 
>  * Specifying targets to stack ghci e.g. stack ghci crypto-orderbook-db:exe:crypto-orderbook-db
>  * Specifying what the main is e.g. stack ghci --main-is crypto-orderbook-db:exe:crypto-orderbook-db
>  * Choosing from the candidate above [1..2]
> * * * * * * * *
> 
> <stdin>: hGetLine: end of file
> Specify main module to use (press enter to load none): 
> /Users/runesvendsen/code/crypto-orderbook-db/.stack-work/install/x86_64-osx/80053b8432bd9a2c1f405623d8ccc3c4be9488be129fe93d5cc8703371d84083/8.6.5/pkgdb:/Users/runesvendsen/.stack/snapshots/x86_64-osx/80053b8432bd9a2c1f405623d8ccc3c4be9488be129fe93d5cc8703371d84083/8.6.5/pkgdb:/Users/runesvendsen/.stack/programs/x86_64-osx/ghc-8.6.5/lib/ghc-8.6.5/package.conf.d
[DEBUG] Cancelled request IdInt 2

@mpickering
Copy link
Contributor

@runeksvendsen That is expected behaviour currently, thank you for the report.

@gvolpe
Copy link

gvolpe commented Mar 23, 2020

Thanks for working on this @mpickering ❤️

Do you think this could be merged in its current state or is there something critical stopping you from doing it? User reports seem to be quite encouraging :)

@mpickering
Copy link
Contributor

@gvolpe I need to discuss with the maintainers about the implementation and also fix a regression to do with reloading when dependencies change. There's nothing stopping you using the branch.

@gvolpe
Copy link

gvolpe commented Mar 23, 2020

Thanks @mpickering

There's nothing stopping you using the branch.

Well, there is 😄 ...

I installed it using ghcide-nix. If I build it from source, I find a few other issues... I can live without it for now, anyway.

@alanz
Copy link
Collaborator

alanz commented Mar 23, 2020

There's nothing stopping you using the branch.

FYI this branch (rebased) is also exposed via https://github.com/alanz/haskell-language-server/tree/multi-experimental

@mpickering
Copy link
Contributor

mpickering commented Mar 24, 2020

TODO:

  • Add back support for cradle dependencies by rewriting some of the caching logic into shake rules.
  • Always add the file which caused the query to the HscEnv map.
  • Rewrite the GetDependencies rule to only parse the module header, and not depend on HscEnv.

@cocreature
Copy link
Collaborator Author

Closing in favor of #522

@cocreature cocreature closed this Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.