...
 
Commits (540)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
#!/usr/bin/env bash
set -euo pipefail
# Use github.com/ghc for those submodule repositories we couldn't connect to.
git config remote.origin.url git://github.com/ghc/ghc.git
git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
git submodule init # Don't be quiet, we want to show these urls.
git submodule --quiet update --recursive # Now we can be quiet again.
#!/usr/bin/env bash
# vim: sw=2 et
set -euo pipefail
fail() {
echo "ERROR: $*" >&2
exit 1
}
if [ "$CIRCLE_REPOSITORY_URL" != "git@github.com:ghc/ghc.git" ]; then
exit 0
fi
GHC_ORIGIN=git@git.haskell.org:ghc
# Add git.haskell.org as a known host.
echo "|1|F3mPVCE55+KfApNIMYQ3Dv39sGE=|1bRkvJEJhAN2R0LE/lAjFCEJGl0= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBUZS9jGBkE5UzpSo6irnIgcQcfzvbuIOsFc8+N61FwtZncRntbaKPuUimOFPgeaUZLl6Iajz6IIs7aduU0/v+I=" >> ~/.ssh/known_hosts
echo "|1|2VUMjYSRVpT2qJPA0rA9ap9xILY=|5OThkI4ED9V0J+Es7D5FOD55Klk= ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+3TLluLAO4lkW60W+N2DFkS+WoRFGqLwHzgd1ifxG9TIm31wChPY3E/hgMnJmgGqWCF4UDUemmyCycEaL7FtKfzjTAclg9EfpQnozyE3T5hIo2WL7SN5O8ttG/bYGuDnn14jLnWwJyN4oz/znWFiDG9e2Oc9YFNlQ+PK8ae5xR4gqBB7EOoj9J1EiPqG2OXRr5Mei3TLsRDU6fnz/e4oFJpKWWeN6M63oePv0qoaGjxcrATZUWsuWrxVMmYo9kP1xRuFJbAUw2m4uVP+793SW1zxySi1HBMtJG+gCDdZZSwYbkV1hassLWBHv1qPttncfX8Zek3Z3VolaTmfWJTo9" >> ~/.ssh/known_hosts
# Check that a git notes dont already exist.
# This is a percausion as we reset refs/notes/perf and we want to avoid data loss.
if [ $(git notes --ref=perf list | wc -l) -ne 0 ]
then
fail "Found an existing git note on HEAD. Expected no git note."
fi
# Assert that the METRICS_FILE exists and can be read.
if [ "$METRICS_FILE" = "" ] || ! [ -r $METRICS_FILE ]
then
fail "Metrics file not found: $METRICS_FILE"
fi
# Reset the git notes and append the metrics file to the notes, then push and return the result.
# This is favoured over a git notes merge as it avoids potential data loss/duplication from the merge strategy.
function reset_append_note_push {
git fetch -f $GHC_ORIGIN refs/notes/perf:refs/notes/perf || true
echo "git notes --ref=perf append -F $METRICS_FILE HEAD"
git notes --ref=perf append -F $METRICS_FILE HEAD
git push $GHC_ORIGIN refs/notes/perf
}
# Push the metrics file as a git note. This may fail if another task pushes a note first. In that case
# the latest note is fetched and appended.
MAX_RETRY=20
until reset_append_note_push || [ $MAX_RETRY -le 0 ]
do
((MAX_RETRY--))
echo ""
echo "Failed to push git notes. Fetching, appending, and retrying... $MAX_RETRY retries left."
done
--command utils/ghc-in-ghci/run.sh
--command ./hadrian/ghci.sh
--reload compiler
--reload ghc
--reload includes
--restart utils/ghc-in-ghci/run.sh
--restart utils/ghc-in-ghci/load-main.ghci
--restart utils/ghc-in-ghci/settings.ghci
--restart hadrian/
......@@ -123,6 +123,7 @@ _darcs/
/settings
/ghc.spec
/ghc/ghc-bin.cabal
/includes/dist/
/includes/ghcautoconf.h
/includes/ghcplatform.h
/includes/ghcversion.h
......@@ -141,7 +142,6 @@ _darcs/
/libraries/frames.html
/libraries/ghc-boot/GNUmakefile
/libraries/ghc-boot/ghc-boot.cabal
/libraries/ghc-boot/ghc.mk
/libraries/ghc-boot-th/GNUmakefile
/libraries/ghc-boot-th/ghc-boot-th.cabal
/libraries/ghc-boot-th/ghc.mk
......
This diff is collapsed.
# Summary
## Summary
Write a brief description of the issue.
# Steps to reproduce
## Steps to reproduce
Please provide a set of concrete steps to reproduce the issue.
# Expected behavior
## Expected behavior
What do you expect the reproducer described above to do?
# Environment
## Environment
* GHC version used:
......
# Motivation
## Motivation
Briefly describe the problem your proposal solves and why this problem should
be solved.
# Proposal
## Proposal
Describe your proposed feature here.
......
......@@ -3,6 +3,7 @@
# A linter to warn for ASSERT macros which are separated from their argument
# list by a space, which Clang's CPP barfs on
from pathlib import Path
from linter import run_linters, RegexpLinter
linters = [
......@@ -20,5 +21,11 @@ linters = [
message='`#if !defined(x)` is preferred to `#ifndef x`'),
]
for l in linters:
# Need do document rules!
l.add_path_filter(lambda path: path != Path('docs', 'coding-style.html'))
# Don't lint vendored code
l.add_path_filter(lambda path: not path.name == 'config.guess')
if __name__ == '__main__':
run_linters(linters)
......@@ -12,8 +12,10 @@ from linter import run_linters, RegexpLinter
linters = [
RegexpLinter(r'--interactive',
message = "Warning: Use `$(TEST_HC_OPTS_INTERACTIVE)` instead of `--interactive -ignore-dot-ghci -v0`.")
message = "Warning: Use `$(TEST_HC_OPTS_INTERACTIVE)` instead of `--interactive -ignore-dot-ghci -v0`."
).add_path_filter(lambda path: path.name == 'Makefile')
]
if __name__ == '__main__':
run_linters(linters, subdir='testsuite')
run_linters(linters,
subdir='testsuite')
#!/usr/bin/env bash
set -e
grep -E -q '\[[0-9]+\.[0-9]+\.[0-9]+\]' configure.ac ||
( echo "error: configure.ac: GHC version number must have three components."; exit 1 )
......@@ -7,10 +7,11 @@ import sys
import re
import textwrap
import subprocess
from typing import List, Optional
from pathlib import Path
from typing import List, Optional, Callable, Sequence
from collections import namedtuple
def lint_failure(file, line_no, line_content, message):
def lint_failure(file, line_no: int, line_content: str, message: str):
""" Print a lint failure message. """
wrapper = textwrap.TextWrapper(initial_indent=' ',
subsequent_indent=' ')
......@@ -29,7 +30,7 @@ def lint_failure(file, line_no, line_content, message):
print(textwrap.dedent(msg))
def get_changed_files(base_commit, head_commit,
def get_changed_files(base_commit: str, head_commit: str,
subdir: str = '.'):
""" Get the files changed by the given range of commits. """
cmd = ['git', 'diff', '--name-only',
......@@ -46,12 +47,21 @@ class Linter(object):
"""
def __init__(self):
self.warnings = [] # type: List[Warning]
self.path_filters = [] # type: List[Callable[[Path], bool]]
def add_warning(self, w: Warning):
self.warnings.append(w)
def lint(self, path):
pass
def add_path_filter(self, f: Callable[[Path], bool]) -> "Linter":
self.path_filters.append(f)
return self
def do_lint(self, path: Path):
if all(f(path) for f in self.path_filters):
self.lint(path)
def lint(self, path: Path):
raise NotImplementedError
class LineLinter(Linter):
"""
......@@ -59,32 +69,32 @@ class LineLinter(Linter):
the given line from a file and calls :func:`add_warning` for any lint
issues found.
"""
def lint(self, path):
if os.path.isfile(path):
with open(path, 'r') as f:
def lint(self, path: Path):
if path.is_file():
with path.open('r') as f:
for line_no, line in enumerate(f):
self.lint_line(path, line_no+1, line)
def lint_line(self, path, line_no, line):
pass
def lint_line(self, path: Path, line_no: int, line: str):
raise NotImplementedError
class RegexpLinter(LineLinter):
"""
A :class:`RegexpLinter` produces the given warning message for
all lines matching the given regular expression.
"""
def __init__(self, regex, message):
def __init__(self, regex: str, message: str):
LineLinter.__init__(self)
self.re = re.compile(regex)
self.message = message
def lint_line(self, path, line_no, line):
def lint_line(self, path: Path, line_no: int, line: str):
if self.re.search(line):
w = Warning(path=path, line_no=line_no, line_content=line[:-1],
message=self.message)
self.add_warning(w)
def run_linters(linters: List[Linter],
def run_linters(linters: Sequence[Linter],
subdir: str = '.') -> None:
import argparse
parser = argparse.ArgumentParser()
......@@ -96,7 +106,7 @@ def run_linters(linters: List[Linter],
if path.startswith('.gitlab/linters'):
continue
for linter in linters:
linter.lint(path)
linter.do_lint(Path(path))
warnings = [warning
for linter in linters
......
......@@ -30,6 +30,7 @@ BuildFlavour=$BUILD_FLAVOUR
ifneq "\$(BuildFlavour)" ""
include mk/flavours/\$(BuildFlavour).mk
endif
GhcLibHcOpts+=-haddock
EOF
case "$(uname)" in
......
......@@ -22,8 +22,9 @@ fi
curl --silent --show-error \
--request POST \
-F "token=$HEAD_HACKAGE_TRIGGER_TOKEN" \
-F "ref=gitlab-ci-nix" \
-F "ref=master" \
-F "variables[GHC_PIPELINE_ID]=$CI_PIPELINE_ID" \
-F "variables[EXTRA_HC_OPTS]=-dcore-lint" \
https://gitlab.haskell.org/api/v4/projects/$HEAD_HACKAGE_PROJECT_ID/trigger/pipeline \
| tee resp.json
......
......@@ -27,7 +27,8 @@ if [ ! -e $toolchain/bin/ghc ]; then
fi
if [ ! -e $toolchain/bin/cabal ]; then
curl https://www.haskell.org/cabal/release/cabal-install-2.2.0.0/cabal-install-2.2.0.0-i386-unknown-mingw32.zip > /tmp/cabal.zip
url="https://downloads.haskell.org/~cabal/cabal-install-latest/cabal-install-2.4.1.0-x86_64-unknown-mingw32.zip"
curl $url > /tmp/cabal.zip
unzip /tmp/cabal.zip
mv cabal.exe $toolchain/bin
fi
......
[submodule "libraries/binary"]
path = libraries/binary
url = ../packages/binary.git
url = https://gitlab.haskell.org/ghc/packages/binary.git
ignore = untracked
[submodule "libraries/bytestring"]
path = libraries/bytestring
url = ../packages/bytestring.git
url = https://gitlab.haskell.org/ghc/packages/bytestring.git
ignore = untracked
[submodule "libraries/Cabal"]
path = libraries/Cabal
url = ../packages/Cabal.git
url = https://gitlab.haskell.org/ghc/packages/Cabal.git
ignore = untracked
[submodule "libraries/containers"]
path = libraries/containers
url = ../packages/containers.git
url = https://gitlab.haskell.org/ghc/packages/containers.git
ignore = untracked
[submodule "libraries/haskeline"]
path = libraries/haskeline
url = ../packages/haskeline.git
url = https://gitlab.haskell.org/ghc/packages/haskeline.git
ignore = untracked
[submodule "libraries/pretty"]
path = libraries/pretty
url = ../packages/pretty.git
url = https://gitlab.haskell.org/ghc/packages/pretty.git
ignore = untracked
[submodule "libraries/terminfo"]
path = libraries/terminfo
url = ../packages/terminfo.git
url = https://gitlab.haskell.org/ghc/packages/terminfo.git
ignore = untracked
[submodule "libraries/transformers"]
path = libraries/transformers
url = ../packages/transformers.git
url = https://gitlab.haskell.org/ghc/packages/transformers.git
ignore = untracked
[submodule "libraries/xhtml"]
path = libraries/xhtml
url = ../packages/xhtml.git
url = https://gitlab.haskell.org/ghc/packages/xhtml.git
ignore = untracked
[submodule "libraries/Win32"]
path = libraries/Win32
url = ../packages/Win32.git
url = https://gitlab.haskell.org/ghc/packages/Win32.git
ignore = untracked
[submodule "libraries/time"]
path = libraries/time
url = ../packages/time.git
url = https://gitlab.haskell.org/ghc/packages/time.git
ignore = untracked
[submodule "libraries/array"]
path = libraries/array
url = ../packages/array.git
url = https://gitlab.haskell.org/ghc/packages/array.git
ignore = untracked
[submodule "libraries/deepseq"]
path = libraries/deepseq
url = ../packages/deepseq.git
url = https://gitlab.haskell.org/ghc/packages/deepseq.git
ignore = untracked
[submodule "libraries/directory"]
path = libraries/directory
url = ../packages/directory.git
url = https://gitlab.haskell.org/ghc/packages/directory.git
ignore = untracked
[submodule "libraries/filepath"]
path = libraries/filepath
url = ../packages/filepath.git
url = https://gitlab.haskell.org/ghc/packages/filepath.git
ignore = untracked
[submodule "libraries/hpc"]
path = libraries/hpc
url = ../packages/hpc.git
url = https://gitlab.haskell.org/ghc/packages/hpc.git
ignore = untracked
[submodule "libraries/parsec"]
path = libraries/parsec
url = ../packages/parsec.git
url = https://gitlab.haskell.org/ghc/packages/parsec.git
ignore = untracked
[submodule "libraries/text"]
path = libraries/text
url = ../packages/text.git
url = https://gitlab.haskell.org/ghc/packages/text.git
ignore = untracked
[submodule "libraries/mtl"]
path = libraries/mtl
url = ../packages/mtl.git
url = https://gitlab.haskell.org/ghc/packages/mtl.git
ignore = untracked
[submodule "libraries/process"]
path = libraries/process
url = ../packages/process.git
url = https://gitlab.haskell.org/ghc/packages/process.git
ignore = untracked
[submodule "libraries/unix"]
path = libraries/unix
url = ../packages/unix.git
url = https://gitlab.haskell.org/ghc/packages/unix.git
ignore = untracked
branch = 2.7
[submodule "libraries/stm"]
path = libraries/stm
url = ../packages/stm.git
url = https://gitlab.haskell.org/ghc/packages/stm.git
ignore = untracked
[submodule "utils/haddock"]
path = utils/haddock
url = ../haddock.git
url = https://github.com/haskell/haddock.git
ignore = untracked
branch = ghc-head
[submodule "nofib"]
path = nofib
url = ../nofib.git
url = https://gitlab.haskell.org/ghc/nofib.git
ignore = untracked
[submodule "utils/hsc2hs"]
path = utils/hsc2hs
url = ../hsc2hs.git
url = https://gitlab.haskell.org/ghc/hsc2hs.git
ignore = untracked
[submodule "libffi-tarballs"]
path = libffi-tarballs
url = ../libffi-tarballs.git
url = https://gitlab.haskell.org/ghc/libffi-tarballs.git
ignore = untracked
[submodule "gmp-tarballs"]
path = libraries/integer-gmp/gmp/gmp-tarballs
url = ../gmp-tarballs.git
url = https://gitlab.haskell.org/ghc/gmp-tarballs.git
===============================================
The Glasgow Haskell Compiler -- version 8.2.2
===============================================
The GHC Team is pleased to announce a new minor release of GHC. This release
builds on the performance and stability improvements of 8.2.1, fixing a variety
of correctness bugs, improving error messages, and making the compiler more
portable.
Notable bug-fixes include
* A correctness issue resulting in segmentation faults in some
FFI-users (#13707, #14346)
* A correctness issue resulting in undefined behavior in some programs
using STM (#14171)
* A bug which may have manifested in segmentation faults in
out-of-memory condition (#14329)
* clearBit of Natural no longer bottoms (#13203)
* A specialisation bug resulting in exponential blowup of compilation