[Git][ghc/ghc][wip/fix-linters] 71 commits: Remove trailing whitespace

Ben Gamari gitlab at gitlab.haskell.org
Wed Jun 12 21:55:13 UTC 2019



Ben Gamari pushed to branch wip/fix-linters at Glasgow Haskell Compiler / GHC


Commits:
709290b0 by Matthew Pickering at 2019-06-08T17:38:15Z
Remove trailing whitespace

[skip ci]

This should really be caught by the linters! (#16711)

- - - - -
b2f106f5 by Ben Gamari at 2019-06-08T18:02:02Z
gitlab-ci: Disable shallow clones

Previously we were passing `--unshallow` to `git fetch` in the linting
rules to ensure that the base commit which we were linting with respect
to was available. However, this breaks due to GitLab's re-use of
working directories since `git fetch --unshallow` fails on a repository
which is not currently shallow.

Given that `git fetch --unshallow` circumvents the efficiencies provided
by shallow clones anyways, let's just disable them entirely.

There is no documented way to do disable shallow clones but on checking
the GitLab implementation it seems that setting `GIT_DEPTH=0` should do
the trick.

- - - - -
4a72259d by Ben Gamari at 2019-06-08T18:40:55Z
gitlab-ci: Fix submodule linting of commits

There is no notion of a base commit when we aren't checking a merge
request. Just check the HEAD commit.

- - - - -
87540029 by Ben Gamari at 2019-06-08T20:44:55Z
gitlab-ci: Ensure that all commits on a branch are submodule-linted

The previous commit reworked things such that the submodule linter would
only run on the head commit. However, the linter only checks the
submodules which are touched by the commits it is asked to lint.
Consequently it would be possible for a bad submodule to sneak through.

Thankfully, we can use the handy CI_COMMIT_BEFORE_SHA attribute to
find the base commit of the push.

- - - - -
0462b0e0 by Alexandre Baldé at 2019-06-09T15:48:34Z
Explain that 'mappend' and '(<>)' should be the same [skip ci]

- - - - -
970e4802 by Matthew Pickering at 2019-06-09T15:49:09Z
hadrian: Properly partition options in sourceArgs

Previously if you build the `ghc` package then it would has the default
opts and the library opts. This is different behaviour to make where the
library opts are only reserved for things in the `libraries`
subdirectory (I believe)

Fixes #16716

- - - - -
a018c3a8 by Ben Gamari at 2019-06-09T15:49:44Z
testsuite: Suppress ticks in T4918 output

As noted in #16741, this test otherwise breaks when `base` is compiled
with `-g`.

- - - - -
f7370333 by chessai at 2019-06-09T22:41:02Z
Introduce log1p and expm1 primops

Previously log and exp were primitives yet log1p and expm1 were FFI
calls. Fix this non-uniformity.

- - - - -
41bf4045 by Ben Gamari at 2019-06-09T22:41:38Z
testsuite: Add test for #16514

- - - - -
b9fe91fc by Simon Jakobi at 2019-06-09T22:42:21Z
Small refactorings in ExtractDocs

- - - - -
9d238791 by Kevin Buhr at 2019-06-09T22:42:57Z
Handle trailing path separator in package DB names (#16360)

Package DB directories with trailing separator (provided via
GHC_PACKAGE_PATH or via -package-db) resulted in incorrect calculation of
${pkgroot} substitution variable.  Keep the trailing separator while
resolving as directory or file, but remove it before dropping the last
path component with takeDirectory.

Closes #16360.

- - - - -
a22e51ea by Richard Eisenberg at 2019-06-09T22:43:38Z
Fix #16517 by bumping the TcLevel for method sigs

There were actually two bugs fixed here:

1. candidateQTyVarsOfType needs to be careful that it does not
   try to zap metavariables from an outer scope as "naughty"
   quantification candidates. This commit adds a simple check
   to avoid doing so.

2. We weren't bumping the TcLevel in kcHsKindSig, which was used
   only for class method sigs. This mistake led to the acceptance
   of

     class C a where
       meth :: forall k. Proxy (a :: k) -> ()

   Note that k is *locally* quantified. This patch fixes the
   problem by using tcClassSigType, which correctly bumps the
   level. It's a bit inefficient because tcClassSigType does other
   work, too, but it would be tedious to repeat much of the code
   there with only a few changes. This version works well and is
   simple.

And, while updating comments, etc., I noticed that tcRnType was
missing a pushTcLevel, leading to #16767, which this patch also
fixes, by bumping the level. In the refactoring here, I also
use solveEqualities. This initially failed ghci/scripts/T15415,
but that was fixed by teaching solveEqualities to respect
-XPartialTypeSignatures.

This patch also cleans up some Notes around error generation that
came up in conversation.

Test case: typecheck/should_fail/T16517, ghci/scripts/T16767

- - - - -
10452959 by Roland Senn at 2019-06-09T22:44:18Z
Add disable/enable commands to ghci debugger #2215

This patch adds two new commands `:enable` and `:disable` to the GHCi debugger.
Opposite to `:set stop <n> :continue` a breakpoint disabled with `:disable` will
not loose its previously set stop command.
A new field breakEnabled is added to the BreakLocation data structure to
track the enable/disable state. When a breakpoint is disabled with a `:disable`
command, the following happens:

The corresponding BreakLocation data element is searched dictionary of the
`breaks` field of the GHCiStateMonad. If the break point is found and not
already in the disabled state, the breakpoint is removed from bytecode.
The BreakLocation data structure is kept in the breaks list and the new
breakEnabled field is set to false.

The `:enable` command works similar.

The breaks field in the GHCiStateMonad was changed from an association list
to int `IntMap`.

- - - - -
13572480 by Ben Gamari at 2019-06-09T22:44:54Z
rts: Separate population of eventTypes from initial event generation

Previously these two orthogonal concerns were both implemented in
postHeaderEvents which made it difficult to send header events after RTS
initialization.

- - - - -
ed20412a by nineonine at 2019-06-09T22:45:31Z
Do not report error if Name in pragma is unbound

- - - - -
8a48a8a4 by Ben Gamari at 2019-06-09T22:46:08Z
testsuite: Add test for #16509

- - - - -
69c58f8a by David Eichmann at 2019-06-09T22:46:46Z
Hadrian: need CPP preprocessor dependencies #16660

Use the new -include-cpp-deps ghc option (#16521)
when generating .dependencies files in hadrian.
This is version gated as -include-cpp-deps is a
relatively new option.

- - - - -
1c7bb03d by Richard Eisenberg at 2019-06-09T22:47:24Z
Comments only: document tcdDataCusk better.

- - - - -
5023adce by John Ericson at 2019-06-09T22:47:59Z
Remove CPP ensuring word size is 32 or 64 bits around Addr# <-> int# primops

It shouldn't be needed these days, and those primops are "highly
deprecated" anyways.

This fits with my plans because it removes one bit of target-dependence
of the builtin primops, and this is the hardest part of GHC to make
multi-target.

CC @carter

- - - - -
8e60e3f0 by Daniel Gröber at 2019-06-09T22:48:38Z
rts: Fix RetainerProfile early return with TREC_CHUNK

When pop() returns with `*c == NULL` retainerProfile will immediately
return. All other code paths is pop() continue with the next stackElement
when this happens so it seems weird to me that TREC_CHUNK we would suddenly
abort everything even though the stack might still have elements left to
process.

- - - - -
1a3420ca by Ben Gamari at 2019-06-10T11:59:41Z
base: Mark CPUTime001 as fragile

As noted in #16224, CPUTime001 has been quite problematic, reporting
non-monotonic timestamps in CI. Unfortunately I've been unable to
reproduce this locally.

- - - - -
9bc10993 by Vladislav Zavialov at 2019-06-10T12:00:16Z
Print role annotations in TemplateHaskell brackets (#16718)

- - - - -
0345b1b0 by Richard Eisenberg at 2019-06-11T03:52:10Z
Comments only: document newtypes' DataConWrapId

- - - - -
58a5d728 by David Eichmann at 2019-06-11T03:52:50Z
Refactor the rules for .hi and .o into a single rule using `&%>` #16764

Currently the rule for .hi files just triggers (via need) the rule
for the .o file, and .o rule generates both the .o and .hi file.
Likewise for .o-boot and .hi-boot files. This is a bit of an abuse
of Shake, and in fact shake supports rules with multiple output
with the &%> function. This exact use case appears in Neil
Mitchell's paper *Shake Before Building* section 6.3.

- - - - -
2f945086 by Ben Gamari at 2019-06-11T03:53:25Z
testsuite: Fix and extend closure_size test

This was previously broken in several ways. This is fixed and it also
now tests arrays. Unfortunately I was unable to find a way to continue
testing PAP and FUN sizes; these simply depend too much upon the
behavior of the simplifier.

I also tried to extend this to test non-empty arrays as well but
unfortunately this was non-trivial as the array card size constant isn't
readily available from haskell.

Fixes #16531.

- - - - -
e5d275f4 by Ben Gamari at 2019-06-11T03:53:25Z
ghc-heap: Add closure_size_noopt test

This adds a new test, only run in the `normal` way, to verify the size
of FUNs and PAPs.

- - - - -
fe7e7e4a by Yuras Shumovich at 2019-06-11T22:39:58Z
Warn about unused packages

Reviewers: bgamari, simonpj

Reviewed By: simonpj

Subscribers: hvr, simonpj, mpickering, rwbarton, carter

GHC Trac Issues: #15838

Differential Revision: https://phabricator.haskell.org/D5285

- - - - -
39f50bff by Alp Mestanogullari at 2019-06-11T22:40:37Z
Refine the GHCI macro into HAVE[_{INTERNAL, EXTERNAL}]_INTERPRETER

As discussed in #16331, the GHCI macro, defined through 'ghci' flags
in ghc.cabal.in, ghc-bin.cabal.in and ghci.cabal.in, is supposed to indicate
whether GHC is built with support for an internal interpreter, that runs in
the same process. It is however overloaded in a few places to mean
"there is an interpreter available", regardless of whether it's an internal
or external interpreter.

For the sake of clarity and with the hope of more easily being able to
build stage 1 GHCs with external interpreter support, this patch splits
the previous GHCI macro into 3 different ones:

- HAVE_INTERNAL_INTERPRETER: GHC is built with an internal interpreter
- HAVE_EXTERNAL_INTERPRETER: GHC is built with support for external interpreters
- HAVE_INTERPRETER: HAVE_INTERNAL_INTERPRETER || HAVE_EXTERNAL_INTERPRETER

- - - - -
45616133 by Alec Theriault at 2019-06-11T22:41:14Z
Make `haddock_testsuite` respect `--test-accept`

Suppose you've made changes that affect the output of `haddockHtmlTest`
so that the following is failing:

    ./hadrian/build.sh -c --only=haddockHtmlTest test

Then, the following will accept new output for Haddock's test cases.

    ./hadrian/build.sh -c --only=haddockHtmlTest test --test-accept

You still do need to make sure those new changes (which show up in
Haddock's tree) get committed though.

Fixes #16694

- - - - -
762098bf by Alp Mestanogullari at 2019-06-11T22:41:52Z
rts/RtsFlags.c: mention that -prof too enables support for +RTS -l

- - - - -
457fe789 by Alp Mestanogullari at 2019-06-11T22:42:30Z
Hadrian: teach the RTS that PROFILING implies TRACING

As discussed in #16744, both the Make and Hadrian build systems
have special code to always pass -eventlog whenever -prof or -debug
are passed. However, there is some similar logic in the RTS itself only
for defining TRACING when the DEBUG macro is defined, but no such logic
is implemented to define TRACING when the PROFILING macro is defined.
This patch adds such a logic and therefore fixes #16744.

- - - - -
cf7f36ae by Ben Gamari at 2019-06-11T22:43:05Z
rts/linker: Mmap into low memory on AArch64

This extends mmapForLinker to use the same low-memory mapping
strategy used on x86_64 on AArch64. See #16784.

- - - - -
0b7f81f5 by Ben Gamari at 2019-06-11T22:43:05Z
rts/linker: Use mmapForLinker to map PLT

The PLT needs to be located within a close distance of
the code calling it under the small memory model.

Fixes #16784.

- - - - -
1389b2cc by Ömer Sinan Ağacan at 2019-06-11T22:43:43Z
Fix an error message in CheckUnload.c:searchHeapBlocks

- - - - -
aad6115a by Alp Mestanogullari at 2019-06-11T22:44:20Z
testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk'

Make/shell variable names which contain dashes can cause problems under
some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk
that I made overridable (by Hadrian) in ba0aed2e was working as expected when
our Hadrian/Linux job was based off the deb8 Docker image, but broke when
I switched the job to use our deb9-based image, in 3d97bad6. The exact
circumstances/tool versions that trigger this problem are unknown, but
changing the variable's name to 'ghc_config_mk' lets us work around the issue.

This fixes the annth_compunits and annth_make test failures that showed up
when we switched the Hadrian/Linux job to use the deb9 environment.

- - - - -
9b4ff57d by Ben Gamari at 2019-06-12T11:35:25Z
llvm-targets: Add armv7l-unknown-linux-gnueabi

Fixes #15208.

[skip ci]

- - - - -
c05ca251 by Ben Gamari at 2019-06-12T11:36:01Z
testsuite: Add haddock perf test output to gitignore

[skip ci]

- - - - -
bbc752c5 by Ben Gamari at 2019-06-12T11:36:36Z
rts/linker: Make elf_got.c a bit more legible

- - - - -
217e6db4 by Ben Gamari at 2019-06-12T11:36:36Z
rts/linker: Only mprotect GOT after it is filled

This fixes a regression, introduced by 67c422ca, where we mprotect'd the
global offset table (GOT) region to PROT_READ before we had finished
filling it, resulting in a linker crash.

Fixes #16779.

- - - - -
1219f8e8 by Krzysztof Gogolewski at 2019-06-12T11:37:12Z
Use DeriveFunctor throughout the codebase (#15654)

- - - - -
bd2d13ff by Ben Gamari at 2019-06-12T12:19:59Z
Bump binary to 0.8.7.0

(cherry picked from commit 983ada70a013c7642a751f6e41587ff95b57d0f8)

- - - - -
381c3ae3 by Ben Gamari at 2019-06-12T12:19:59Z
Bump Cabal submodule

(cherry picked from commit ff438786613f07df9b2d43eaeac49b13815d849d)

Metric Increase:
    haddock.Cabal

- - - - -
0354c7de by Ben Gamari at 2019-06-12T12:19:59Z
Bump time submodule to 1.9.3

(cherry picked from commit fdb07571036b1498800589d45b61781e6acdd368)

- - - - -
e0b16eaa by Ben Gamari at 2019-06-12T12:19:59Z
Bump terminfo to 0.4.1.4

(cherry picked from commit 1134488b4c9cef904ea82f22f1978646eea612df)

- - - - -
2ce320b0 by Ben Gamari at 2019-06-12T12:19:59Z
gitlab-ci: Test using slowtest in deb9-debug job

- - - - -
90e7c450 by Ben Gamari at 2019-06-12T12:19:59Z
testsuite: Mark hWaitForInput-accurate-stdin as broken in threaded ways

As noted in #16535.

- - - - -
488187f8 by Ben Gamari at 2019-06-12T12:19:59Z
testsuite: Mark T13167 as fragile in threaded2

As noted in #16536.

- - - - -
9b583320 by Ben Gamari at 2019-06-12T12:19:59Z
testsuite: Mark T13910 as broken in optasm

Due to #16537.

- - - - -
eb644865 by Ben Gamari at 2019-06-12T12:19:59Z
testsuite: Mark T14761c as broken in hpc, profasm, and optasm ways

As noted in #16540.

- - - - -
1a204e07 by Ben Gamari at 2019-06-12T12:19:59Z
testsuite: Mark T16180 as broken in ghci and ext-interp ways

As noted in #16541.

- - - - -
8d482e45 by Ben Gamari at 2019-06-12T12:19:59Z
testsuite: Omit tcrun022 in hpc way

As noted in #16542, the expected rule doesn't fire. However, this
doesn't seem terribly surpring given the circumstances.

- - - - -
68cfdfdb by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Mark Overflow as broken in hpc way

As noted in #16543.

- - - - -
a3929a4f by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Mark T2783 as fragile in threaded1

It was previously marked as broken but it passes non-deterministically.
See #2783.

- - - - -
bb7ed32f by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Skip T7919 in ghci way

It times out pretty reliably. It's not clear that much is gained by
running this test in the ghci way anyways.

- - - - -
329dcd7a by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Fix fragile_for test modifier

- - - - -
55b5bb14 by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Fix omit_ways usage

omit_ways expects a list but this was broken in several cases.

- - - - -
264ad286 by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Mark threadstatus-T9333 as fragile in ghci way

As noted in #16555.

- - - - -
587bef66 by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Omit profasm way for cc017

cc017 requires TH but we can't load dynamic profiled objects.

- - - - -
dc5a37fd by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Skip T493 in ghci way.

T493 tests #493, which is an FFI test. FFI tests should be skipped
in ghci way.

- - - - -
e3f71d0e by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Mark T16449_2 as broken due to #16742

- - - - -
b5a13a1e by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Mark T16737 as broken in ghci way due to #16541

- - - - -
b09374a4 by Ben Gamari at 2019-06-12T12:20:25Z
testsuite: Note intentional typo in T7130

I earlier accidentally corrected it breaking the test.

- - - - -
a798c130 by Ben Gamari at 2019-06-12T12:20:25Z
linters/check-makefiles: Limit lint to Makefiles

Previously we would apply this rule, which is only intended for
testsuite Makefiles, to all files. This lead to a number of
false-positives in all.T files.

- - - - -
0782141e by Ben Gamari at 2019-06-12T12:20:25Z
gitlab-ci: Fetch submodules before running submodule linter

- - - - -
898f7e92 by Ben Gamari at 2019-06-12T12:20:25Z
Fix uses of #ifdef/#ifndef

The linter now enforces our preference for `#if defined()` and
`#if !defined()`.

- - - - -
0a13a04c by Ben Gamari at 2019-06-12T12:20:25Z
Bump unix submodule

Marks posix002 as fragile in threaded2 way due to #16550.

- - - - -
a8579e5b by Ben Gamari at 2019-06-12T12:27:25Z
process: Bump submodule

 * Skip process005 in ghci way
 * Mark process002 as fragile in threaded2

- - - - -
3f1022c5 by Ben Gamari at 2019-06-12T12:27:25Z
testsuite: Skip cgrun078 in ghci way

This test requires FFI usage.

- - - - -
1cbfef47 by Ben Gamari at 2019-06-12T12:27:25Z
testsuite: Unbreak galois_raytrace on i386

galois_raytrace was previously broken on i386 due to use of x87
arithmethic on that platform. However,
42504f4a575395a35eec5c3fd7c9ef6e2b54e68e removes x87 support; this
resulted in an unexpected pass. Unmark this test as broken.

- - - - -
20160f1a by Ben Gamari at 2019-06-12T12:27:25Z
testsuite: Don't run tests requiring TH in profasm way when GhcDynamic

Since we can't load profiled objects when GhcDynamic==YES. Affects:

* T16737
* T16384
* T16718
* T16619
* T16190

- - - - -
7b751ed8 by Ben Gamari at 2019-06-12T21:52:35Z
gitlab-ci: Bump Docker image

Fixes linters.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/linters/check-makefiles.py
- .gitlab/linters/linter.py
- aclocal.m4
- compiler/basicTypes/MkId.hs
- compiler/basicTypes/UniqSupply.hs
- compiler/cmm/CmmLint.hs
- compiler/cmm/CmmMachOp.hs
- compiler/cmm/Hoopl/Block.hs
- compiler/cmm/MkGraph.hs
- compiler/cmm/PprC.hs
- compiler/codeGen/StgCmmExtCode.hs
- compiler/codeGen/StgCmmForeign.hs
- compiler/codeGen/StgCmmMonad.hs
- compiler/codeGen/StgCmmPrim.hs
- compiler/coreSyn/CoreLint.hs
- compiler/deSugar/Coverage.hs
- compiler/deSugar/ExtractDocs.hs
- compiler/ghc.cabal.in
- compiler/ghci/ByteCodeAsm.hs
- compiler/ghci/ByteCodeGen.hs
- compiler/ghci/GHCi.hs
- compiler/ghci/LinkerTypes.hs
- compiler/hsSyn/Convert.hs
- compiler/hsSyn/HsBinds.hs
- compiler/hsSyn/HsDecls.hs
- compiler/llvmGen/LlvmCodeGen/Base.hs
- compiler/llvmGen/LlvmCodeGen/CodeGen.hs
- compiler/main/Annotations.hs
- compiler/main/CmdLineParser.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/c392f987de174ae04c6c7c47145dfe5db6427615...7b751ed89a97545e9ff9c9814a3d5440a8d42d64

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/c392f987de174ae04c6c7c47145dfe5db6427615...7b751ed89a97545e9ff9c9814a3d5440a8d42d64
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190612/76ac9b99/attachment-0001.html>


More information about the ghc-commits mailing list