Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
c6d53c16
by sheaf at 2026-07-02T21:35:44-04:00
1 changed file:
Changes:
| ... | ... | @@ -2944,6 +2944,12 @@ def normalise_whitespace(s: str) -> str: |
| 2944 | 2944 | |
| 2945 | 2945 | callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [<>\w\-\.]+:')
|
| 2946 | 2946 | |
| 2947 | +# A line:column location pointing inside 'libraries' (e.g. ghc-internal).
|
|
| 2948 | +inLibrariesLoc_re = re.compile(
|
|
| 2949 | + r'(libraries[\\/]\S+?)'
|
|
| 2950 | + r':(?:\d+:\d+(?:-\d+)?|\(\d+,\d+\)-\(\d+,\d+\))' # line:col span
|
|
| 2951 | +)
|
|
| 2952 | + |
|
| 2947 | 2953 | def normalise_callstacks(s: str) -> str:
|
| 2948 | 2954 | opts = getTestOpts()
|
| 2949 | 2955 | def repl(matches):
|
| ... | ... | @@ -2952,6 +2958,12 @@ def normalise_callstacks(s: str) -> str: |
| 2952 | 2958 | return ', called at {0}:<line>:<column> in <package-id>:'.format(location)
|
| 2953 | 2959 | # Ignore line number differences in call stacks (#10834).
|
| 2954 | 2960 | s = re.sub(callSite_re, repl, s)
|
| 2961 | + # Ignore differences in line numbers pointing into internal libraries,
|
|
| 2962 | + # as those line numbers are not stable (e.g. adding a comment somewhere
|
|
| 2963 | + # in ghc-internal) (#27387).
|
|
| 2964 | + s = re.sub(inLibrariesLoc_re,
|
|
| 2965 | + lambda m: '{0}:<line>:<column>'.format(normalise_slashes_(m.group(1))),
|
|
| 2966 | + s)
|
|
| 2955 | 2967 | # Ignore the change in how we identify implicit call-stacks
|
| 2956 | 2968 | s = s.replace('from ImplicitParams', 'from HasCallStack')
|
| 2957 | 2969 | if not opts.keep_prof_callstacks:
|