* Delete unused package dependencies
* Eliminate the use of pretty
* Don't export some things that weren't necessary
* Add a missing dependency
* Avoid reexporting files of interest methods
* Put toIdeResult back
* Move prettyPosition over to a more sensible place
* Avoid some pretty printing
* Remove duplicate methods and switch to having a function to get the logger handle
* Remove unncessary bits of the logger
* Remove reportSeriousErrorDie - was unused
* Rename the Logger methods to Logger rather than Handle
* Delete the unique supply
* Decrease the use of getServiceEnv
* Move getIdeOptions inside Service
* Add getFilesOfInterest rule
* Hide the existence of Env
* Inline some redundant forwarding methods
* Add a FIXME for a dodgy function
* Delete some redundant imports
* Rename Map to HMap, since I need to use Data.Map too
* Make the Shake-specific Diagnostics functions into that module
* Delete errorDiag which was unused
* Inline the diagnostic function, since it had one user
* Add ofInterest rule as a separate module
* Sort the exposed modules
* Fix up the demo
* Make sure you add the OfInterestVar global
* HLint
* Get rid of some of interest stuff in other places
* Remove the OfInterest stuff from Service
* Delete LoadPackageResult, was unused
* Delete tmrOccEnvName from Compile
* Push orphan instances around a bit, avoiding some
* Make convertModule take an explicit filename to report against (since we have a good one in our hands)
* Get rid of GhcModule - only one field was ever used
* Collapse setVritualFileContents and removeVirtualFile into one
* Make the VFSHandle abstract
* Make it clear runGhcSession does not need IdeOptions
* Avoid passing around IdeOptions so much when they aren't required
* Get rid of runGhcSessionExcept
* Make catchSrcErrors be in Either, not ExceptT
* Don't import ExceptT qualified
* Don't import Exception qualified
* Rewrite and simplify computePackageDeps
* Delete the entirely unused reflow function
* Don't have Data.Text.Prettyprint.Doc.Syntax reexport stuff
* Move most of the pretty printing inside hie-core
* Get rid of the prettyprinter-syntax dependency from hie-core
* Get rid of prettyprinter-syntax, by collapsing the one definition into DA.Pretty
* Update the hie-bios commit SHA
* Also update the SHA in our bazel WORKSPACE
* Update the hash too
* Tutorial for Emacs integration
* Update hie-bios patch
* Move the span related functionality to one place
* Fuse docHeaders away
* Decouple AtPoint from the rest of the rule database, simplifying the dependencies
* Move the import related functionality to one place
* Move all the closely tied to GHC modules together
* Rename the Logger module
* Push the other module renames through the code base
* Rename Development.IDE.State to Development.IDE.Core
* Rename Functions.Compile to Core.Compile
* Fix up some module names
* Cut down on non-sensicle exports
* Don't worry about setting source - no one uses it
* Reorder the module header
* Give more sensible names to the diagnostic creating functions
* Use more appropriate diagnostic functions
* Simplify the internal diagnostic creations
* Rewrite the diagnostics to go direct, not via GHC error types
* Remove redundant dflags from some functions
* Make sure the warning vs error distinction remains
* Remove unnecessary extensions
* Make atPoint generate either haskell or daml syntax, depending on options
* Get rid of data HoverText
* Move VirtualResource out from hie-core
* Rename hie-core to the right name
* Drop Types.LSP, merge it into LSP.Protocol
* Remove orphans that aren't actually used in our code
* Delete redundant newlines
* Add a defaultIdeOptions function
* Move ideTryIOException over to its one user
* Delete unused exports
* Delete the ProjectDiagnostic newtype - the type index was always Key
* Don't reexport position information from Diagnostic
* Delete the unused bits from Location
* Delete unused stuff from getSrcSpan
* Move URL stuff into Location from Diagnostic
* Remove unnecessary CPP
* Remove unnecessary extension
* Change from stage being polymorphic to being a Text
* Fix up the test suite too
* Push the cleanup to the edges
* More dependencies
* Patch up the tests now they need to find the type signature inside a ```daml block
Handle is kind of a mess at the moment, this is a first step towards
cleaning it up:
1. We had two functions called getDalfDependencies with one wrapping
the other. This PR merges them into one to make this less confusing.
2. buildDar called runAction a bunch of times directly and via other
functions. This PR switches it to use a single call to runAction.
3. The logic for turning a Maybe into an `ExceptT [FileDiagnostic]`
was duplicated in various places. This PR factor out the logic into a
single function.
There is certainly more cleanup to be done (e.g., I don’t think
ExceptT buys us anything here, that module should probably die
completely with the logic being moved to other modules, …) but I’d
like to do it incrementally.
Previously we had a weird mix of using ExceptT to shortcircuit on
failed dependencies where the list of diagnostics was always empty and
throwing BadDependency exceptions.
This PR switches everything over to use BadDependency for failed
dependencies and removes a lot of conversions from one style to the
other.
* Make runActions return Return as soon as results are available
Previously, we were waiting for all rules to finish, in particular the
ofInterestRule. That doesn’t really make any sense, e.g., a goto
definition request should not be waiting for all scenarios to run.
The next step will be to change the LSP side such that requests and
notifications are processed in parallel where possible.
* language: feature: initial implementation of a 'migrate' command
We add a 'migrate' command to daml assistant that generates a project
that allows to migrate contract instances from package1 to package2.
This first version reads both package1 and package2 from source. As a
next step we read only the dalfs from package1, because it might have
been created with a different compiler.
* Add more package.json attributes
* Rename ide-demo to haskell-ide-core
* Change the default flags for the IDE
* Update the README with how to install things
* Move getFilesOfInterest into the IDE, and OfInterest out into DAML
* Have the IDE mode kick all active files each time
* Add a missing .cabal dependency
* Add a missing dependencies
* Use the right thing, if any files have parse errors, then don't worry
* Print messages to stderr rather than stdout
* Add a big warning that writing to stdout is a bad plan
* Move Definition and Hover over to IDE.LSP
* Copy LanguageServer over to IDE Core, not ideal, but hard to abstract right now
* Warn that there are two copies of a given module
* Move printing out the SDK version out of language-server
This implements part 2 of #1507 and fixes the daml-ghc-test-dev test
suite on Windows (not enabled on CI due to GRPC issues).
I have also tested this in the IDE on Windows and Linux.
This implements step 1. from #1507 and also adds a test that uses an
insane percent-encoding to verify that we can handle that.
I also tested this in the IDE on Windows and Linux.
Previously we had two layers of indirection:
In the compiler we emitted Event, we then translated this to
ClientNotification which was then translated to
FromServerMessage.
Apart from being confusing and convoluted this also resulted in us
doing the conversion to generic LSP types too late so we had scenario
specific code in places where it shouldn’t be.
This PR removes the indirection and just uses FromServerMessage
directly.
* Up-(actually down-)grade to ghc-lib-8.8.0.20190610
* A `#ifndef GHC_STABLE` removed. `ml_hie_file` must be set unconditionally
* Pass Opt_WriteHie in xFlagsSet
* Oops. Revert. This breaks Windows. Very confusing
* Disable test; track in issue https://github.com/digital-asset/daml/issues/1582
* Remove Opt_WriteHie flag (Causes test failures trying to write into a read-only filesystem in CI)
Ironically `managed` didn't turn out to make our code more manageable
and we ended up mostly using it in very isolated places only to then
immediately convert it back to bracket-style functions using `with`.
This PR also removes the use of `managed` from the GcpLogger which was
the only other place where we are using it and it finally kills the
rather silly logic that starting up the scenario service was tied to
having an event logger.
The details are described in a comment but the short story is
that a roundtrip Uri -> FilePath -> Uri necessarily loses information
on which characters were escaped. The long-term solution here is to
avoid this roundtrip altogether but this at least fixes the issue for
now.
* Use haskell-lsp’s builtin VFS in "damlc ide"
haskell-lsp has a builtin VFS that it updates automatically on the
corresponding requests. This PR removes our own VFS implementation and
uses that builtin VFS in "damlc ide". To allow the use of functions
like setBufferModified (we use that heavily in daml-ghc-shake-test-ci)
without having to spawn an LSP server, we also add a fallback where we
spin up our own LSP implementation.
* Upgrade to ghc-lib-0.20190531
* Listen up Wally, Remove redundant commented code!
* Argh! WhattamistakeAtomakeA!
* Whitespace to force Azure pipeline to reconsider ignoring this PR
* Repackage ghc-lib, update SHAs and push again
* Refer to a non-existent release as an experiment
* Put the release number back
* Fix build of haskell-ide-core-public