Skip to content

Enable tests for ghc 9 and promote ghcVersion check#2001

Merged
jneira merged 26 commits into
haskell:masterfrom
jneira:test-ghc9-winmac
Jul 7, 2021
Merged

Enable tests for ghc 9 and promote ghcVersion check#2001
jneira merged 26 commits into
haskell:masterfrom
jneira:test-ghc9-winmac

Conversation

@jneira

@jneira jneira commented Jul 6, 2021

Copy link
Copy Markdown
Member
  • Promote GhcVersion datatype and ghcVersion function to ghcide to make it available to all the codebase
  • Use them to replace CPP for code which paths compile for several ghc versions
  • Add GHC90 version and remove GHC84 (as we dont support it anymore)
  • Include test execution for ghc-9.0 and windows and macos (we could remove macos after a succesful execution, as we are not testing it for any version)

@pepeiborra

Copy link
Copy Markdown
Collaborator

This is very nice, thank you @jneira !!
To prevent the MIN_VERSION macros from coming back, I would also remove the CPP extension pragmas and remove the modules from the allowlist in the ghcide hlint file.

@jneira

jneira commented Jul 6, 2021

Copy link
Copy Markdown
Member Author

This is very nice, thank you @jneira !!
To prevent the MIN_VERSION macros from coming back, I would also remove the CPP extension pragmas and remove the modules from the allowlist in the ghcide hlint file.

Hmm, afaics the unique module where i could remove CPP language pragma was ghcide/session-loader/Development/IDE/Session.hs and it was not listed in the modules where CPP is allowed:

# Shady extensions
- name: CPP
within:
- Development.IDE.Compat
- Development.IDE.Core.FileStore
- Development.IDE.Core.Compile
- Development.IDE.Core.Rules
- Development.IDE.Core.Tracing
- Development.IDE.GHC.Compat
- Development.IDE.GHC.ExactPrint
- Development.IDE.GHC.Orphans
- Development.IDE.GHC.Util
- Development.IDE.Import.FindImports
- Development.IDE.LSP.Outline
- Development.IDE.Spans.Calculate
- Development.IDE.Spans.Documentation
- Development.IDE.Spans.Common
- Development.IDE.Spans.AtPoint
- Development.IDE.Plugin.CodeAction
- Development.IDE.Plugin.Completions
- Development.IDE.Plugin.Completions.Logic
- Development.IDE.Types.Location
- Main

But hlint should warn about that, so surely i am missing something

@jneira

jneira commented Jul 6, 2021

Copy link
Copy Markdown
Member Author

I've marked circleci job and the ubuntu test job for 9.0.1 as required
EDIT: Also the build for macos and ghc 8.10.5

@jneira

jneira commented Jul 6, 2021

Copy link
Copy Markdown
Member Author

We have a succesful run with tests included for ghc-9.0.1 and macos: https://github.com/haskell/haskell-language-server/pull/2001/checks?check_run_id=2997169971
So i am gonna disable tests for it too 😢

@pepeiborra pepeiborra left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I guess we still need CPP around imports and other non-expression sections

@jneira jneira added the merge me Label to trigger pull request merge label Jul 6, 2021
@jneira
jneira force-pushed the test-ghc9-winmac branch from 2186042 to f62feb0 Compare July 6, 2021 21:15
@jneira

jneira commented Jul 7, 2021

Copy link
Copy Markdown
Member Author

The test job for windows and ghc-9.0.1 is getting stuck in the last builds 😟

@jneira
jneira merged commit 8edb0f7 into haskell:master Jul 7, 2021
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.

2 participants