[Git][ghc/ghc][wip/az/locateda-epa-improve-2023-07-15] 87 commits: Use Cabal 3.10 for Hadrian

Alan Zimmerman (@alanz) gitlab at gitlab.haskell.org
Sun Oct 1 18:21:06 UTC 2023



Alan Zimmerman pushed to branch wip/az/locateda-epa-improve-2023-07-15 at Glasgow Haskell Compiler / GHC


Commits:
fa977034 by John Ericson at 2023-09-21T12:55:25-04:00
Use Cabal 3.10 for Hadrian

We need the newer version for `CABAL_FLAG_*` env vars for #17191.

- - - - -
a5d22cab by John Ericson at 2023-09-21T12:55:25-04:00
hadrian: `need` any `configure` script we will call

When the script is changed, we should reconfigure.

- - - - -
db882b57 by John Ericson at 2023-09-21T12:55:25-04:00
hadrian: Make it easier to debug Cabal configure

Right now, output is squashed. This make per-package configure scripts
extremely hard to maintain, because we get vague "library is missing"
errors when the actually probably is usually completely unrelated except
for also involving the C/C++ toolchain.

(I can always pass `-VVV` to Hadrian locally, but these errors are
subtle and I often cannot reproduce them locally!)

`--disable-option-checking` was added back in
75c6e0684dda585c37b4ac254cd7a13537a59a91 but seems to be a bit overkill;
if other flags are passed that are not recognized behind the two from
Cabal mentioned in the former comment, we *do* want to know about it.

- - - - -
7ed65f5a by John Ericson at 2023-09-21T12:55:25-04:00
hadrian: Increase verbosity of certain cabal commands

This is a hack to get around the cabal function we're calling
*decreasing* the verbosity it passes to another function, which is the
stuff we often actually care about. Sigh.

Keeping this a separate commit so if this makes things too verbose it is
easy to revert.

- - - - -
a4fde569 by John Ericson at 2023-09-21T12:55:25-04:00
rts: Move most external symbols logic to the configure script

This is much more terse because we are programmatically handling the
leading underscore.

`findPtr` however is still handled in the Cabal file because we need a
newer Cabal to pass flags to the configure script automatically.

Co-Authored-By: Ben Gamari <ben at well-typed.com>

- - - - -
56cc85fb by Andrew Lelechenko at 2023-09-21T12:56:21-04:00
Bump Cabal submodule to allow text-2.1 and bytestring-0.12

- - - - -
0cd6148c by Matthew Pickering at 2023-09-21T12:56:21-04:00
hadrian: Generate Distribution/Fields/Lexer.x before creating a source-dist

- - - - -
b10ba6a3 by Andrew Lelechenko at 2023-09-21T12:56:21-04:00
Bump hadrian's index-state to upgrade alex at least to 3.2.7.3

- - - - -
11ecc37b by Luite Stegeman at 2023-09-21T12:57:03-04:00
JS: correct file size and times

Programs produced by the JavaScript backend were returning
incorrect file sizes and modification times, causing cabal
related tests to fail.

This fixes the problem and adds an additional test that verifies
basic file information operations.

fixes #23980

- - - - -
b35fd2cd by Ben Gamari at 2023-09-21T12:57:39-04:00
gitlab-ci: Drop libiserv from upload_ghc_libs

libiserv has been merged into the ghci package.

- - - - -
37ad04e8 by Ben Gamari at 2023-09-21T12:58:15-04:00
testsuite: Fix Windows line endings

- - - - -
5795b365 by Ben Gamari at 2023-09-21T12:58:15-04:00
testsuite: Use makefile_test

- - - - -
15118740 by Ben Gamari at 2023-09-21T12:58:55-04:00
system-cxx-std-lib: Add license and description
- - - - -
0208f1d5 by Ben Gamari at 2023-09-21T12:59:33-04:00
gitlab/issue-templates: Rename bug.md -> default.md

So that it is visible by default.

- - - - -
23cc3f21 by Andrew Lelechenko at 2023-09-21T20:18:11+01:00
Bump submodule text to 2.1

- - - - -
b8e4fe23 by Andrew Lelechenko at 2023-09-22T20:05:05-04:00
Bump submodule unix to 2.8.2.1

- - - - -
54b2016e by John Ericson at 2023-09-23T11:40:41-04:00
Move lib{numa,dw} defines to RTS configure

Clean up the m4 to handle the auto case always and be more consistent.
Also simplify the CPP --- we should always have both headers if we are
using libnuma.

"side effects" (AC_DEFINE, and AC_SUBST) are removed from the macros to
better separate searching from actions taken based on search results.
This might seem overkill now, but will make shuffling logic between
configure scripts easier later.

The macro comments are converted from `dnl` to `#` following the
recomendation in
https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Macro-Definitions.html

- - - - -
d51b601b by John Ericson at 2023-09-23T11:40:50-04:00
Shuffle libzstd configuring between scripts

Like the prior commit for libdw and libnuma, `AC_DEFINE` to RTS
configure, `AC_SUBST` goes to the top-level configure script, and the
documentation of the m4 macro is improved.

- - - - -
d1425af0 by John Ericson at 2023-09-23T11:41:03-04:00
Move `FP_ARM_OUTLINE_ATOMICS` to RTS configure

It is just `AC_DEFINE` it belongs there instead.

- - - - -
18de37e4 by John Ericson at 2023-09-23T11:41:03-04:00
Move mmap in the runtime linker check to the RTS configure

`AC_DEFINE` should go there instead.

- - - - -
74132c2b by Andrew Lelechenko at 2023-09-25T21:56:54-04:00
Elaborate comment on GHC_NO_UNICODE

- - - - -
de142aa2 by Ben Gamari at 2023-09-26T15:25:03-04:00
gitlab-ci: Mark T22012 as broken on CentOS 7

Due to #23979.

- - - - -
6a896ce8 by Teo Camarasu at 2023-09-26T15:25:39-04:00
hadrian: better error for failing to find file's dependencies

Resolves #24004

- - - - -
d697a6c2 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Refactor uses of `partitionEithers . map`

This patch changes occurences of the idiom
`partitionEithers (map f xs)` by the simpler form
`partitionWith f xs` where `partitionWith` is the utility function
defined in `GHC.Utils.Misc`.

Resolves: #23953

- - - - -
8a2968b7 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Refactor uses of `partitionEithers <$> mapM f xs`

This patch changes occurences of the idiom
`partitionEithers <$> mapM f xs` by the simpler form
`partitionWithM f xs` where `partitionWithM` is a utility function
newly added to `GHC.Utils.Misc`.

- - - - -
6a27eb97 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Mark `GHC.Utils.Misc.partitionWithM` as inlineable

This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure
that the right-hand side of the definition of this function remains
available for specialisation at call sites.

- - - - -
f1e5245a by David Binder at 2023-09-27T01:19:00-04:00
Add RTS option to supress tix file

- - - - -
1f43124f by David Binder at 2023-09-27T01:19:00-04:00
Add expected output to testsuite in test interface-stability/base-exports

- - - - -
b9d2c354 by David Binder at 2023-09-27T01:19:00-04:00
Expose HpcFlags and getHpcFlags from GHC.RTS.Flags

- - - - -
345675c6 by David Binder at 2023-09-27T01:19:00-04:00
Fix expected output of interface-stability test

- - - - -
146e1c39 by David Binder at 2023-09-27T01:19:00-04:00
Implement getHpcFlags

- - - - -
61ba8e20 by David Binder at 2023-09-27T01:19:00-04:00
Add section in user guide

- - - - -
ea05f890 by David Binder at 2023-09-27T01:19:01-04:00
Rename --emit-tix-file to --write-tix-file

- - - - -
cabce2ce by David Binder at 2023-09-27T01:19:01-04:00
Update the golden files for interface stability

- - - - -
1dbdb9d0 by Krzysztof Gogolewski at 2023-09-27T01:19:37-04:00
Refactor: introduce stgArgRep

The function 'stgArgType' returns the type in STG. But this violates
the abstraction: in STG we're supposed to operate on PrimReps.

This introduces
stgArgRep ty = typePrimRep (stgArgType ty)
stgArgRep1 ty = typePrimRep1 (stgArgType ty)
stgArgRep_maybe ty = typePrimRep_maybe (stgArgType ty)

stgArgType is still directly used for unboxed tuples (should be fixable), FFI
and in ticky.

- - - - -
b02f8042 by Mario Blažević at 2023-09-27T17:33:28-04:00
Fix TH pretty-printer's parenthesization

This PR Fixes `Language.Haskell.TH.Ppr.pprint` so it correctly emits parentheses where needed.

Fixes #23962, #23968, #23971, and #23986

- - - - -
79104334 by Krzysztof Gogolewski at 2023-09-27T17:34:04-04:00
Add a testcase for #17564

The code in the ticket relied on the behaviour of Derived constraints.
Derived constraints were removed in GHC 9.4 and now the code works
as expected.

- - - - -
d7a80143 by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add new modes of operation

This commit adds two new modes of operation to the lint-codes
utility:

  list - list all statically used diagnostic codes
  outdated - list all outdated diagnostic codes

The previous behaviour is now:

  test - test consistency and coverage of diagnostic codes

- - - - -
477d223c by sheaf at 2023-09-28T03:25:53-04:00
lint codes: avoid using git-grep

We manually traverse through the filesystem to find the diagnostic codes
embedded in .stdout and .stderr files, to avoid any issues with old
versions of grep.

Fixes #23843

- - - - -
a38ae69a by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add Hadrian targets

This commit adds new Hadrian targets:

  codes, codes:used - list all used diagnostic codes
  codes:outdated - list outdated diagnostic codes

This allows users to easily query GHC for used and outdated
diagnostic codes, e.g.

  hadrian/build -j --flavour=<..> codes

will list all used diagnostic codes in the command line by running
the lint-codes utility in the "list codes" mode of operation.

The diagnostic code consistency and coverage test is still run as usual,
through the testsuite:

  hadrian/build test --only="codes"

- - - - -
9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00
hadrian: Install LICENSE files in bindists

Fixes #23548.

- - - - -
b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00
Fix visibility when eta-reducing a type lambda

Fixes #24014.

- - - - -
d3874407 by Torsten Schmits at 2023-09-30T16:08:10-04:00
Fix several mistakes around free variables in iface breakpoints

Fixes #23612 , #23607, #23998 and #23666.

MR: !11026

The fingerprinting logic in `Iface.Recomp` failed lookups when processing decls containing breakpoints for two reasons:

* IfaceBreakpoint created binders for free variables instead of expressions

* When collecting free names for the dependency analysis for fingerprinting, breakpoint FVs were skipped

- - - - -
ef5342cd by Simon Peyton Jones at 2023-09-30T16:08:48-04:00
Refactor to combine HsLam and HsLamCase

This MR is pure refactoring (#23916):
* Combine `HsLam` and `HsLamCase`
* Combine `HsCmdLam` and `HsCmdLamCase`

This just arranges to treat uniformly
   \x -> e
   \case pi -> ei
   \cases pis -> ie

In the exising code base the first is treated differently
to the latter two.

No change in behaviour.

More specifics:

* Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering
  * Lambda
  * `\case`
  * `\cases`

* The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases.

* Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one.

* Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.)

* Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument.

* Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument.

* Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.

* Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.

* In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one.

* In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one.

p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one.

Phew!

- - - - -
b048bea0 by Andreas Klebinger at 2023-09-30T16:09:24-04:00
Arm: Make ppr methods easier to use by not requiring NCGConfig

- - - - -
2adc0508 by Andreas Klebinger at 2023-09-30T16:09:24-04:00
AArch64: Fix broken conditional jumps for offsets >= 1MB

Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps
to avoid overflowing the immediate.

Fixes #23746

- - - - -
1424f790 by Alan Zimmerman at 2023-09-30T16:10:00-04:00
EPA: Replace Monoid with NoAnn

We currently use the Monoid class as a constraint on Exact Print
Annotation functions, so we can use mempty. But this leads to
requiring Semigroup instances too, which do not always make sense.

Instead, introduce a class NoAnn, with a function noAnn analogous to
mempty.

Closes #20372

Updates haddock submodule

- - - - -
c1a3ecde by Ben Gamari at 2023-09-30T16:10:36-04:00
users-guide: Refactor handling of :base-ref: et al.

- - - - -
63c84042 by Alan Zimmerman at 2023-10-01T12:32:14+01:00
EPA: Instroduce HasAnnotation class

The class is defined as

    class HasAnnotation e where
      noAnnSrcSpan :: SrcSpan -> e

This generalises noAnnSrcSpan, and allows

    noLocA :: (HasAnnotation e) => a -> GenLocated e a
    noLocA = L (noAnnSrcSpan noSrcSpan)

- - - - -
b3627f06 by Alan Zimmerman at 2023-10-01T13:15:13+01:00
EPA: Fix span for GRHS

Tests all pass [2023-08-13 Sun]

- - - - -
254491f2 by Alan Zimmerman at 2023-10-01T13:15:13+01:00
EPA: Move TrailingAnns from last match to FunBind

All tests pass [2023-08-13 Sun]

- - - - -
3c27f4e7 by Alan Zimmerman at 2023-10-01T13:15:14+01:00
EPA: Fix GADT where clause span

Include the final '}' if there is one.

Note: Makes no difference to a test, need to add one.

- - - - -
3699cc23 by Alan Zimmerman at 2023-10-01T13:15:14+01:00
EPA: Capture full range for a CaseAlt Match

All tests pass [2023-08-30 Wed]
And check-exact no warnings

- - - - -
0cad2bcd by Alan Zimmerman at 2023-10-01T13:15:14+01:00
EPA Use full range for Anchor, and do not widen for [TrailingAnn]

Known failures at the end of this
  Ppr023
  Ppr034
  TestBoolFormula

Fixed in subsequent commits

- - - - -
741f9620 by Alan Zimmerman at 2023-10-01T13:15:14+01:00
EPA: Use the current Anchor end as prior end

Use the original anchor location end as the source of truth for
calculating print deltas.

This allows original spacing to apply in most cases, only changed AST
items need initial delta positions.

[2023-08-14 Mon]
121 unexpected failures

- - - - -
7222562c by Alan Zimmerman at 2023-10-01T13:15:14+01:00
EPA: Add DArrow to TrailingAnn

- - - - -
964b0c02 by Alan Zimmerman at 2023-10-01T13:15:14+01:00
[EPA] Introduce HasTrailing in ExactPrint

29 Failing tests by 4600 processed

info: patch template saved to `-`

- - - - -
c38c20ed by Alan Zimmerman at 2023-10-01T13:15:15+01:00
EPA use [TrailingAnn] in enterAnn

And remove it from ExactPrint (LocatedN RdrName)

- - - - -
649f2870 by Alan Zimmerman at 2023-10-01T13:15:15+01:00
Summary: Patch:  epa-in-hsdo-put-trailinganns
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   2023-07-03 22:33:49 +0100

EPA: In HsDo, put TrailingAnns at top of LastStmt

Failures
5300 of 9700 [0, 103, 0]

- - - - -
b1306571 by Alan Zimmerman at 2023-10-01T13:15:15+01:00
EPA: do not convert comments to deltas when balancing.

It seems its not needed with the new approach

[2023-08-15 Tue]
104 unexpected failures

- - - - -
b838da69 by Alan Zimmerman at 2023-10-01T13:15:15+01:00
EPA: deal with fallout from getMonoBind

- - - - -
8fe170ab by Alan Zimmerman at 2023-10-01T13:15:15+01:00
EPA fix captureLineSpacing

- - - - -
19ef08e8 by Alan Zimmerman at 2023-10-01T13:15:15+01:00
EPA print any comments in the span before exiting it

- - - - -
45b7bda4 by Alan Zimmerman at 2023-10-01T13:15:15+01:00
EPA: getting rid of tweakDelta

WIP at present

- - - - -
57349a46 by Alan Zimmerman at 2023-10-01T13:15:16+01:00
EPA: tweaks to ExactPrint

- - - - -
68452736 by Alan Zimmerman at 2023-10-01T13:15:16+01:00
EPA: Fix warnings in check-exact

- - - - -
64aabffc by Alan Zimmerman at 2023-10-01T14:02:53+01:00
EPA: Add comments to AnchorOperation

6000 of 9700 [0, 14, 0]
Failures seem to be mainly in transform tests

- - - - -
bbac2ad2 by Alan Zimmerman at 2023-10-01T14:02:54+01:00
EPA: remove AnnEofComment

It is no longer used

At this point just failures
  HsDocTy

[2023-08-31 Thu]
And no warnings in check-exact

- - - - -
6895a387 by Alan Zimmerman at 2023-10-01T14:02:54+01:00
EPA: make locA a function, not a field name

- - - - -
8993e2ca by Alan Zimmerman at 2023-10-01T14:45:02+01:00
EPA: generalise reLoc

[2023-10-01 Sun]
Failures
   HsDocTy

- - - - -
b5938052 by Alan Zimmerman at 2023-10-01T14:47:35+01:00
EPA: get rid of l2l and friends

- - - - -
806125e9 by Alan Zimmerman at 2023-10-01T14:47:35+01:00
EPA: get rid of l2l and friends

- - - - -
d128d91a by Alan Zimmerman at 2023-10-01T15:32:40+01:00
EPA: harmonise acsa and acsA

[2023-10-01 Sun]
Failing tests
  HsDocTy

- - - - -
2542d46d by Alan Zimmerman at 2023-10-01T17:40:52+01:00
EPA: Replace Anchor with EpaLocation

[2023-09-21 Thu]
Only test failing is
   HsDocTy

- - - - -
92227d86 by Alan Zimmerman at 2023-10-01T17:40:52+01:00
EPA: get rid of AnchorOperation

[2023-09-21 Thu]
Only error is
  HsDocTy

- - - - -
363cc668 by Alan Zimmerman at 2023-10-01T17:40:52+01:00
EPA: splitLHsForAllTyInvis no ann returned

- - - - -
d4343b92 by Alan Zimmerman at 2023-10-01T17:40:53+01:00
EPA: Replace Monoid with NoAnn

[2023-08-19 Sat]
AddClassMethod fails

- - - - -
d182fe08 by Alan Zimmerman at 2023-10-01T17:40:53+01:00
EPA: Use SrcSpan in EpaSpan

[2023-09-04 Mon]
No errors or warnings in check-exact

[2023-09-21 Thu]
Test failures
   HsDocTy

- - - - -
1323b36a by Alan Zimmerman at 2023-10-01T17:40:53+01:00
EPA: Present no longer has annotation

- - - - -
f183c5eb by Alan Zimmerman at 2023-10-01T17:40:53+01:00
EPA: empty tup_tail has no ann

Parser.y: tup_tail rule was
          | {- empty -} %shift   { return [Left noAnn] }

This means we add an extra Missing constructor if the last item was a comma.

Change the annotation type to a Bool to indicate this, and use the
EpAnn Anchor for the print location for the others.

- - - - -
5199856e by Alan Zimmerman at 2023-10-01T17:40:53+01:00
EPA: Remove parenthesizeHsType

- - - - -
1a193fac by Alan Zimmerman at 2023-10-01T18:07:52+01:00
EPA: Remove EpAnnNotUsed

[2023-10-01 Sun]
Failures
  HsDocTy
  T15242

- - - - -
56b212bb by Alan Zimmerman at 2023-10-01T18:33:43+01:00
EPA: Remove SrcSpanAnn

- - - - -
78ad4054 by Alan Zimmerman at 2023-10-01T18:33:43+01:00
EPA: Remove SrcSpanAnn completely

- - - - -
3a0871c0 by Alan Zimmerman at 2023-10-01T18:33:43+01:00
Clean up mkScope

- - - - -
70f046cf by Alan Zimmerman at 2023-10-01T18:33:43+01:00
EPA: Clean up TC Monad Utils

- - - - -
2cffd697 by Alan Zimmerman at 2023-10-01T19:20:34+01:00
EPA: EpaDelta for comment has no comments

[2023-09-23 Sat]
Current failures
   HsDocTy
   T15242

- - - - -


30 changed files:

- .gitlab/generate-ci/gen_ci.hs
- .gitlab/issue_templates/bug.md → .gitlab/issue_templates/default.md
- .gitlab/jobs.yaml
- .gitlab/rel_eng/upload_ghc_libs.py
- compiler/GHC/Cmm/DebugBlock.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Cond.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/X86.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Hs/Expr.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/07311243b18e385111677876ca686bbe4e96fa0d...2cffd697d8198920a4262b612d4d892dbc4b78ce

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/07311243b18e385111677876ca686bbe4e96fa0d...2cffd697d8198920a4262b612d4d892dbc4b78ce
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/20231001/d1b106ca/attachment-0001.html>


More information about the ghc-commits mailing list