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.
* 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)
The custom methods changes to haskell-lsp have been merged upstream
and the Windows fixes to lsp-test have been merged as well. I’ll work
on upstreaming the custom methods patches to lsp-test next. After that
we should be in sync with upstream.
* Add an option to the IDE to disable the scenario service
This is useful for several reasons:
1. We currently have to disable all tests using the scenario service
on Windows since they are extremely flaky due to issues we haven’t
been able to solve so far. This allows us to run at least a subset of
tests on CI.
2. The LSP tests currently start a new instance of damlc for each
test (we might want to revisit this but it seems to be sufficiently
fast so far) and not starting the scenario service allows us to speed
things up a bit.
3. On large projects, this could be useful to avoid having the IDE use
up even more memory and speed things up a bit. However, this PR does
not yet expose this in a convenient way so there is more work to be
done (in separate PRs) to make that a viable option.
* Fix LSP tests on Windows
This needs more work but I’d like to get the initial boilerplate in
first. We will also have to make some changes to lsp-test and expand
it in various ways but those should hopefully be upstreamable.
* 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
* Switch to using haskell-lsp for IO
I’ve tried to keep this as small as possible for review so this PR
does not attempt to remove a lot of the things that are now unused.
There is also still a compatibility layer in place to avoid changing
too many things at once.
I tested this in the IDE on Linux and Windows and diagnostics,
scenario results, hover, goto definition all seem to work as expected.
* Demo program for haskell-ide-core as a library
* Fix all warnings in the Demo file
* Build the IDE demo
* Give a better error message than undefined
* HLint
* Fix copyright header
* Sort the dependencies
* Improve the comment
* Bazel formatting
* Disable building on Windows until ghc-paths is fixed
* Bazel formatting
* Specify the main function
* Update rules_haskell
- rules_haskell now handles the global package db within Bazel
https://github.com/tweag/rules_haskell/pull/859
- We no longer use the Nix provided c2hs. So, we drop it.
- Rename `ghcWithC2hs` to `ghcStatic` to clarify that that's where the
static linking patches are applied.
- Extend package-db patches to align Nix store paths with the new $out.
This works around a restriction in current rules_haskell, where
the paths in the package config files must have the same prefix as
the path to the package config files themselves.
- Don't exclude haskell libraries from extra-libraries entries.
* Drop redundant unix-compat override
This is a left-over from when the package was patched.
* Windows GHC bindist includes ffi header
* Drop unused language-c Nix override
* Hazel: Shorten target names
Previously, Hazel would generate library and binary targets, that
repeated the package name in their target name. This easily lead to too
long paths on Windows, which could induce errors with code that did not
use API functions with long path support.
This change modifies Hazel to name the library target "lib" and shorten
the binary target names to "bin" or just the Cabal exe component name.
This change had further reaching consequences, because the package name
in the generated version macros was derived from the library target
name. rules_haskell has been extended to allow to override that default
behaviour.
* data-default: Remove custom build definitions
These had been introduced to resolve issues on Windows due to too long
target names. Hazel has meanwhile been patched to generate such shorter
target names by default, making the custom builds superfluous.
* Hazel: unshorten cbits name
This is a temporary workaround for otherwise clashing cbits library
names in the case of static only linking.
This reverts commit 3d8acde916.
For some reason that commit seems to have resulted in a lot of
"unexpected end of file" errors during cache downloads. I do not know
what is going on here or how to fix it so let’s revert it for now.
This PR copies the hack that I used for the other
data-default-instances-* packages to data-default-instances-dlist. The
exact conditions under which this seems to be required probably depend
on things like your username and the directory of your project which
is why this failed for Neil but not for me.
* Update rules_haskell: Generates version macros
- rules_haskell now generates a version macros header file that is
passed on to preprocessors such as c2hs or hsc2hs.
- The haskell_import rule was also renamed to haskell_toolchain_library.
* Drop unix-compat patch
This was necessary to work around missing version macros.
* Move to using proto3-wire from upstream
* Move to upstream proto3-suite, with some custom patches in my fork
* Delete the BUILD.bazel for hte proto3 stuff, not used and the test was failing
* Delete the old proto3-wire and proto3-suite forks
* Delete proto3-wire
* Prettify BUILD.bazel files, sort the deps
* Remove some special cases from the license checker
* Delete unused Nix files from grpc-haskell
* Switch to upstream proto3-suite
* Make old-time work on Windows
* Formatting
* Patch rules_haskell to use a response file for -optP to avoid overflowing argument size limits on Windows
* Update 3rdparty/haskell/BUILD.old-time
Co-Authored-By: neil-da <35463327+neil-da@users.noreply.github.com>
* Update the comments in old-time
* Use the revised location of proto3-suite
* daml-on-x: Drop StateInit and use AtomicReference
- Drop the StateInit update message and introduce "getLedgerInitialConditions".
- Switch to AtomicReference from SyncVar as this is non-blocking and hence safer to use from Akka.
* ledger/participant-state: Rename recordTimeEpoch to initialRecordTime
and use the time from timeProvider at the ledger object initialization
time as the initial record time.
* fmt
* Fix use of repo as external workspace. Fix compilation issue in IndexState.scala
* Refix the use of this repo as external bazel workspace
* Fix compilation after rebase
* refmt
* Inline c2hs expansion.
* Patch unix-compat for Windows
unix-compat fails on Windows due to missing version macros in hsc files.
This patches unix-compat inlining the effect of the corresponding
version macro evaluation.
* Add grpc-haskell to Windows CI
* Fix formatting
* Move unix-compat.patch
Moved to bazel_tools, where all other Bazel patches reside.
* Remove .chi files
Those don't need to be checked in.
* Add FIXME on checked in c2hs files.
* Remove long gone patch
The "shorten-source-dirs" patch was removed some time ago but was still
referenced in bazel_tools.
* Drop upstreamed rules_haskell patches
Some patches have been upstreamed to rules_haskell.
* Build haskell-ide-core on CI
* Apply buildifier
* Update rules_haskell
The latest version uses stackage's mirror of Hackage.