-
Notifications
You must be signed in to change notification settings - Fork 206
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
Conversation
There was a problem hiding this 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") |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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
totrigger the build.