-
Notifications
You must be signed in to change notification settings - Fork 95
Locate Documentation html page using Haddock interface file #861
Locate Documentation html page using Haddock interface file #861
Conversation
This seems like the correct approach, but I'm a bit concerned about reading the interface file on each hover. Perhaps we should have a global |
afaik tooltip is not generated per mouse hover but once per opened .hs file/module. I was concerned too that reading all interface files in advance can be a bottleneck but it looked fast enough to me, I didn't profile memory though, should be OK as it retains only paths to html doc files in memory not the whole interface data structure |
Neither. |
I don't think we need a shake rule, since nothing has a 'dependency' on this, and nothing has to be recomputed if we read in an interface file. An |
accidentally closed because of force-push, reopening |
2e35f73
to
cfdfcf9
Compare
is it OK to cache locations of all names from haddock interface files, or only names that are actually used in the code |
I think we should cache the complete |
@wz1000 do you mind if I partially revert #875 to bring GhcMonad back to Documentation? I need it to use As Session.hs already mentions it's probably because "It's important to keep the same NameCache though for reasons that I do not fully understand" - and neither do I |
You can use the NameCache in ShakeExtras? |
haddock-api doesn't compile in ghc-lib
….0 for everything else
8.6: haddock-api-2.22.* haddock-library-1.7.* There are two ways to solve it:
I like the second option more, because haddock-api usage is very limited but had to resort to a nasty hack as I couldn't find a clean way to use two versions of same package in stack.yaml. Is it possible to do at all ? P.S. In fact, 8.10 here uses |
Also 8.10-windows build is flaky now (I saw it red and green with no code change, with both compilation or test errors) Apart that it's ready for review |
-- Exposed for testing. | ||
Q(..), | ||
Q(..), |
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.
trimming whitespace needed
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.
the project has a .editorconfig
that enforces that, do you have installed the needed plugin in your editor to honour it?
It saves a lot of time fixing those little things automatically.
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.
thanks for the hint
stack-ghc-lib.yaml
Outdated
- github: haskell/haddock | ||
commit: 1f704e30d5f40fa5113045b252c0e48aebd842be | ||
subdirs: | ||
- haddock-api |
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.
Why and how long do we need this custom version of haddock-api? I'm not keen on merging as it will prevent a Hackage release
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 was removed from stack-ghc-lib.yaml - haddock-api uses ghc and can't be used from ghc-lib mode anyway (still uses old documentation lookup).
similar workaround with github dependency still there in stack-810.yaml: haddock-api-2.24.0 from hackage doesn't compile with haddock-library-1.9.0 although it should.
Same for 8.6 (stack.yaml)
This is easy to fix by making a new release of haddock-api upstream, but I'm not sure if that's the best way to go because it also will lock us with separate versions of haddock-library
per GHC version
Which of these two options is compatible with uploading a package to Hackage that builds with GHC 8.6.x, 8.8.x and 8.10.x? |
First option is definitely feasible, but according to haddock's README the second option looks more correct:
First is easy to do: just need to release latest commits of upstream Second option also requires upstream release of mentioned |
@DunetsNM I would go to use each combination of
cabal/stack should pick the correct version based on base library bounds. And create a special module Not sure if i fully understand your proposals but i think it is your first option. Forks from official libraries should be avoided imo, moreover if they are established and widely used ones. A new package ( |
@jneira correct, this is my first option. OK I'll proceed with it then. |
Does not work reliably on all platforms. Reenable when haskell#861 lands
Does not work reliably on all platforms. Reenable when haskell#861 lands
Does not work reliably on all platforms. Reenable when haskell#861 lands
* Add github test action * Disable unreliable test Does not work reliably on all platforms. Reenable when #861 lands * Add hlint and -Werror * Explicit timeout 6h is the default and also the maximum: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration * Experiment tests to use Cabal instead of Stack * Fix an unreliable test * Trim down matrix * Add ghc-lib to the test matrix * Address broken hie-compat ghc-lib build * Drop stack descriptor family We keep two stack descriptors: - One for Nightly - One for Windows (stuck in GHC 8.10.1) To ensure that `stack test` doesn't break, we keep running the stack tests in CI * Update README to point end users to HLS * Drop support for `stack test`
The ghcide Github project is becoming archived and merged into https://github.com/haskell/haskell-language-server This PR will need to be reopened in the HLS repo. To do that, create a new branch from HLS HEAD in your HLS repo and do:
Thanks! |
* Add github test action * Disable unreliable test Does not work reliably on all platforms. Reenable when haskell/ghcide#861 lands * Add hlint and -Werror * Explicit timeout 6h is the default and also the maximum: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration * Experiment tests to use Cabal instead of Stack * Fix an unreliable test * Trim down matrix * Add ghc-lib to the test matrix * Address broken hie-compat ghc-lib build * Drop stack descriptor family We keep two stack descriptors: - One for Nightly - One for Windows (stuck in GHC 8.10.1) To ensure that `stack test` doesn't break, we keep running the stack tests in CI * Update README to point end users to HLS * Drop support for `stack test`
* Add github test action * Disable unreliable test Does not work reliably on all platforms. Reenable when haskell/ghcide#861 lands * Add hlint and -Werror * Explicit timeout 6h is the default and also the maximum: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration * Experiment tests to use Cabal instead of Stack * Fix an unreliable test * Trim down matrix * Add ghc-lib to the test matrix * Address broken hie-compat ghc-lib build * Drop stack descriptor family We keep two stack descriptors: - One for Nightly - One for Windows (stuck in GHC 8.10.1) To ensure that `stack test` doesn't break, we keep running the stack tests in CI * Update README to point end users to HLS * Drop support for `stack test`
* Add github test action * Disable unreliable test Does not work reliably on all platforms. Reenable when haskell/ghcide#861 lands * Add hlint and -Werror * Explicit timeout 6h is the default and also the maximum: https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration * Experiment tests to use Cabal instead of Stack * Fix an unreliable test * Trim down matrix * Add ghc-lib to the test matrix * Address broken hie-compat ghc-lib build * Drop stack descriptor family We keep two stack descriptors: - One for Nightly - One for Windows (stuck in GHC 8.10.1) To ensure that `stack test` doesn't break, we keep running the stack tests in CI * Update README to point end users to HLS * Drop support for `stack test`
alright, will take a look after the holidays. This PR is still blocked by upstream haddock which seems to lack ownership so not sure when that can be merged anyway. |
A WIP for #860 , not ready for review
So far can make it work only for GHC 8.10.2 , having issues with
haddock-api
in other versions.