[Git][ghc/ghc][wip/fix_rel_eng-ubuntu] 30 commits: rts: Use C11-compliant static assertion syntax

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Sat Jan 28 10:22:37 UTC 2023



Matthew Pickering pushed to branch wip/fix_rel_eng-ubuntu at Glasgow Haskell Compiler / GHC


Commits:
e480fbc2 by Ben Gamari at 2023-01-27T05:01:24-05:00
rts: Use C11-compliant static assertion syntax

Previously we used `static_assert` which is only available in C23. By
contrast, C11 only provides `_Static_assert`.

Fixes #22777

- - - - -
2648c09c by Andrei Borzenkov at 2023-01-27T05:02:07-05:00
Replace errors from badOrigBinding with new one (#22839)

Problem: in 02279a9c the type-level [] syntax was changed from a built-in name
to an alias for the GHC.Types.List constructor. badOrigBinding assumes that if
a name is not built-in then it must have come from TH quotation, but this is
not necessarily the case with [].

The outdated assumption in badOrigBinding leads to incorrect error messages.
This code:
  data []
Fails with "Cannot redefine a Name retrieved by a Template Haskell quote: []"

Unfortunately, there is not enough information in RdrName to directly determine
if the name was constructed via TH or by the parser, so this patch changes the
error message instead.

It unifies TcRnIllegalBindingOfBuiltIn and TcRnNameByTemplateHaskellQuote
into a new error TcRnBindingOfExistingName and changes its wording to avoid
guessing the origin of the name.

- - - - -
545bf8cf by Matthew Pickering at 2023-01-27T14:58:53+00:00
Revert "base: NoImplicitPrelude in Data.Void and Data.Kind"

Fixes CI errors of the form.

```
===> Command failed with error code: 1
ghc: panic! (the 'impossible' happened)
  GHC version 9.7.20230127:
	lookupGlobal
  Failed to load interface for ‘GHC.Num.BigNat’
  There are files missing in the ‘ghc-bignum’ package,
  try running 'ghc-pkg check'.
  Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic
        pprPanic, called at compiler/GHC/Tc/Utils/Env.hs:154:32 in ghc:GHC.Tc.Utils.Env
  CallStack (from HasCallStack):
    panic, called at compiler/GHC/Utils/Error.hs:454:29 in ghc:GHC.Utils.Error
Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug
```

This reverts commit d0d7ba0fb053ebe7f919a5932066fbc776301ccd.

The module now lacks a dependency on GHC.Num.BigNat which it implicitly
depends on. It is causing all CI jobs to fail so we revert without haste
whilst the patch can be fixed.

Fixes #22848

- - - - -
638277ba by Simon Peyton Jones at 2023-01-27T23:54:55-05:00
Detect family instance orphans correctly

We were treating a type-family instance as a non-orphan if there
was a type constructor on its /right-hand side/ that was local. Boo!
Utterly wrong. With this patch, we correctly check the /left-hand side/
instead!

Fixes #22717

- - - - -
46a53bb2 by Simon Peyton Jones at 2023-01-27T23:54:55-05:00
Report family instance orphans correctly

This fixes the fact that we were not reporting orphan family instances
at all. The fix here is easy, but touches a bit of code. I refactored
the code to be much more similar to the way that class instances are done:

   - Add a fi_orphan field to FamInst, like the is_orphan field in ClsInst
   - Make newFamInst initialise this field, just like newClsInst
   - And make newFamInst report a warning for an orphan, just like newClsInst
   - I moved newFamInst from GHC.Tc.Instance.Family to GHC.Tc.Utils.Instantiate,
     just like newClsInst.
   - I added mkLocalFamInst to FamInstEnv, just like mkLocalClsInst in InstEnv
   - TcRnOrphanInstance and SuggestFixOrphanInstance are now parametrised
     over class instances vs type/data family instances.

Fixes #19773

- - - - -
faa300fb by Simon Peyton Jones at 2023-01-27T23:54:55-05:00
Avoid orphans in STG

This patch removes some orphan instances in the STG namespace
by introducing the GHC.Stg.Lift.Types module, which allows various
type family instances to be moved to GHC.Stg.Syntax, avoiding orphan
instances.

- - - - -
0f25a13b by Simon Peyton Jones at 2023-01-27T23:54:55-05:00
Avoid orphans in the parser

This moves Anno instances for PatBuilder from GHC.Parser.PostProcess
to GHC.Parser.Types to avoid orphans.

- - - - -
15750d33 by Simon Peyton Jones at 2023-01-27T23:54:55-05:00
Accept an orphan declaration (sadly)

This accepts the orphan type family instance

  type instance DsForeignHook = ...

in GHC.HsToCore.Types.

See Note [The Decoupling Abstract Data Hack] in GHC.Driver.Hooks

- - - - -
c9967d13 by Zubin Duggal at 2023-01-27T23:55:31-05:00
bindist configure: Fail if find not found (#22691)

- - - - -
ad8cfed4 by John Ericson at 2023-01-27T23:56:06-05:00
Put hadrian bootstrap plans through `jq`

This makes it possible to review changes with conventional diffing
tools.

- - - - -
d0ddc01b by Ben Gamari at 2023-01-27T23:56:42-05:00
testsuite: Introduce threaded2_sanity way

Incredibly, we previously did not have a single way which would test the
threaded RTS with multiple capabilities and the sanity-checker enabled.

- - - - -
38ad8351 by Ben Gamari at 2023-01-27T23:56:42-05:00
rts: Relax Messages assertion

`doneWithMsgThrowTo` was previously too strict in asserting that the
`Message` is locked. Specifically, it failed to consider that the
`Message` may not be locked if we are deleting all threads during RTS
shutdown.

- - - - -
a9fe81af by Ben Gamari at 2023-01-27T23:56:42-05:00
testsuite: Fix race in UnliftedTVar2

Previously UnliftedTVar2 would fail when run with multiple capabilities
(and possibly even with one capability) as it would assume that
`killThread#` would immediately kill the "increment" thread.

Also, refactor the the executable to now succeed with no output and
fails with an exit code.

- - - - -
8519af60 by Ben Gamari at 2023-01-27T23:56:42-05:00
testsuite: Make listThreads more robust

Previously it was sensitive to the labels of threads which it did not
create (e.g. the IO manager event loop threads). Fix this.

- - - - -
55a81995 by Ben Gamari at 2023-01-27T23:56:43-05:00
rts: Fix non-atomic mutation of enabled_capabilities

- - - - -
b5c75f1d by Ben Gamari at 2023-01-27T23:56:43-05:00
rts: Fix C++ compilation issues

Make the RTS compilable with a C++ compiler by inserting necessary
casts.

- - - - -
c261b62f by Ben Gamari at 2023-01-27T23:56:43-05:00
rts: Fix typo

"tracingAddCapabilities" was mis-named

- - - - -
77fdbd3f by Ben Gamari at 2023-01-27T23:56:43-05:00
rts: Drop long-dead fallback definitions for INFINITY & NAN

These are no longer necessary since we now compile as C99.

- - - - -
56c1bd98 by Ben Gamari at 2023-01-28T02:57:59-05:00
Revert "CApiFFI: add ConstPtr for encoding const-qualified pointer return types (#22043)"

This reverts commit 99aca26b652603bc62953157a48e419f737d352d.

- - - - -
b3a3534b by nineonine at 2023-01-28T02:57:59-05:00
CApiFFI: add ConstPtr for encoding const-qualified pointer return types

Previously, when using `capi` calling convention in foreign declarations,
code generator failed to handle const-cualified pointer return types.
This resulted in CC toolchain throwing `-Wincompatible-pointer-types-discards-qualifiers`
warning.

`Foreign.C.Types.ConstPtr` newtype was introduced to handle these cases -
special treatment was put in place to generate appropritetly qualified C
wrapper that no longer triggers the above mentioned warning.

Fixes #22043.

- - - - -
082b7d43 by Oleg Grenrus at 2023-01-28T02:58:38-05:00
Add Foldable1 Solo instance

- - - - -
50b1e2e8 by Andrei Borzenkov at 2023-01-28T02:59:18-05:00
Convert diagnostics in GHC.Rename.Bind to proper TcRnMessage (#20115)

I removed all occurrences of TcRnUnknownMessage in GHC.Rename.Bind
module. Instead, these TcRnMessage messages were introduced:
  TcRnMultipleFixityDecls
  TcRnIllegalPatternSynonymDecl
  TcRnIllegalClassBiding
  TcRnOrphanCompletePragma
  TcRnEmptyCase
  TcRnNonStdGuards
  TcRnDuplicateSigDecl
  TcRnMisplacedSigDecl
  TcRnUnexpectedDefaultSig
  TcRnBindInBootFile
  TcRnDuplicateMinimalSig

- - - - -
3330b819 by Matthew Pickering at 2023-01-28T02:59:54-05:00
hadrian: Fix library-dirs, dynamic-library-dirs and static-library-dirs in inplace .conf files

Previously we were just throwing away the contents of the library-dirs
fields but really we have to do the same thing as for include-dirs,
relativise the paths into the current working directory and maintain any
extra libraries the user has specified.

Now the relevant section of the rts.conf file looks like:

```
library-dirs:
    ${pkgroot}/../rts/build
    ${pkgroot}/../../..//_build/stage1/rts/build
    /nix/store/av4c0fib4rkmb6sa1074z0rb1ciria5b-gperftools-2.10/lib
    /nix/store/2infxahfp9lj084xn3q9ib5ajks8447i-libffi-3.4.4/lib

library-dirs-static:
    ${pkgroot}/../rts/build
    ${pkgroot}/../../..//_build/stage1/rts/build
    /nix/store/av4c0fib4rkmb6sa1074z0rb1ciria5b-gperftools-2.10/lib
    /nix/store/2infxahfp9lj084xn3q9ib5ajks8447i-libffi-3.4.4/lib

dynamic-library-dirs:
    ${pkgroot}/../rts/build
    ${pkgroot}/../../..//_build/stage1/rts/build
    /nix/store/av4c0fib4rkmb6sa1074z0rb1ciria5b-gperftools-2.10/lib
    /nix/store/2infxahfp9lj084xn3q9ib5ajks8447i-libffi-3.4.4/lib
```

Fixes #22209

- - - - -
c9ad8852 by Bodigrim at 2023-01-28T03:00:33-05:00
Document differences between Data.{Monoid,Semigroup}.{First,Last}

- - - - -
7e11c6dc by Cheng Shao at 2023-01-28T03:01:09-05:00
compiler: fix subword literal narrowing logic in the wasm NCG

This patch fixes the W8/W16 literal narrowing logic in the wasm NCG,
which used to lower it to something like i32.const -1, without
properly zeroing-out the unused higher bits. Fixes #22608.

- - - - -
6ea2aa02 by Cheng Shao at 2023-01-28T03:01:46-05:00
compiler: fix lowering of CmmBlock in the wasm NCG

The CmmBlock datacon was not handled in lower_CmmLit, since I thought
it would have been eliminated after proc-point splitting. Turns out it
still occurs in very rare occasions, and this patch is needed to fix
T9329 for wasm.

- - - - -
d299ee83 by Matthew Pickering at 2023-01-28T10:22:27+00:00
ci: Remove FreeBSD job from release pipelines

We no longer attempt to build or distribute this release

- - - - -
aa3b132c by Matthew Pickering at 2023-01-28T10:22:27+00:00
rel_eng: Add check to make sure that release jobs are downloaded by fetch-gitlab

This check makes sure that if a job is a prefixed by "release-" then the
script downloads it and understands how to map the job name to the
platform.

- - - - -
4ca7eec6 by Matthew Pickering at 2023-01-28T10:22:27+00:00
rel_eng: Fix the name of the ubuntu-* jobs

These were not uploaded for alpha1

Fixes #22844

- - - - -
2529c985 by Matthew Pickering at 2023-01-28T10:22:27+00:00
gen_ci: Only consider release jobs for job metadata

In particular we do not have a release job for FreeBSD so the generation
of the platform mapping was failing.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/CmmToAsm/Wasm/Asm.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToAsm/Wasm/Types.hs
- compiler/GHC/CmmToAsm/Wasm/Utils.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Driver/Hooks.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/Types.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Stg/InferTags/TagSig.hs
- compiler/GHC/Stg/InferTags/Types.hs
- compiler/GHC/Stg/Lift/Analysis.hs
- + compiler/GHC/Stg/Lift/Types.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/Stg/Syntax.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1510525bc593c9a442f27a7d3e3f9b399eb3e79b...2529c9859d3315e4bd62e06b3017a34ead222e20

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1510525bc593c9a442f27a7d3e3f9b399eb3e79b...2529c9859d3315e4bd62e06b3017a34ead222e20
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/20230128/dfbcdaef/attachment-0001.html>


More information about the ghc-commits mailing list