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

Prepare 0.7.0 release (includes bump ghcide to 0.6.0.1) #658

Merged
merged 25 commits into from Dec 15, 2020

Conversation

jneira
Copy link
Member

@jneira jneira commented Dec 9, 2020

Copy link
Collaborator

@alanz alanz left a comment

Choose a reason for hiding this comment

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

Happy with this, once CI passes

@Ailrun
Copy link
Member

Ailrun commented Dec 9, 2020

Awesome! CI says there is an ambiguity for findCradle, but that's a minor problem.

@jneira
Copy link
Member Author

jneira commented Dec 9, 2020

stack build in circleci using stack-8.8.3.yaml and stack-8.8.2.yaml (but no for stack-8.8.4.yaml) is failing with

Progress 166/173: ghcide ghcide > /root/build/ghcide/src/Development/IDE/Plugin/Completions/Logic.hs:267:5: error:
Progress 166/173: ghcide ghcide >     • Illegal equational constraint NoGhcTcPass pass
Progress 166/173: ghcide ghcide >                                     ~ NoGhcTcPass (NoGhcTcPass pass)
Progress 166/173: ghcide ghcide >       (Use GADTs or TypeFamilies to permit this)
Progress 166/173: ghcide ghcide >     • When checking the inferred type
Progress 166/173: ghcide ghcide >         f :: forall (pass :: Pass).
Progress 166/173: ghcide ghcide >              (Outputable.OutputableBndr
Progress 166/173: ghcide ghcide >                 (NameOrRdrName (IdP (GhcPass (NoGhcTcPass pass)))),
Progress 166/173: ghcide ghcide >               Outputable.OutputableBndr (IdP (GhcPass (NoGhcTcPass pass))),
Progress 166/173: ghcide ghcide >               Outputable.OutputableBndr (IdP (GhcPass pass)),
Progress 166/173: ghcide ghcide >               Outputable.OutputableBndr (NameOrRdrName (IdP (GhcPass pass))),
Progress 166/173: ghcide ghcide >               Outputable (XIPBinds (GhcPass pass)),
Progress 166/173: ghcide ghcide >               Outputable (XViaStrategy (GhcPass pass)),
Progress 166/173: ghcide ghcide >               Outputable (XIPBinds (GhcPass (NoGhcTcPass pass))),
Progress 166/173: ghcide ghcide >               Outputable (XViaStrategy (GhcPass (NoGhcTcPass pass))),
Progress 166/173: ghcide ghcide >               NoGhcTcPass pass ~ NoGhcTcPass (NoGhcTcPass pass)) =>
Progress 166/173: ghcide ghcide >              Maybe Range -> ImportDecl (GhcPass pass) -> Maybe [TextEdit]
Progress 166/173: ghcide ghcide >       In the expression:
Progress 166/173: ghcide ghcide >         let
Progress 166/173: ghcide ghcide >           f (Just range) ImportDecl {ideclHiding}
Progress 166/173: ghcide ghcide >             = case ideclHiding of
Progress 166/173: ghcide ghcide >                 Just (False, x)
Progress 166/173: ghcide ghcide >                   | Set.notMember name (Set.fromList ...) -> ...
Progress 166/173: ghcide ghcide >                   | otherwise -> ...
Progress 166/173: ghcide ghcide >                 _ -> ...
Progress 166/173: ghcide ghcide >           f _ _ = Nothing
Progress 166/173: ghcide ghcide >           src_span = srcSpanToRange . getLoc $ lDecl
Progress 166/173: ghcide ghcide >         in f src_span . unLoc $ lDecl
Progress 166/173: ghcide ghcide >       In an equation for ‘extendImportList’:
Progress 166/173: ghcide ghcide >           extendImportList name lDecl
Progress 166/173: ghcide ghcide >             = let
Progress 166/173: ghcide ghcide >                 f (Just range) ImportDecl {ideclHiding} = ...
Progress 166/173: ghcide ghcide >                 f _ _ = Nothing
Progress 166/173: ghcide ghcide >                 src_span = srcSpanToRange . getLoc $ lDecl
Progress 166/173: ghcide ghcide >               in f src_span . unLoc $ lDecl
Progress 166/173: ghcide ghcide >     |
Progress 166/173: ghcide ghcide > 267 |     f (Just range) ImportDecl {ideclHiding} = case ideclHiding of
Progress 166/173: ghcide ghcide >     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
Progress 166/173: ghcide ghcide > 

As ghcide is not being built with ghc-8.8.3 or ghc-8.8.2 we dont get direct evidence if this error would be reproduced building ghcide standalone 🤔

stack-8.6.5.yaml and stack-8.6.4.yaml had built ghcide succesfully though.

EDIT: github test builds with cabal and ghc-8.8.3 and ghc-8.8.2 has failed with the same error

@jneira
Copy link
Member Author

jneira commented Dec 9, 2020

I've leveraged the new findCradle from the new ghcide session options and replacing hie-bios one with 03bd6d8

@jneira
Copy link
Member Author

jneira commented Dec 9, 2020

Some of nix builds (default, ghc8102) in github are failing with

 building '/nix/store/5iw4gkavrvbyk9kqmfzbrr0mslyd39xa-cabal2nix-haskell-language-server.drv'...
installing
building '/nix/store/z6136irqnsp2qjwdics1aix0y0l0hmc2-cabal2nix-ghcide.drv'...
installing
error: anonymous function at /nix/store/fysbydywdhlim0yl5djdk4nm07402v96-cabal2nix-ghcide/default.nix:1:1 called without required argument 'shake-bench', at /nix/store/51gm3gjl7i2n3f7pamrbsckm4h0fmhy2-nixpkgs-src/pkgs/development/haskell-modules/make-package-set.nix:87:27
(use '--show-trace' to show detailed location information)
Error: Process completed with exit code 1.

I guess we have to change nix config files but i dont know how

@pepeiborra
Copy link
Collaborator

pepeiborra commented Dec 9, 2020

shake-bench is a new local package in the ghcide repo. It needs to be added in nix/default.nix.

Does the comment at the top of shell.nix help?

# Maintaining this file:
#
# - Bump the nixpkgs version using `niv update nixpkgs`
# - To edit the set of local packages:
# 1. Declare them in nix/default.nix
# 2. Edit the list of packages below
#

@jneira
Copy link
Member Author

jneira commented Dec 9, 2020

@pepeiborra yeah, I missed that config file, only took a quick look inside the nix dir

@jneira
Copy link
Member Author

jneira commented Dec 10, 2020

Ok, two issues blocks the pr now:

@pepeiborra what do you think about add GADT's to the ghcide module to check if it fixes the issue and use that commit in hls? Ideally that version should be the last released one in hackage

@peterwicksstringfield could you take a quick look to completion tetsts to see if they can be fixed without too much effort?
I am afraid that maybe we will need to mark them as broken again temporary to unblock the release. Assuming that features continue working.

@alanz
Copy link
Collaborator

alanz commented Dec 10, 2020

I am wondering if the corners being cut in ghcide CI are worth it.

@pepeiborra
Copy link
Collaborator

pepeiborra commented Dec 10, 2020

I am wondering if the corners being cut in ghcide CI are worth it.

Not related. We have cut some stack jobs, but we never had builds for 8.8.2 and 8.8.3. And yes, they are worth it.

@pepeiborra
Copy link
Collaborator

pepeiborra commented Dec 10, 2020

  • builds for ghc-8.8.2 and 8.8.3 don't compile due to #658 (comment)
    @pepeiborra what do you think about add GADT's to the ghcide module to check if it fixes the issue and use that commit in hls? Ideally that version should be the last released one in hackage

We will have to add 8.8.2 and 8.8.3 to the test matrix in ghcide CI. I'll see to that.

@jneira
Copy link
Member Author

jneira commented Dec 10, 2020

We will have to add 8.8.2 and 8.8.3 to the test matrix in ghcide CI. I'll see to that.

Many thanks, ideally ghcide should have the same matrix than hls, at least with cabal. So maybe we should add ghc-8.6.4 and ghc-8.10.1 too as they are missing in ghcide afair.

@jneira
Copy link
Member Author

jneira commented Dec 10, 2020

@peterwicksstringfield
Copy link
Contributor

I have no objections to re-disabling these tests for now.

In #668 I am attempting to fix the tests.

@peterwicksstringfield
Copy link
Contributor

You might have already seen it, but the failure on (ci/circleci: ghc-8.8.2) is something about a dependency on apply-refact.

@jneira
Copy link
Member Author

jneira commented Dec 14, 2020

Not sure why brittany and floskell have changed at once the order of imports from

import           Data.List
import           Prelude
import           Data.Int

to

import           Data.List
import           Data.Int
import           Prelude

but it seems the actual behaviour is right iirc so i've updated the golden files.

@jneira jneira changed the title Bump ghcide to incoming 0.6 Prepare 0.7.0 release (includes bump ghcide to 0.6.0.1) Dec 14, 2020
@jneira
Copy link
Member Author

jneira commented Dec 14, 2020

Nix is failing now with

Error: Action failed with error: Error: The process '/nix/var/nix/profiles/per-user/runner/profile/bin/cachix' failed with exit code 1
  (node:3080) UnhandledPromiseRejectionWarning: Error: The process '/nix/var/nix/profiles/per-user/runner/profile/bin/cachix' failed with exit code 1
      at ExecState._setResult (/home/runner/work/_actions/cachix/cachix-action/v8/dist/main/index.js:907:25)
      at ExecState.CheckComplete (/home/runner/work/_actions/cachix/cachix-action/v8/dist/main/index.js:890:18)
      at ChildProcess.<anonymous> (/home/runner/work/_actions/cachix/cachix-action/v8/dist/main/index.js:790:27)
      at ChildProcess.emit (events.js:210:5)
      at maybeClose (internal/child_process.js:1021:16)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
  (node:3080) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
  (node:3080) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I hope it is a transient one

@jneira
Copy link
Member Author

jneira commented Dec 14, 2020

I think #672 should be the last pr to be merged before cut the release version so please, dont merge additional pr's to master until the tag is created (if you think someone else should be included comment it out here or in the pr itself)

@jneira
Copy link
Member Author

jneira commented Dec 14, 2020

Waiting for ci... 🙄

jneira and others added 24 commits December 14, 2020 19:58
completion/Context.hs used to generate a diagnostic for the unused "x", but no
longer does so without -Wunused-binds.

completion/Completion.hs used to generate a diagnostic for the unused import of
Data.Maybe, but no longer does so without -Wunused-imports.

We could add these flags like:
    {-# OPTIONS_GHC -Wunused-binds #-}

But that would force us to update all the hardcoded line numbers in the unit tests.

Instead we just add a redundant id, carefully positioned to avoid disturbing any
hardcoded positions.
Stop messing around the editing the file and reloading it. We are trying to test
code completion, not editing files, and the extra complexity is making it harder
to maintain the test.
@jneira
Copy link
Member Author

jneira commented Dec 14, 2020

Hosted macOS workflows will experience longer wait times the week of December 14th.

actions/runner-images#2247

@jneira jneira merged commit 6a692de into haskell:master Dec 15, 2020
@jneira jneira deleted the ghcide-0.6 branch January 15, 2021 06:53
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.

None yet

5 participants