Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get haskell-ide-core to work on our codebase #1692

Merged
merged 2 commits into from
Jun 16, 2019
Merged

Get haskell-ide-core to work on our codebase #1692

merged 2 commits into from
Jun 16, 2019

Conversation

cocreature
Copy link
Contributor

This is still quite rough but it does seem to work sometimes™

Pull Request Checklist

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

@cocreature cocreature requested a review from ndmitchell June 16, 2019 12:22
Copy link
Contributor

@ndmitchell ndmitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@@ -0,0 +1,95 @@
load("@io_tweag_rules_haskell//haskell:haskell.bzl", "haskell_library")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we're going to fix this upstream?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully but it’s somewhat tricky to do, I already opened an upstream issue about this a while back tweag/rules_haskell#720

@@ -0,0 +1,3 @@
#!/bin/sh
bazel run --define hie_bios_ghci=True //daml-foundations/daml-tools/da-hs-damlc-app:da-hs-damlc-app@ghci | sed "s/'//g" | sed "s/-qg//g" | sed "s/+RTS.*-RTS//" | sed "s|/bazel-out|bazel-out|g" | sed "s/-fexternal-interpreter//g"
echo -idaml-foundations/daml-ghc/ide/src -icompiler/scenario-service/client/src -icompiler/daml-lf-ast/src -icompiler/haskell-ide-core/src -idaml-foundations/daml-ghc/ghc-compiler/src -icompiler/daml-lf-proto/src -idaml-foundations/daml-ghc/ghc-compiler/src -ilibs-haskell/da-hs-base/src -ilibs-haskell/bazel-runfiles/src -icompiler/daml-lf-tools/src -ibazel-out/k8-fastbuild/genfiles/daml-lf/archive -ilibs-haskell/prettyprinter-syntax/src -ibazel-out/k8-fastbuild/genfiles/compiler/scenario-service/protos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does da-ghci get its list of include files from? Do we have this list hardcoded twice? (Not that that is a problem - I'd rather it zero - but if not, two is fine)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

da-ghci lists all files explicitly rather than going via include paths. I’ve talked to @aherrmann-da about this and it looks like we can probably change that at which point we can just reuse that.

index 4746d3c..2c836f7 100644
--- a/haskell/repl.bzl
+++ b/haskell/repl.bzl
@@ -296,7 +296,7 @@ def _create_repl(hs, ctx, repl_info, output):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks reasonable for upstreaming - I assume that's the plan?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, just wanted to get something working for now.

@cocreature cocreature merged commit 5b0faea into master Jun 16, 2019
@dasormeter dasormeter deleted the hie-bios branch September 4, 2019 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants