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 release 2.1.0.0 #3748

Merged
merged 11 commits into from
Aug 12, 2023
Merged

Prepare release 2.1.0.0 #3748

merged 11 commits into from
Aug 12, 2023

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Aug 8, 2023

ChangeLog 2.1.0.0

  • Binaries for GHC 9.4.6
  • Completions for .cabal files
  • Performance improvements
  • Show package name and its version while hovering on import statements (#3691)
  • Fix code edits in lsp spec compliant editors like helix. (#3643)

Pull requests merged

Release checklist

  • check ghcup supports new GHC releases if any
  • set the supported GHCs in workflow file .github/workflows/release.yaml
  • check all plugins still work if release includes code changes
  • bump package versions in all *.cabal files (same version as hls)
    • HLS uses a lockstep versioning. The core packages and all plugins use the same version number, and only support exactly the this version.
      • Exceptions:
        • hie-compat requires no automatic version bump.
        • shake-bench is an internal testing tool, not exposed to the outside world. Thus, no version bump required for releases.
    • For updating cabal files, the following script can be used:
      • # Update all `version:` fields
        sed -ri "s/^version:( +)2.1.0.0/version:\12.2.0.0/" **/*.cabal
        # Update all constraints expected to be in the form `== <version>`.
        # We usually don't force an exact version, so this is relatively unambiguous.
        # We could introduce some more ad-hoc parsing, if there is still ambiguity.
        sed -ri "s/== 2.1.0.0/== 2.2.0.0/" **/*.cabal
      • It still requires manual verification and review
  • generate and update changelog
    • Generate a ChangeLog via ./GenChangelogs.hs <api-key> <tag>
  • create release branch as wip/<version>
    • git switch -c wip/<version>
  • create release tag as <version>
    • git tag <version>
  • trigger release pipeline by pushing the tag
    • this creates a draft release
  • run sh scripts/release/download-gh-artifacts <version> <your-gpg-email>
    • downloads artifacts to gh-release-artifacts/<version>/
    • also downloads FreeBSD bindist from circle CI
    • adds signatures
  • upload artifacts to downloads.haskell.org manually from gh-release-artifacts/<version>/
  • create PR to ghcup-metadata
    • update ghcup-0.0.7.yaml and ghcup-vanilla-0.0.7.yaml
      • can use sh scripts/release/create-yaml-snippet.sh <version> to generate a snippet that can be manually inserted into the yaml files
    • update hls-metadata-0.0.1.json
      • utilize cabal run ghcup-gen -- generate-hls-ghcs -f ghcup-0.0.7.yaml --format json --stdout in the root of ghcup-metadata repository
  • get sign-off on release
    • from wz1000, michealpj, maerwald and fendor
  • publish release on github
  • upload hackage packages
    • requires credentials
  • update https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html#current-ghc-version-support-status
  • post release on discourse and reddit
  • merge release PR to master or forward port relevant changes

.github/workflows/hackage.yml Show resolved Hide resolved
docs/contributing/releases.md Show resolved Hide resolved
Copy link
Collaborator

@July541 July541 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for your work!

ChangeLog.md Show resolved Hide resolved
ChangeLog.md Show resolved Hide resolved
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 9, 2023 09:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
@fendor fendor temporarily deployed to CI August 10, 2023 15:31 — with GitHub Actions Inactive
Copy link
Collaborator

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Great stuff!


# After running the test, free up disk space by deleting the unneeded GHC version.
# Helps us staying beneath the 14GB SSD disk limit.
ghcup rm ghc "${bin_noexe/haskell-language-server-/}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

Copy link
Member

@hasufell hasufell Mar 1, 2024

Choose a reason for hiding this comment

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

@fendor this breaks the tests.

on line 51 we have

    "$bindir/haskell-language-server-wrapper${ext}" typecheck "${test_module}" || fail "failed to typecheck with HLS wrapper"

Here are the logs:

2024-03-01T10:21:59.7648620Z + for hls in '"${bindir}/"haskell-language-server-*'
2024-03-01T10:21:59.7648970Z + bin=haskell-language-server-9.8.2~2.7.0.0
2024-03-01T10:21:59.7649280Z + bin_noexe=haskell-language-server-9.8.2~2.7.0.0
2024-03-01T10:21:59.7649730Z + [[ haskell-language-server-9.8.2~2.7.0.0 =~ haskell-language-server-wrapper ]]
2024-03-01T10:21:59.7650170Z + [[ haskell-language-server-9.8.2~2.7.0.0 =~ ~ ]]
2024-03-01T10:21:59.7650530Z + for hls in '"${bindir}/"haskell-language-server-*'
2024-03-01T10:21:59.7650840Z + bin=haskell-language-server-wrapper
2024-03-01T10:21:59.7651490Z + bin_noexe=haskell-language-server-wrapper
2024-03-01T10:21:59.7651910Z + [[ haskell-language-server-wrapper =~ haskell-language-server-wrapper ]]
2024-03-01T10:21:59.7652340Z + for hls in '"${bindir}/"haskell-language-server-*'
2024-03-01T10:21:59.7652680Z + bin=haskell-language-server-wrapper-2.7.0.0
2024-03-01T10:21:59.7653020Z + bin_noexe=haskell-language-server-wrapper-2.7.0.0
2024-03-01T10:21:59.7653490Z + [[ haskell-language-server-wrapper-2.7.0.0 =~ haskell-language-server-wrapper ]]
2024-03-01T10:21:59.7654410Z + /Users/github1/github/actions-runner/_work/haskell-language-server/haskell-language-server/.ghcup/bin/haskell-language-server-wrapper typecheck Data/ByteString.hs
2024-03-01T10:22:00.9380400Z Found "/private/var/folders/wb/zzxx2gnd7hb913crzw4m3h3w0000gp/T/hls_ci.XXXXXXX.YVU2SqT0L8/bytestring-0.11.1.0/hie.yaml" for "/private/var/folders/wb/zzxx2gnd7hb913crzw4m3h3w0000gp/T/hls_ci.XXXXXXX.YVU2SqT0L8/bytestring-0.11.1.0/a"
2024-03-01T10:22:00.9392480Z Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 2.7.0.0 aarch64 ghc-9.2.8
2024-03-01T10:22:00.9395170Z Current directory: /private/var/folders/wb/zzxx2gnd7hb913crzw4m3h3w0000gp/T/hls_ci.XXXXXXX.YVU2SqT0L8/bytestring-0.11.1.0
2024-03-01T10:22:00.9396070Z Operating system: darwin
2024-03-01T10:22:00.9396430Z Arguments: ["typecheck","Data/ByteString.hs"]
2024-03-01T10:22:00.9399390Z Cradle directory: /private/var/folders/wb/zzxx2gnd7hb913crzw4m3h3w0000gp/T/hls_ci.XXXXXXX.YVU2SqT0L8/bytestring-0.11.1.0
2024-03-01T10:22:00.9400170Z Cradle type: Cabal
2024-03-01T10:22:00.9635970Z 
2024-03-01T10:22:00.9636830Z Tool versions found on the $PATH
2024-03-01T10:22:00.9639480Z cabal:          3.10.2.1
2024-03-01T10:22:00.9640080Z stack:          Not found
2024-03-01T10:22:00.9640450Z ghc:            Not found
2024-03-01T10:22:00.9640690Z 
2024-03-01T10:22:00.9640700Z 
2024-03-01T10:22:00.9641360Z Consulting the cradle to get project GHC version...
2024-03-01T10:22:00.9893730Z 2024-03-01T10:22:00.988616Z | Debug | cabal exec -v0 -- ghc --print-libdir
2024-03-01T10:22:00.9894360Z Failed to find the GHC version of this Cabal project.
2024-03-01T10:22:00.9895220Z Error when calling cabal exec -v0 -- ghc --print-libdir
2024-03-01T10:22:00.9895450Z 
2024-03-01T10:22:00.9896360Z Error: cabal: The program 'ghc' version >=7.0.1 is required but it could not
2024-03-01T10:22:00.9896730Z be found.
2024-03-01T10:22:00.9896830Z 
2024-03-01T10:22:00.9896830Z 
2024-03-01T10:22:00.9900060Z  2024-03-01T10:22:00.989765Z | Info | Starting server
2024-03-01T10:22:00.9901400Z 2024-03-01T10:22:00.990019Z | Error | Got EOF

If you analyze the logs, you see two things:

  • there's no GHC to invoke (because you removed all of them)
  • HLS wrapper doesn't seem to exit correctly when the toolchain is missing

This also fails more rigorously on runners that have non-ghcup GHC pre-installed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right, deleting all ghc versions is clearly incorrect. The disk space concern remains, though, should we install some GHC version?

I suppose it makes somewhat sense to not have exit code 1 if a module can't be loaded, but in this case, even starting fails, so we definitely should have a NonZero exit code.

This also fails more rigorously on runners that have non-ghcup GHC pre-installed.

What does more rigorously mean in this case?

Copy link
Member

Choose a reason for hiding this comment

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

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 install some GHC version?

Up to you. In my CI, I install the recommended version.

- Exceptions:
- `hie-compat` requires no automatic version bump.
- `shake-bench` is an internal testing tool, not exposed to the outside world. Thus, no version bump required for releases.
- For updating cabal files, the following script can be used:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should just commit something like this!

@fendor fendor added merge me Label to trigger pull request merge and removed merge me Label to trigger pull request merge labels Aug 11, 2023
@fendor fendor enabled auto-merge August 11, 2023 17:13
@fendor fendor added the merge me Label to trigger pull request merge label Aug 12, 2023
@fendor fendor disabled auto-merge August 12, 2023 07:11
@fendor
Copy link
Collaborator Author

fendor commented Aug 12, 2023

Ah thanks, I missed that! Adding it to the RELEASING checklist for the future.

@fendor
Copy link
Collaborator Author

fendor commented Aug 12, 2023

Ghcup docs update: haskell/ghcup-hs#870

@mergify mergify bot merged commit 9c56c3c into master Aug 12, 2023
47 checks passed
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

6 participants