Skip to content

Commit

Permalink
Merge branch 'master' into local-binding-type-lens
Browse files Browse the repository at this point in the history
  • Loading branch information
July541 committed Dec 11, 2022
2 parents cd34e8c + f629652 commit c9daf86
Show file tree
Hide file tree
Showing 1,226 changed files with 30,873 additions and 15,732 deletions.
12 changes: 0 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,13 @@ defaults: &defaults

version: 2
jobs:
stackage-lts16:
environment:
# https://github.com/digital-asset/ghc-lib/issues/352
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
- STACK_FILE: "stack-lts16.yaml"
<<: *defaults

stackage-lts19:
environment:
# https://github.com/digital-asset/ghc-lib/issues/352
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
- STACK_FILE: "stack-lts19.yaml"
<<: *defaults

stackage-nightly:
environment:
# https://github.com/digital-asset/ghc-lib/issues/352
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
- STACK_FILE: "stack.yaml"
<<: *defaults

Expand All @@ -101,6 +90,5 @@ workflows:
version: 2
multiple-ghcs:
jobs:
- stackage-lts16
- stackage-lts19
- stackage-nightly
29 changes: 19 additions & 10 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
about: I've spotted something specific thats' going wrong
title: ''
labels: 'status: needs triage, type: bug'
assignees: ''

---

<!--
Before opening an issue, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
Before opening a bug, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
This explains some common issues and will also help you to find the information that the issue template asks for.
When filing an issue, please fill out as much of the information below as you can.
This helps us to debug your issue, but is not required!
-->

### Your environment

Which OS do you use:
<!--
Everything in this section is optional, but it does help us to debug your issue!
-->

Which OS do you use?
<!-- Windows, MacOS, Ubuntu, ArchLinux, etc... -->
Which LSP client (editor/plugin) do you use:
Which version of GHC do you use and how did you install it?
<!-- 9.0.2 from stack/ghcup, etc. -->
How is your project built (alternative: link to the project)?

Which LSP client (editor/plugin) do you use?
<!-- Neovim+LanguageClient-neovim, emacs+lsp-mode, VS Codium+vscode-haskell, etc... -->
Describe your project (alternative: link to the project):
<!-- stack.yaml, package.yaml, *.cabal files, cabal.project, hie.yaml -->
Which version of HLS do you use and how did you install it?
<!-- 1.7.0.1 from ghcup, etc. -->
Have you configured HLS in any way (especially: a `hie.yaml` file)?

### Steps to reproduce

<!-- Tell us how to reproduce this issue. -->

### Expected behaviour

<!-- Tell us what should happen. -->

### Actual behaviour

<!-- Tell us what happens instead. -->

### Include debug information
### Debug information

<!-- Include any useful debug information, such as relevant log snippets. -->
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
name: Feature request
about: Suggest an idea for this project
name: Enhancement request
about: I have an idea for how to make things better
title: ''
labels: 'status: needs triage, type: enhancement'
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
## Is your enhancement request related to a problem? Please describe.

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
## Describe the solution you'd like

<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
## Describe alternatives you've considered

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Support request
about: Help, something isn't working and I'm stuck!
title: ''
labels: 'status: needs triage, type: support'
assignees: ''

---

<!--
Before asking for support, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
This explains some common issues and will also help you to find the information that the issue template asks for.
-->

## Your environment

<!--
Everything in this section is optional, but it does help us to debug your issue!
-->

Which OS do you use?
<!-- Windows, MacOS, Ubuntu, ArchLinux, etc... -->
Which version of GHC do you use and how did you install it?
<!-- 9.0.2 from stack/ghcup, etc. -->
How is your project built (alternative: link to the project)?

Which LSP client (editor/plugin) do you use?
<!-- Neovim+LanguageClient-neovim, emacs+lsp-mode, VS Codium+vscode-haskell, etc... -->
Which version of HLS do you use and how did you install it?
<!-- 1.7.0.1 from ghcup, etc. -->
Have you configured HLS in any way (especially: a `hie.yaml` file)?

## What's wrong?

<!-- What's not working? What have you tried? -->

### Debug information

<!-- Include any useful debug information, such as relevant log snippets. -->
29 changes: 4 additions & 25 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
cabal:
description: "Cabal version"
required: false
default: "3.6"
default: "3.8.1.0"
os:
description: "Operating system: Linux, Windows or macOS"
required: true
Expand All @@ -23,7 +23,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: haskell/actions/setup@v1
- uses: haskell/actions/setup@v2
id: HaskEnvSetup
with:
ghc-version : ${{ inputs.ghc }}
Expand All @@ -42,27 +42,6 @@ runs:
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
shell: bash

# This copy an alternative cabal-ghc${GHCVER}.project (for example cabal-ghc92.project)
# as main cabal-project, for not fully supported ghc versions
# Needs to be before the caching step so that the cache can detect changes to the modified cabal.project file
- name: Use possible modified `cabal.project`
env:
GHCVER: ${{ inputs.ghc }}
run: |
# File has some protections preventing regular `rm`.
# (most probably sticky bit is set on $HOME)
# `&&` insures `rm -f` return is positive.
# Many platforms also have `alias cp='cp -i'`.
GHCVER2=${GHCVER//./}
ALT_PROJECT_FILE_MINOR=cabal-ghc${GHCVER2}.project
ALT_PROJECT_FILE_MAJOR=cabal-ghc${GHCVER2:0:2}.project
if [[ -f "$ALT_PROJECT_FILE_MINOR" ]]; then
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE_MINOR" cabal.project
elif [[ -f "$ALT_PROJECT_FILE_MAJOR" ]]; then
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE_MAJOR" cabal.project
fi
shell: bash

- if: inputs.os == 'Windows' && inputs.ghc == '8.8.4'
name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
run: |
Expand Down Expand Up @@ -95,7 +74,7 @@ runs:
# We have to restore package sources before `cabal update`
# because it overwrites the hackage index with the cached one
- name: Hackage sources cache
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: hackage-sources
with:
Expand All @@ -120,7 +99,7 @@ runs:

- name: Compiled deps cache
id: compiled-deps
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: compiled-deps
with:
Expand Down
45 changes: 23 additions & 22 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v4.0.0
uses: fkirc/skip-duplicate-actions@v5.3.0
with:
cancel_others: false
paths_ignore: '[ "**/docs/**"
Expand All @@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['8.10.7']
ghc: ['8.10.7', '9.2.5']
os: [ubuntu-latest]

# This code is fitted to the strategy: assumes Linux is used ... etc,
Expand All @@ -61,16 +61,17 @@ jobs:
with:
ghc: ${{ matrix.ghc }}
os: ${{ runner.os }}
shorten-hls: "false"

# max-backjumps is increased as a temporary solution
# for dependency resolution failure
- run: cabal configure --enable-benchmarks --max-backjumps 12000

- name: Build
run: cabal build ghcide:benchHist
run: cabal build haskell-language-server:benchmark

- name: Bench init
run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries"
run: cabal bench -j --benchmark-options="all-binaries"

# tar is required to preserve file permissions
# compression speeds up upload/download nicely
Expand All @@ -85,14 +86,14 @@ jobs:
- name: Upload workspace
uses: actions/upload-artifact@v3
with:
name: workspace
name: workspace-${{ matrix.ghc }}-${{ matrix.os }}
retention-days: 1
path: workspace.tar.gz

- name: Upload .cabal
uses: actions/upload-artifact@v3
with:
name: cabal-home
name: cabal-home-${{ matrix.ghc }}-${{ matrix.os }}
retention-days: 1
path: ~/.cabal/cabal.tar.gz

Expand All @@ -103,7 +104,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ['8.10.7']
ghc: ['8.10.7', '9.2.5']
os: [ubuntu-latest]
cabal: ['3.6']
example: ['cabal', 'lsp-types']
Expand All @@ -118,13 +119,13 @@ jobs:
- name: Download cabal home
uses: actions/download-artifact@v3
with:
name: cabal-home
name: cabal-home-${{ matrix.ghc }}-${{ matrix.os }}
path: .

- name: Download workspace
uses: actions/download-artifact@v3
with:
name: workspace
name: workspace-${{ matrix.ghc }}-${{ matrix.os }}
path: .

- name: untar
Expand All @@ -134,30 +135,30 @@ jobs:
tar xzf cabal.tar.gz --directory ~/.cabal
- name: Bench
run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}"
run: cabal bench -j --benchmark-options="${{ matrix.example }}"

- name: Display results
run: |
column -s, -t < ghcide/bench-results/unprofiled/${{ matrix.example }}/results.csv | tee ghcide/bench-results/unprofiled/${{ matrix.example }}/results.txt
column -s, -t < bench-results/unprofiled/${{ matrix.example }}/results.csv | tee bench-results/unprofiled/${{ matrix.example }}/results.txt
- name: tar benchmarking artifacts
run: find bench-results -name "*.csv" -or -name "*.svg" -or -name "*.html" | xargs tar -czf benchmark-artifacts.tar.gz

- name: Archive benchmarking artifacts
uses: actions/upload-artifact@v3
with:
name: bench-results-${{ runner.os }}-${{ matrix.ghc }}
path: |
ghcide/bench-results/results.*
ghcide/bench-results/**/*.csv
ghcide/bench-results/**/*.svg
ghcide/bench-results/**/*.eventlog.html
name: bench-results-${{ matrix.example }}-${{ runner.os }}-${{ matrix.ghc }}
path: benchmark-artifacts.tar.gz

- name: tar benchmarking logs
# We dont' store the eventlogs because the CI workers risk running out of disk space
run: find bench-results -name "*.log" -or -name "*.hp" | xargs tar -czf benchmark-logs.tar.gz

- name: Archive benchmark logs
uses: actions/upload-artifact@v3
with:
name: bench-logs-${{ runner.os }}-${{ matrix.ghc }}
path: |
ghcide/bench-results/**/*.log
ghcide/bench-results/**/*.eventlog
ghcide/bench-results/**/*.hp
name: bench-logs-${{ matrix.example }}-${{ runner.os }}-${{ matrix.ghc }}
path: benchmark-logs.tar.gz

bench_post_job:
if: always()
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v4.0.0
uses: fkirc/skip-duplicate-actions@v5.3.0
with:
cancel_others: false
paths_ignore: '["**/docs/**"
Expand All @@ -80,17 +80,27 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: [ "9.2.3"
, "9.2.2"
# This list of GHC versions must fit to the list of GHC versions
# specified in 'test.yml'
ghc: [ "9.4.2"
, "9.4.1"
, "9.2.5"
, "9.2.4"
, "9.2.3"
, "9.0.2"
, "8.10.7"
, "8.8.4"
, "8.6.5"
]
os: [ "ubuntu-latest"
, "macOS-latest"
, "windows-latest"
]
exclude:
- os: windows-latest
ghc: '9.4.1'
# Exclude until https://github.com/haskell/actions/issues/129
# is resolved.
- os: windows-latest
ghc: '9.2.5'

steps:
- uses: actions/checkout@v3
Expand All @@ -115,9 +125,6 @@ jobs:
run: |
# repeating builds to workaround segfaults in windows and ghc-8.8.4
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
env:
# needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352
CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
# We build ghcide with benchs and test enabled to include its dependencies in the cache
# (including shake-bench)
Expand Down

0 comments on commit c9daf86

Please sign in to comment.