Commit Graph

90 Commits

Author SHA1 Message Date
Shayne Fletcher
c8783d08bb Upgrade hlint (#2406)
* Upgrade hlint

* Reduce duplication
2019-08-05 18:45:31 +00:00
Rohan Jacob-Rao
e6a4d8b251
New template desugaring (#2178)
* Update ghc-libs to use new template desugaring
* Replace old template typeclasses with generic-friendly ones
* New template desugaring doc
* Fix tests
* Fix damldoc tests regarding Archive choice
* Update visualisation code to not traverse master dictionary
* Additional class method stubs to template instance declaration for upgrades
* Increase stack limit for bond trading compilation test
* Update hlint version
2019-07-30 19:49:33 -04:00
Shayne Fletcher
b3dac78e66
hlint.yaml => dlint.yaml; globally disable "use newtype" hint (#2341) 2019-07-30 14:39:46 -04:00
Shayne Fletcher
ee5079d9d3 Ghc lib 8.8.0.20190723 (#2279)
* Upgrade ghc-lib

* Patch bazel_tools : hazel-include-paths patch, no-isystem patch.

* Provide "haskell_c2hs" for package name to cabal_haskell_package

* Package name haskell_c2hs => c2hs.

* Switch to less hacky patch for include dirs
2019-07-25 08:59:34 +00:00
Shayne Fletcher
b4b54c0801 Switch to the digital asset hlint fork (#2254) 2019-07-23 05:26:17 +00:00
Shayne Fletcher
743ac83e05
Upgrade hlint (#2235) 2019-07-22 05:48:58 -04:00
Moritz Kiefer
623e641ec9
Wait for child process to exit in the daml assistant and daml-helper (#2162)
fixes #2142

It turns out that typed-process has the behavior we want so rather
than rolling our own version of `withCreateProcess`, I just switched
to that.
2019-07-16 18:21:00 +02:00
Shayne Fletcher
5d9561b3cd hlint upgrade (#2158) 2019-07-16 14:20:28 +00:00
Andreas Herrmann
80c449d155
Update rules_haskell (#2105)
Support for static GHC has been merged upstream.
2019-07-11 12:50:26 +02:00
Shayne Fletcher
b6daa2defa Get hlint into the build system (#2039)
* Get hlint into the build system

* Required running fmt.sh

* Restore accidentally deleted line
2019-07-08 17:37:56 +00:00
Moritz Kiefer
bb3a98bf61
Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Shayne Fletcher
f7657159e4 ghc-lib-8.8.0.20190704.selective-optimizations-off (#2023) 2019-07-05 14:10:05 +00:00
Andreas Herrmann
df7bff6288 Update to bazel-0.27 (#1957)
* Bazel: 0.24.0 -> 0.27.0

* Update rules_haskell for Bazel 0.27 compatibility

* Update bazel-deps and bazel-watcher

* Windows escape JVM flags

* load commands at top of .bzl file

Bazel 0.27 no longer allows load commands that are not at the beginning
of the file.

* Update Bazel rules

* subpackage boundary

* native is not defined in BUILD files

* yarn: @bazel/hide-bazel-files

Seems to be required since latest rules_nodejs version. Otherwise, yarn
fails with errors about existing BUILD or BUILD.bazel files.

* grpc-java plugin visibility

* Update fat_cc_library

* Nix Python3 toolchain

* Iteration over depset

* dev_env_package: Create symlinks one level deeper

To prevent symlinking the BUILD file as well. The nested BUILD file
confuses Bazel as of 0.27 and rules_nodejs cannot find the node
executable anymore.

* Update rules_nodejs

* Add managed_directories for node_modules

* hie-bios: Extract bazel-genfiles from bazel info

Bazel 0.27 changed the genfiles location which breaks the hie-core test
on macOS.

* update cc_wrapper to Bazel 0.27

* bazel info -> bazel info bazel-genfiles

* Fix typo in BUILD

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2019-07-05 14:04:47 +00:00
Moritz Kiefer
c66211d034
Document Haskell profiling and default to -fprof-auto (#1971) 2019-07-02 14:51:09 +02:00
Moritz Kiefer
10d85b214e Remove zip-archive override and upgrade stackage snapshot (#1920)
The override of zip-archive was required at some point because the new
version added additional safety checks that blew up in our tests. The
codepaths affected by this are long gone so let’s just use whatever is
in stackage.

While I was touching packages anyway, I’ve also upgraded to the latest
snapshot in the LTS we are currently following.
2019-06-27 22:47:52 +01:00
Moritz Kiefer
61eace44fe
Switch to nixpkgs-unstable (#1921)
The main reason for doing this is that it saves us the trouble of
having to backport changes, e.g., a newer MacOS toolchain.
2019-06-27 18:47:42 +02:00
Shayne Fletcher
c8e7af5fd8
Update the hie-bios commit SHA (#1825)
* 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
2019-06-22 12:01:44 -04:00
Moritz Kiefer
8272f952b7 Upgrade protobuf (#1781)
* Upgrade protobuf

This fixes the annoying “illegal reflective access” warnings when
using a newer JDK.

* Add release notes
2019-06-20 15:14:30 +00:00
Michał Majcherski
285c766e16
windows: ledger and extractor tests; improved msys2 installation (#1643)
* windows: ledger tests

* windows: extractor tests

* windows: combine msys2 manifest files
2019-06-17 09:40:28 +02:00
Shayne Fletcher
130c51c8f7
update to ghc-lib-8.8.0.20190616 (#1696) 2019-06-16 23:01:39 +02:00
Moritz Kiefer
5b0faea2cf
Get haskell-ide-core to work on our codebase (#1692)
* Get haskell-ide-core to work on our codebase

* Fix ghc-lib-parser on Windows
2019-06-16 15:42:48 +02:00
Moritz Kiefer
c8f9a91a8e
Initial stab at integrating hie-bios (#1685) 2019-06-15 10:29:40 +02:00
Neil Mitchell
d94d46d341 Update to use LSP from github (#1662)
* Update to use LSP from github

* Switch to upstream LSP everywhere
2019-06-14 08:38:29 +00:00
Moritz Kiefer
be974260ce
Normalize percent-encoding in URIs (#1603)
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.
2019-06-12 15:20:23 +02:00
Shayne Fletcher
da88ab0f9d
Up-(actually down-)grade to ghc-lib-8.8.0.20190610 (#1576)
* 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)
2019-06-11 08:58:16 -04:00
Moritz Kiefer
186692813a Move closer to upstream haskell-lsp and lsp-test (#1577)
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.
2019-06-11 07:34:08 +00:00
Moritz Kiefer
d3b33d7c11
Port the remaining tests from language-server-tests to lsp-tests (#1563) 2019-06-08 08:36:27 +02:00
Moritz Kiefer
217c56d072
Add an option to the IDE to disable the scenario service (#1522)
* 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
2019-06-06 12:06:07 +02:00
Martin Huschenbett
468ef3e469
Make it explicit that contract key maintainers are computed from key (#1527)
* Use ghc-lib-0.20190604

* HieFile fix

* Update to ghc-lib-0.20190604.1

* Make maintainers depend directly on key

* Remove useless tests

* Adjust documentation

* Add release notes

* Simplify some code

* Fix tests to use new syntax

* Fix template desugaring docs

* Fix more tests
2019-06-05 10:27:38 -04:00
Moritz Kiefer
93e0653d56
Move us closer to lsp-test upstream (#1523)
Some of my patches have been merged so this rebase our branch on top
of the current HEAD.
2019-06-05 10:17:25 +02:00
Moritz Kiefer
9689f00e58
Initial boilerplate for an LSP-based test suite (#1516)
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.
2019-06-04 20:48:18 +02:00
Shayne Fletcher
4747b1c186
Ghc lib 0.20190531 (#1486)
* 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
2019-06-01 06:48:49 -04:00
Moritz Kiefer
6467a3b5a4
Switch to using haskell-lsp for IO (#1466)
* 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.
2019-05-31 13:53:16 +02:00
Michał Majcherski
9e1c1c82ec
windows: more daml-ghc tests working (#1425)
* windows: more daml-ghc tests working

* windows: increased heap size for bond-trading-memory test
2019-05-28 15:45:38 +02:00
Moritz Kiefer
330ede08b5
Separate diagnostics from rule results (#1423) 2019-05-28 14:18:59 +02:00
Nick Smith
54cfc6d316
Fixes #1340 - Add Scaladocs generation to the Bazel rules. (#1341)
* Fixes #1340 - Add Scaladocs generation to the Bazel rules.
2019-05-27 12:59:19 +02:00
Shayne Fletcher
5ce4b5955e Upgrade to ghc-lib 0.20190523.1 (#1355) 2019-05-23 21:45:51 +00:00
Michał Majcherski
df3e13e3c1 windows: full daml-ghc build and several tests working on windows (#1295) 2019-05-22 20:31:04 +00:00
Neil Mitchell
9e0400f6e1
Add a haskell-ide-core demo project (#1251)
* 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
2019-05-20 16:36:08 +01:00
A. F. Mota
db155477a5
Remove Data.SemVer workaround. (#1246) 2019-05-20 14:38:59 +02:00
Andreas Herrmann
a89cbb2036
Update rules_haskell (#1133)
* 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
2019-05-20 14:20:34 +02:00
Andreas Herrmann
a6809310e8
Update to Bazel 0.24 (#567)
* bazel: 0.23.1 -> 0.24

* bazel-deps: Fix for Bazel 0.24.0

* bazel no longer supports + on dicts

Replace by dict.update.

* Fix junit classpath issue

* azure: Update MacOS image to Mojave

* Windows: --noincompatible_windows_escape_jvm_flags

* rules_scala: Support escape_jvmflags

* rules_scala: separate jvm_flags by TAB

* Document --noincompatible_windows_escape_jvm_flags
2019-05-16 18:04:30 +02:00
Shayne Fletcher
d0edf07d11 Ghc update happy (#1153)
* Add a line for happy

* fix happy hash
2019-05-15 16:46:24 +00:00
Shayne Fletcher
c135ccfa6b Upgrade to ghc-lib-0.20190514.1 (#1139)
* Upgrade to ghc-lib-0.20190514.1

* Whitespace fix.
2019-05-15 06:34:58 +00:00
Moritz Kiefer
ad10f98020
Fix SDK integration tests on Windows (#1125)
* Fix SDK integration tests on Windows

* Switch to Haskell-based tar extraction
2019-05-14 21:55:45 +02:00
Neil Mitchell
41697cecbd
Support CPP in the IDE (#1131)
* Hide ghc-boot by default

* Add support for CPP

* Delete redundant comment
2019-05-14 20:00:19 +01:00
Michał Majcherski
f842ea9a1d
windows: use msys2 provided patch - fixes: #916 (#942) 2019-05-10 12:41:11 +02:00
Shayne Fletcher
80158c451e Update to ghc-lib-0.20190509 (#1064) 2019-05-10 00:50:55 +00:00
Shayne Fletcher
bdee9aaefb Upgrade to ghc-lib-0.20190508 (#1024) 2019-05-08 21:53:55 +00:00
Andreas Herrmann
aa24ae0d2d Update rules_nixpkgs (#980)
Now enforces that nix_file_deps covers all files that are read by Nix.
2019-05-08 08:57:28 +00:00