Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
-
cd23d0ec
by Cheng Shao at 2026-02-04T00:14:56-05:00
-
aba76a1b
by Cheng Shao at 2026-02-04T00:14:56-05:00
-
1dcdbfb1
by Cheng Shao at 2026-02-04T00:14:56-05:00
-
7122a7cd
by Cheng Shao at 2026-02-04T00:14:56-05:00
-
b3dce1e9
by Cheng Shao at 2026-02-04T00:14:57-05:00
-
e09d65a1
by Cheng Shao at 2026-02-04T00:14:57-05:00
-
8c8f3858
by Andreas Klebinger at 2026-02-04T00:14:57-05:00
-
46281762
by Zubin Duggal at 2026-02-04T00:14:58-05:00
10 changed files:
- compiler/GHC/Unit/Module/ModIface.hs
- libraries/Cabal
- libraries/deepseq
- libraries/directory
- libraries/exceptions
- libraries/filepath
- libraries/os-string
- libraries/transformers
- testsuite/tests/linters/regex-linters/check-rts-includes.py
- testsuite/tests/simplCore/should_compile/T21391.hs
Changes:
| ... | ... | @@ -894,13 +894,7 @@ instance (NFData (IfaceAbiHashesExts phase), NFData (IfaceDeclExts phase)) => NF |
| 894 | 894 | `seq` rnf a14
|
| 895 | 895 | |
| 896 | 896 | instance NFData IfaceCache where
|
| 897 | - rnf (IfaceCache a1 a2 a3 a4)
|
|
| 898 | - = rnf a1
|
|
| 899 | - `seq` rnf a2
|
|
| 900 | - `seq` rnf a3
|
|
| 901 | - `seq` rnf a4
|
|
| 902 | - |
|
| 903 | - |
|
| 897 | + rnf = rwhnf
|
|
| 904 | 898 | |
| 905 | 899 | forceModIface :: ModIface -> IO ()
|
| 906 | 900 | forceModIface iface = () <$ (evaluate $ force iface)
|
| 1 | -Subproject commit d9b0904b49dc84e0bfc79062daf2bbdf9d22a422 |
|
| 1 | +Subproject commit 8d1f5a33662be0db0654061fb53fb00e3f4417e0 |
| 1 | -Subproject commit ae2762ac241a61852c9ff4c287af234fb1ad931f |
|
| 1 | +Subproject commit 882f52f51854544a467babd8cb075e3271f5913e |
| 1 | -Subproject commit 6442a3cf04f74d82cdf8c9213324313d52b23d28 |
|
| 1 | +Subproject commit 8c712e834f277544fc03e96dfbbb769126dc0a7c |
| 1 | -Subproject commit 81bfd6e0ca631f315658201ae02e30046678f056 |
|
| 1 | +Subproject commit a3da039855479e3c8542e8b45986599d0414ff68 |
| 1 | -Subproject commit cbcd0ccf92f47e6c10fb9cc513a7b26facfc19fe |
|
| 1 | +Subproject commit baac7d7e76449f76fc6785e77206edb5530b6bfb |
| 1 | -Subproject commit c08666bf7bf528e607fc1eacc20032ec59e69df3 |
|
| 1 | +Subproject commit 71f66e1af2288867becaa567dfb10c1d791b0343 |
| 1 | -Subproject commit cee47cca7705edafe0a5839439e679edbd61890a |
|
| 1 | +Subproject commit 0d615bc2457d5d2c695dcfdb902d88c1225beff3 |
| ... | ... | @@ -12,12 +12,16 @@ import re |
| 12 | 12 | INCLUDE_RE = re.compile('# *include ([<"][^">]+[>"])')
|
| 13 | 13 | |
| 14 | 14 | def get_includes(file: Path) -> List[Tuple[int, str]]:
|
| 15 | - txt = file.read_text()
|
|
| 16 | - return [ (line_no+1, m.group(1) )
|
|
| 17 | - for (line_no, line) in enumerate(txt.split('\n'))
|
|
| 18 | - for m in [INCLUDE_RE.match(line)]
|
|
| 19 | - if m is not None
|
|
| 20 | - if m.group(1) != "rts/PosixSource.h"]
|
|
| 15 | + try:
|
|
| 16 | + txt = file.read_text(encoding="utf-8")
|
|
| 17 | + return [ (line_no+1, m.group(1) )
|
|
| 18 | + for (line_no, line) in enumerate(txt.split('\n'))
|
|
| 19 | + for m in [INCLUDE_RE.match(line)]
|
|
| 20 | + if m is not None
|
|
| 21 | + if m.group(1) != "rts/PosixSource.h"]
|
|
| 22 | + except Exception as e:
|
|
| 23 | + e.add_note(f"While reading includes from {file}")
|
|
| 24 | + raise
|
|
| 21 | 25 | |
| 22 | 26 | def in_rts_dir(path: Path) -> bool:
|
| 23 | 27 | return len(path.parts) > 0 and path.parts[0] == 'rts'
|
| ... | ... | @@ -40,9 +44,14 @@ class RtsHIncludeOrderLinter(Linter): |
| 40 | 44 | '"ghcplatform.h"',
|
| 41 | 45 | }
|
| 42 | 46 | |
| 43 | - includes = get_includes(path)
|
|
| 44 | - headers = [x[1] for x in includes]
|
|
| 45 | - lines = path.read_text().split('\n')
|
|
| 47 | + try:
|
|
| 48 | + includes = get_includes(path)
|
|
| 49 | + headers = [x[1] for x in includes]
|
|
| 50 | + lines = path.read_text(encoding="utf-8").split('\n')
|
|
| 51 | + # #26850
|
|
| 52 | + except Exception as e:
|
|
| 53 | + e.add_note(f"Error while decoding path {path}")
|
|
| 54 | + raise e
|
|
| 46 | 55 | |
| 47 | 56 | if '"PosixSource.h"' in headers:
|
| 48 | 57 | for line_no, header in includes:
|
| ... | ... | @@ -69,18 +78,22 @@ class PrivateIncludeLinter(Linter): |
| 69 | 78 | |
| 70 | 79 | def lint(self, path: Path):
|
| 71 | 80 | private = False
|
| 72 | - lines = path.read_text().split('\n')
|
|
| 73 | - for line_no, include in get_includes(path):
|
|
| 74 | - if include == '"BeginPrivate.h"':
|
|
| 75 | - private = True
|
|
| 76 | - elif include == '"EndPrivate.h"':
|
|
| 77 | - private = False
|
|
| 78 | - elif private:
|
|
| 79 | - self.add_warning(Warning(
|
|
| 80 | - path=path,
|
|
| 81 | - line_no=line_no,
|
|
| 82 | - line_content=lines[line_no-1],
|
|
| 83 | - message='System header %s found inside of <BeginPrivate.h> block' % include))
|
|
| 81 | + try:
|
|
| 82 | + lines = path.read_text(encoding="utf-8").split('\n')
|
|
| 83 | + for line_no, include in get_includes(path):
|
|
| 84 | + if include == '"BeginPrivate.h"':
|
|
| 85 | + private = True
|
|
| 86 | + elif include == '"EndPrivate.h"':
|
|
| 87 | + private = False
|
|
| 88 | + elif private:
|
|
| 89 | + self.add_warning(Warning(
|
|
| 90 | + path=path,
|
|
| 91 | + line_no=line_no,
|
|
| 92 | + line_content=lines[line_no-1],
|
|
| 93 | + message='System header %s found inside of <BeginPrivate.h> block' % include))
|
|
| 94 | + except Exception as e:
|
|
| 95 | + e.add_note(f"While handling {path}")
|
|
| 96 | + raise e
|
|
| 84 | 97 | |
| 85 | 98 | linters = [
|
| 86 | 99 | RtsHIncludeOrderLinter(),
|
| ... | ... | @@ -2,6 +2,8 @@ |
| 2 | 2 | {-# LANGUAGE GADTs #-}
|
| 3 | 3 | {-# LANGUAGE KindSignatures #-}
|
| 4 | 4 | {-# LANGUAGE RankNTypes #-}
|
| 5 | +{-# OPTIONS_GHC -Wno-deprecations #-}
|
|
| 6 | + |
|
| 5 | 7 | module Web.Routing.SafeRouting where
|
| 6 | 8 | |
| 7 | 9 | import Control.DeepSeq (NFData (..))
|