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

Add ghc-9.0.1 to the build release script #1940

Merged
merged 6 commits into from
Jun 23, 2021

Conversation

anka-213
Copy link
Contributor

See also discussion here: #1912 (comment)

Is this sensible, @jneira?

@anka-213 anka-213 mentioned this pull request Jun 17, 2021
35 tasks
@jneira
Copy link
Member

jneira commented Jun 17, 2021

looks good, yeah, could you test the build script creating a fake release in your repo? It is the default trigger of the script

@anka-213
Copy link
Contributor Author

Oh, I should also enable the module-name plugin, since that is working but was accidentally disabled for ghc-9.0.1.

@anka-213
Copy link
Contributor Author

@@ -96,7 +96,7 @@ constraints:
-- Diagrams doesn't support optparse-applicative >= 0.16 yet
optparse-applicative < 0.16
-- These plugins doesn't work on GHC9 yet
, haskell-language-server -brittany -class -eval -fourmolu -modulename -ormolu -splice -stylishhaskell -tactic -refineImports
, haskell-language-server -brittany -class -eval -fourmolu -ormolu -splice -stylishhaskell -tactic -refineImports
Copy link
Member

Choose a reason for hiding this comment

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

should we also enable it in the test script? or tests are gonna fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, right! Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Where is it disabled in the tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or did no-one add it to test.yaml at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The later case seems to be the case. #1836 didn't modify test.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are a lot of plugins that aren't tested:

$ for p in $(ls plugins); do grep -q $p .github/workflows/test.yml || echo "$p doesn't exist";  done
hls-explicit-imports-plugin doesn't exist
hls-floskell-plugin doesn't exist
hls-hlint-plugin doesn't exist
hls-module-name-plugin doesn't exist
hls-ormolu-plugin doesn't exist
hls-pragmas-plugin doesn't exist
hls-retrie-plugin doesn't exist

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we should add a test for this in a github action, to guarantee that people won't forget to add the test-suite to test.yml when they add a new plugin?

Copy link
Member

Choose a reason for hiding this comment

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

not all plugins have the test suite in its own package, some of them are being tested in the the general hls test suite (under ./test). Plugins packages with its own test suite have their own test subdir (f.e. hlint does not have it but pragmas does)

Maybe we should add a test for this in a github action, to guarantee that people won't forget to add the test-suite to test.yml when they add a new plugin?

that is a nice idea

//cc @Ailrun

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, here's the list with those without an internal testsuite filtered out:

$ for p in $(ls plugins); do [[ ! -d plugins/$p/test ]] || grep -q $p .github/workflows/test.yml || echo "$p doesn't exist";  done
hls-floskell-plugin doesn't exist
hls-module-name-plugin doesn't exist
hls-ormolu-plugin doesn't exist
hls-pragmas-plugin doesn't exist

And here is the list of plugins without an internal test-suite, for completeness:

grep -L test-suite plugins/*/*.cabal
plugins/hls-explicit-imports-plugin/hls-explicit-imports-plugin.cabal
plugins/hls-hlint-plugin/hls-hlint-plugin.cabal
plugins/hls-retrie-plugin/hls-retrie-plugin.cabal

Copy link
Member

Choose a reason for hiding this comment

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

Good point. I will update the CI to check those missing tests.

@jneira
Copy link
Member

jneira commented Jun 17, 2021

Here's the build for the test-release: https://github.com/anka-213/haskell-language-server/actions/runs/945876049
And there's the release itself: https://github.com/anka-213/haskell-language-server/releases/tag/test-release-ghc9

just in case, i am afraid the build failed

@anka-213
Copy link
Contributor Author

just in case, i am afraid the build failed

Yes, I noticed, thanks! I'm confused about why. Good thing we tested!

@anka-213
Copy link
Contributor Author

Hmm, does anyone know why the tests on ghc-8.10.5, windows fails with

ghcide
  cradle
    loading
      retry failed: FAIL (0.62s)
        test\exe\Main.hs:4743:
        No joy after fixing the cradle

?

https://github.com/haskell/haskell-language-server/runs/2847357199?check_suite_focus=true

@anka-213
Copy link
Contributor Author

@anka-213
Copy link
Contributor Author

Why does test.yml fail on ghc-8.8.3? I haven't modified anything that can affect that.

session-loader/Development/IDE/Session/VersionCheck.hs:17:24: error:
Error:     • Exception when trying to run compile-time code:
        I could not find a GHC installation at /home/runner/.ghcup/ghc/8.8.3/lib/ghc-8.8.3. Please do a clean rebuild and/or reinstall GHC.
CallStack (from HasCallStack):
  error, called at src/GHC/Check.hs:188:7 in ghc-check-0.5.0.4-44e59734b78ba49fb418eea95f220fef65c9786bf80ec362d3c2dc41c1e8ee52:GHC.Check
      Code: makeGhcVersionChecker
              (fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR")
    • In the Template Haskell splice
        $$(makeGhcVersionChecker
             (fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR"))
      In the expression:
        $$(makeGhcVersionChecker
             (fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR"))
      In an equation for ‘ghcVersionChecker’:
          ghcVersionChecker
            = $$(makeGhcVersionChecker
                   (fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR"))
   |
17 | ghcVersionChecker = $$(makeGhcVersionChecker (fromMaybe GHC.Paths.libdir <$> lookupEnv "NIX_GHC_LIBDIR"))
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build ghcide-1.4.0.1 (which is required by test:wrapper-test
from hls-1.2.0.0 and test:func-test from hls-1.2.0.0).

@jneira
Copy link
Member

jneira commented Jun 21, 2021

I think we need invalidate the cache, as the location of ghc have changed (due to some ghc vm update)

@jneira
Copy link
Member

jneira commented Jun 22, 2021

@anka-213 many thanks again, this could be merged

@jneira jneira added the merge me Label to trigger pull request merge label Jun 22, 2021
@jneira
Copy link
Member

jneira commented Jun 22, 2021

@mergify backport 1.2.0-hackage

@mergify
Copy link
Contributor

mergify bot commented Jun 22, 2021

Command backport 1.2.0-hackage: pending

Waiting for the pull request to get merged

Hey, I reacted but my real name is @Mergifyio

@anka-213
Copy link
Contributor Author

Seems like this requires a manual merge, because workflows were modified.

@berberman berberman merged commit 5f6ce4a into haskell:master Jun 23, 2021
@mergify
Copy link
Contributor

mergify bot commented Jun 23, 2021

Command backport 1.2.0-hackage: failure

No backport have been created
GitHub App like Mergify are not allowed to create pull request where .github/workflows is changed.

jneira pushed a commit to jneira/haskell-language-server that referenced this pull request Jun 23, 2021
* Add ghc-9.0.1 to the build release script

* ghc9: Enable module-name plugin

* Diagrams now supports ghc-9.0.1

* Upgrade cabal in build script

* Cache reset updating hackage index

Co-authored-by: jneira <atreyu.bbb@gmail.com>
(cherry picked from commit 5f6ce4a)
jneira pushed a commit to jneira/haskell-language-server that referenced this pull request Jun 23, 2021
* Add ghc-9.0.1 to the build release script

* ghc9: Enable module-name plugin

* Diagrams now supports ghc-9.0.1

* Upgrade cabal in build script

* Cache reset updating hackage index

Co-authored-by: jneira <atreyu.bbb@gmail.com>
(cherry picked from commit 5f6ce4a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Label to trigger pull request merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants