Commit Graph

30 Commits

Author SHA1 Message Date
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Moritz Kiefer
58c101c3ab
Mark lsp tests as flaky on Windows (#4906)
:sadpanda:

changelog_begin
changelog_end
2020-03-09 16:53:36 +01:00
Moritz Kiefer
1dc40ca239
Support multiple-packages in damlc ide (#4445)
* Support multiple-packages in `damlc ide`

changelog_begin

- [DAML Studio] You can now open DAML Studio in the root of a
  multi-package project instead of opening it separately for each
  package. Take a look at the documentation for details on how to set
  this up.

changelog_end

There are a few caveats here:

1. You need a ``daml.yaml`` in the root of your project directory. I
think this is somewhat sensible but we should add a warning to VSCode
if you open it in a directory that does not have a ``daml.yaml`` (in a
separate PR).

2. Changes are not picked up accross dependencies. This is a larger
undertaking and given the current setup simply impossible (we don’t
know that the source files of one package belong to the DAR referenced
in the ``dependencies`` field of the other package. We can make this a
bit better by at least detecting that the ``.dar`` has changed but
let’s do that separately.

3. Since ``daml init`` runs once on startup, it will run in the root
directory instead of initializing the package db of the individual
packages. This is fixable but will conflict with #4391 so let’s
address this separately.

I’ve added docs to the daml studio section that explain the caveats.

* Use the proper sdk version in lsp-tests
2020-02-10 12:20:56 +00:00
Moritz Kiefer
93d7b1a472 Bump ghcide to fix GHC panics in LSP tests (#4176)
fixes #4152

changelog_begin
changelog_end
2020-01-24 08:40:57 +00:00
Moritz Kiefer
57d0e32c3e
Mark lsp-tests as flaky (#4158)
This makes me a :sadpanda: but until we have figured out what is going
on, this seems better than forcing manual restarts.

changelog_begin
changelog_end
2020-01-22 16:55:44 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Moritz Kiefer
d675156e2c
Bump ghcide to fix flakiness in LSP tests (#3813)
fixes #3821

see https://github.com/digital-asset/ghcide/pull/235 for the actual
fix, I’ll change the commit before merging.
2019-12-12 17:11:35 +01:00
Moritz Kiefer
d6bf6f6c04 Mark lsp tests flaky (#3818) 2019-12-11 14:10:48 +00:00
Andreas Herrmann
f4d0eb636e Replace Hazel by stack_snapshot (#2743)
* Unmangled libz.so and libbz2.so

* Use stack_snapshot instead of Hazel

* Remove Hazel

* Define stack_snapshot

* Update rules_haskell

* Document stack_snapshot

* Clean stack's lock file from aborted builds
2019-11-22 14:24:08 +00:00
Moritz Kiefer
f7befca723
Get ghcide from the new upstream repo (#2867)
* Get ghcide from the new upstream repo

* Update azure-pipelines.yml

Co-Authored-By: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2019-09-11 08:57:48 +02:00
Moritz Kiefer
d2b68d45d4 Rename hie-core to ghcide (#2820)
* Rename hie-core to ghcide

The name `hie-core` has caused a lot of confusion as to how we relate
to haskell-ide-engine so changing it should hopefully help with that.
I also think that ghcide is still a good name once we hopefully
integrate with haskell-ide-engine more closely.

The name ghcide seems to have a reasonable amount of support on
Twitter https://twitter.com/ndm_haskell/status/1170681262987710464
which is of course the only good way to come up with names.

* Add a readme that points people to the new directory.

* Fix bogus replacements

* Use a proper link

* links are hard
2019-09-09 13:55:16 +00:00
Andreas Herrmann
ed39800a9f Rename hazel_deps to hackage_deps (#2789)
* hazel_deps --> hackage_deps

Mechanical change:

```
sed -i 's/hazel_deps/hackage_deps/g' $(ag -l hazel_deps)
```

* Hazel dependencies --> Hackage dependencies
2019-09-06 09:01:09 +00:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
Moritz Kiefer
2b690fd420 Increase timeout on lsp-tests (#2478)
Now that they are no longer marked as flaky on Windows, we seem to be
hitting the actual Bazel timeout sometimes.
2019-08-09 15:32:32 +00:00
Moritz Kiefer
d388c5692b
Upgrade haskell-lsp and lsp-test (#2474)
* Upgrade haskell-lsp and lsp-test

There have been some fixes upstream that should hopefully mean that we
no longer need to mark the lsp-tests as flaky on Windows. I am having
trouble reproducing the flakiness locally, so let’s see what happens
on CI.

* Also bump stack.yaml
2019-08-09 15:09:59 +02:00
Andreas Herrmann
e2a424e5fc hie-core/test: Dedicated test suite for hie-core (#2243)
* hie-core/test: Dedicated test suite for hie-core

* Apply hlint suggestion

Use System.Environment.Blank's setEnv which has a non-overwrite mode
that implements precisely what we were doing with more code before.

* buildifier fixes

* hie-core-exe works on Windows now - ghc-paths was fixed
2019-07-22 13:42:04 +00:00
Shayne Fletcher
dcd20ace8a Daml hlint integration (#2115)
* Get draft rule in

* Hlint is now firing

* First hlint unit test

* This gets hlint working in the ide

* Select hlint.yaml contextually. Wip

* Fix prod path

* Switch between prod and test versions of hlint.yaml

* Format

* Ignore hlint hints in the language tests

* Add some debugging stuff. LSP stress test is broken

* Update compiler/damlc/daml-ide-core/src/Development/IDE/Core/Rules/Daml.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Tidy up some details

* Simplify settings (remove unused parseFlags)

* Fix LSP stress tests

* ./fmt.sh

* Collapse to one hlint.yaml, provide options

* Fix location of hlint runfiles

* Disable hlint by default; enable for shake-ide tests

* lint (ironic)

* Remove filtering of lints from integration test

* ./fmt.sh

* Respect the flag

* Silence opininated lint

* Update compiler/damlc/daml-opts/daml-opts-types/DA/Daml/Options/Types.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update compiler/damlc/lib/DA/Cli/Damlc.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* I really did mean optHlintEnable here

* Move hlint enabled check to ofInterest like shouldRunScenarios

* Rename variable

* Cache settings

* Missed a merge conflict

* lift liftIO

* Remove the hlint-testing POC

* use useNoFile_
2019-07-12 16:17:06 +00:00
Moritz Kiefer
2371d173b1
Move all damlc tests to compiler/damlc/tests (#2057)
I’ve also changed some of the names to be more sensible.
2019-07-09 13:38:58 +02:00
Moritz Kiefer
edff8a416d
Move files in daml-foundations/daml-ghc to compiler/damlc (#2037)
* Move files in daml-foundations/daml-ghc to compiler/damlc

There is also a bit of refactoring going on to actually split things
apart into sensible targets. What is still missing is a cleanup of the
module hierarchy and a cleanup of the test targets but I’ll leave
those for separate PRs.

As a nice bonus, this also reduces dependencies between targets so it
will speed up compiles.

* Update .hie-bios
2019-07-08 17:55:51 +02:00
Moritz Kiefer
bb3a98bf61
Move code in daml-tools outside of daml-foundations (#2033) 2019-07-08 11:40:48 +02:00
Andreas Herrmann
93d8e01db2
Update rules_haskell and static GHC (#1515)
* Update rules_haskell and static GHC

Remove patches that have been upstreamed or are no longer required.
Update still required patches to match the new rules_haskell version.

Previously we patched rules_haskell to coerce GHC into using static
Haskell libraries in most places. In particular we moved hs-libraries
entries into extra-libraries entries in the package configuration files.
A much cleaner approach is to compile GHC with a static RTS, then GHC
will by itself choose to load static Haskell libraries.

* Remove haskell_cc_import

* da-hs-daml-cli -> daml-cli

* da-hs-damlc-app -> damlc-app
2019-07-01 13:26:19 +02:00
Andreas Herrmann
9da78116d6 Mask async exceptions in updateFileDiagnostics (#1944)
* Mask async exceptions in updateFileDiagnostics

* lsp-tests remove flaky flag
2019-07-01 07:14:31 +00:00
Moritz Kiefer
7725d25a41
Mark lsp-tests as flaky (#1891) 2019-06-26 14:05:12 +02:00
Neil Mitchell
3e1083e1fe Rename haskell-ide-core to hie-core (#1809)
* Rename haskell-ide-core as hie-core, after discussions with Alan Zimmerman and others

* Update the readme to just say how to install
2019-06-21 17:07:09 +00:00
Moritz Kiefer
3a1a469453
Mark lsp-tests as flaky on Windows (#1782) 2019-06-20 15:49:35 +02:00
Moritz Kiefer
8029080fc7
Use FromServerMessage directly (#1583)
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.
2019-06-11 16:03:44 +02: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
1f8c273263
Move diagnostic tests from language-server-tests to new lsp-tests (#1554) 2019-06-07 15:34:42 +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
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