Teo Camarasu pushed to branch wip/T25262 at Glasgow Haskell Compiler / GHC
Commits:
-
8e6fa892
by Teo Camarasu at 2025-10-20T12:39:41+01:00
22 changed files:
- + T
- + T.hs
- compiler/ghc.cabal.in
- ghc/ghc-bin.cabal.in
- hadrian/hadrian.cabal
- libraries/Cabal
- + libraries/addupstreams.py
- libraries/bytestring
- libraries/containers
- libraries/exceptions
- libraries/filepath
- libraries/ghc-boot/ghc-boot.cabal.in
- libraries/ghc-compact/ghc-compact.cabal
- libraries/ghc-internal/tools/ucd2haskell/ucd2haskell.cabal
- libraries/ghci/ghci.cabal.in
- libraries/haskeline
- libraries/os-string
- libraries/parsec
- libraries/text
- libraries/time
- libraries/unix
- utils/iserv/iserv.cabal.in
Changes:
| 1 | +{-# LANGUAGE TemplateHaskell #-}
|
|
| 2 | +main = pure $([|1|]) |
| ... | ... | @@ -118,7 +118,7 @@ Library |
| 118 | 118 | deepseq >= 1.4 && < 1.6,
|
| 119 | 119 | directory >= 1 && < 1.4,
|
| 120 | 120 | process >= 1 && < 1.7,
|
| 121 | - bytestring >= 0.11 && < 0.13,
|
|
| 121 | + bytestring >= 0.11 && < 0.14,
|
|
| 122 | 122 | binary == 0.8.*,
|
| 123 | 123 | time >= 1.4 && < 1.16,
|
| 124 | 124 | containers >= 0.6.2.1 && < 0.9,
|
| ... | ... | @@ -36,7 +36,7 @@ Executable ghc |
| 36 | 36 | GHC.Driver.Session.Mode
|
| 37 | 37 | Build-Depends: base >= 4 && < 5,
|
| 38 | 38 | array >= 0.1 && < 0.6,
|
| 39 | - bytestring >= 0.9 && < 0.13,
|
|
| 39 | + bytestring >= 0.9 && < 0.14,
|
|
| 40 | 40 | directory >= 1 && < 1.4,
|
| 41 | 41 | process >= 1 && < 1.7,
|
| 42 | 42 | filepath >= 1.5 && < 1.6,
|
| ... | ... | @@ -155,7 +155,7 @@ executable hadrian |
| 155 | 155 | , TypeFamilies
|
| 156 | 156 | build-depends: Cabal >= 3.13 && < 3.17
|
| 157 | 157 | , base >= 4.11 && < 5
|
| 158 | - , bytestring >= 0.10 && < 0.13
|
|
| 158 | + , bytestring >= 0.10 && < 0.14
|
|
| 159 | 159 | , containers >= 0.5 && < 0.9
|
| 160 | 160 | -- N.B. directory >=1.3.9 as earlier versions are
|
| 161 | 161 | -- afflicted by #24382.
|
| 1 | -Subproject commit d9b0904b49dc84e0bfc79062daf2bbdf9d22a422 |
|
| 1 | +Subproject commit bf964ddcc8e9c3c0a3ae46ab88c020046ac5e402 |
| 1 | +#!/usr/bin/env python3
|
|
| 2 | + |
|
| 3 | +from pathlib import Path
|
|
| 4 | +import subprocess
|
|
| 5 | +import logging
|
|
| 6 | +import re
|
|
| 7 | + |
|
| 8 | +logging.basicConfig(level=logging.INFO)
|
|
| 9 | + |
|
| 10 | +IGNORE = 1 # ignore submodule
|
|
| 11 | +GITHUB_HASKELL = 2 # in the haskell github org
|
|
| 12 | +ORIGIN = 3 # upstream remote == origin remote
|
|
| 13 | + |
|
| 14 | +def github(owner: str, name: str) -> str:
|
|
| 15 | + return f'https://github.com/{owner}/{name}'
|
|
| 16 | + |
|
| 17 | +def github_haskell(name: str) -> str:
|
|
| 18 | + return github('haskell', name)
|
|
| 19 | + |
|
| 20 | +def gitlab_ssh(owner: str, name: str) -> str:
|
|
| 21 | + return f'git@gitlab.haskell.org:{owner}/{name}'
|
|
| 22 | + |
|
| 23 | +upstreams = {
|
|
| 24 | + '.arc-linters/arcanist-external-json-linter': IGNORE,
|
|
| 25 | + 'libffi-tarballs': IGNORE,
|
|
| 26 | + 'libraries/array': GITHUB_HASKELL,
|
|
| 27 | + 'libraries/binary': GITHUB_HASKELL,
|
|
| 28 | + 'libraries/bytestring': GITHUB_HASKELL,
|
|
| 29 | + 'libraries/Cabal': GITHUB_HASKELL,
|
|
| 30 | + 'libraries/containers': GITHUB_HASKELL,
|
|
| 31 | + 'libraries/deepseq': GITHUB_HASKELL,
|
|
| 32 | + 'libraries/directory': GITHUB_HASKELL,
|
|
| 33 | + 'libraries/file-io': GITHUB_HASKELL,
|
|
| 34 | + 'libraries/filepath': GITHUB_HASKELL,
|
|
| 35 | + 'libraries/ghc-bignum/gmp/gmp-tarballs': ORIGIN,
|
|
| 36 | + 'libraries/ghc-internal/gmp/gmp-tarballs': ORIGIN,
|
|
| 37 | + 'libraries/haskeline': GITHUB_HASKELL,
|
|
| 38 | + 'libraries/hpc': ORIGIN,
|
|
| 39 | + 'libraries/integer-gmp/gmp/gmp-tarballs': ORIGIN,
|
|
| 40 | + 'libraries/mtl': GITHUB_HASKELL,
|
|
| 41 | + 'libraries/os-string': GITHUB_HASKELL,
|
|
| 42 | + 'libraries/parallel': GITHUB_HASKELL,
|
|
| 43 | + 'libraries/parsec': GITHUB_HASKELL,
|
|
| 44 | + 'libraries/pretty': GITHUB_HASKELL,
|
|
| 45 | + 'libraries/primitive': GITHUB_HASKELL,
|
|
| 46 | + 'libraries/process': GITHUB_HASKELL,
|
|
| 47 | + 'libraries/semaphore-compat': ORIGIN,
|
|
| 48 | + 'libraries/stm': GITHUB_HASKELL,
|
|
| 49 | + 'libraries/terminfo': GITHUB_HASKELL,
|
|
| 50 | + 'libraries/text': GITHUB_HASKELL,
|
|
| 51 | + 'libraries/time': GITHUB_HASKELL,
|
|
| 52 | + 'libraries/transformers': IGNORE, # darcs mirror
|
|
| 53 | + 'libraries/unix': GITHUB_HASKELL,
|
|
| 54 | + 'libraries/Win32': GITHUB_HASKELL,
|
|
| 55 | + 'nofib': 'https://gitlab.haskell.org/ghc/nofib',
|
|
| 56 | + 'utils/hpc': GITHUB_HASKELL,
|
|
| 57 | + 'utils/haddock': GITHUB_HASKELL,
|
|
| 58 | +}
|
|
| 59 | + |
|
| 60 | +all_submods = [
|
|
| 61 | + line.split()[1]
|
|
| 62 | + for line in subprocess.check_output(['git', 'submodule'], encoding='UTF-8').split('\n')
|
|
| 63 | + if len(line.split()) > 0
|
|
| 64 | +]
|
|
| 65 | + |
|
| 66 | +packages = {
|
|
| 67 | + line.split()[0]: line.split()[3]
|
|
| 68 | + for line in open('packages').read().split('\n')
|
|
| 69 | + if not line.startswith('#')
|
|
| 70 | + if len(line.split()) == 4
|
|
| 71 | + if line.split()[3] != '-'
|
|
| 72 | +}
|
|
| 73 | + |
|
| 74 | +def get_remote_url(submod: str, remote: str):
|
|
| 75 | + p = subprocess.run(['git', '-C', submod, 'remote', 'get-url', remote],
|
|
| 76 | + encoding='UTF-8',
|
|
| 77 | + stdout=subprocess.PIPE,
|
|
| 78 | + stderr=subprocess.DEVNULL)
|
|
| 79 | + if p.returncode == 0:
|
|
| 80 | + return p.stdout
|
|
| 81 | + else:
|
|
| 82 | + return None
|
|
| 83 | + |
|
| 84 | +def add_remote(submod: str, remote: str, url: str):
|
|
| 85 | + old_url = get_remote_url(submod, remote)
|
|
| 86 | + if old_url is None:
|
|
| 87 | + logging.info(f'{submod}: adding remote {remote} = {url}')
|
|
| 88 | + subprocess.call(['git', '-C', submod, 'remote', 'add', remote, url])
|
|
| 89 | + elif old_url == url:
|
|
| 90 | + return
|
|
| 91 | + else:
|
|
| 92 | + logging.info(f'{submod}: updating remote {remote} = {url}')
|
|
| 93 | + subprocess.call(['git', '-C', submod, 'remote', 'set-url', remote, url])
|
|
| 94 | + |
|
| 95 | + #update_remote(submod, remote)
|
|
| 96 | + |
|
| 97 | +def update_remote(submod: str, remote: str):
|
|
| 98 | + subprocess.check_call(['git', '-C', submod, 'remote', 'update', remote])
|
|
| 99 | + |
|
| 100 | +def main():
|
|
| 101 | + for submod in all_submods:
|
|
| 102 | + print(submod)
|
|
| 103 | + upstream = None
|
|
| 104 | + if submod in upstreams:
|
|
| 105 | + upstream = upstreams[submod]
|
|
| 106 | + elif submod in packages:
|
|
| 107 | + upstream = packages[submod]
|
|
| 108 | + |
|
| 109 | + if upstream == ORIGIN:
|
|
| 110 | + upstream = subprocess.check_output(['git', '-C', submod, 'remote', 'get-url', 'origin'], encoding='UTF-8').strip()
|
|
| 111 | + elif upstream == GITHUB_HASKELL:
|
|
| 112 | + upstream = github_haskell(Path(submod).name)
|
|
| 113 | + elif upstream == IGNORE:
|
|
| 114 | + continue
|
|
| 115 | + |
|
| 116 | + if upstream is None:
|
|
| 117 | + print(f'Unknown upstream for {submod}')
|
|
| 118 | + raise ValueError('unknown upstream')
|
|
| 119 | + else:
|
|
| 120 | + print(f'Upstream of {submod} is {upstream}')
|
|
| 121 | + add_remote(submod, 'upstream', upstream)
|
|
| 122 | + |
|
| 123 | + origin = get_remote_url(submod, 'origin')
|
|
| 124 | + m = re.match('https://gitlab.haskell.org/(.*)', origin)
|
|
| 125 | + if m is not None:
|
|
| 126 | + push = f'git@gitlab.haskell.org:{m.group(1)}'
|
|
| 127 | + print(f'origin-push of {submod} is {push}')
|
|
| 128 | + add_remote(submod, 'origin-push', push)
|
|
| 129 | + |
|
| 130 | + name = Path(submod).name
|
|
| 131 | + add_remote(submod, 'teo', f'git@github.com:TeofilC/{name}')
|
|
| 132 | + |
|
| 133 | +if __name__ == '__main__':
|
|
| 134 | + main()
|
|
| 135 | + |
| 1 | -Subproject commit d984ad00644c0157bad04900434b9d36f23633c5 |
|
| 1 | +Subproject commit 99ec2e9ef46c2e4cef7bf0d4505d66725ea0a842 |
| 1 | -Subproject commit 801b06e5d4392b028e519d5ca116a2881d559721 |
|
| 1 | +Subproject commit fef23e3d99597e9b34dd6fe6f1e7f49676b4bed3 |
| 1 | -Subproject commit b6c4290124eb1138358bf04ad9f33e67f6c5c1d8 |
|
| 1 | +Subproject commit 6268676cddc3dfc164896bcb981054fe49d6ba91 |
| 1 | -Subproject commit cbcd0ccf92f47e6c10fb9cc513a7b26facfc19fe |
|
| 1 | +Subproject commit e4cc73a60a7fa0111715292626fd0e1b01d4d39e |
| ... | ... | @@ -77,7 +77,7 @@ Library |
| 77 | 77 | |
| 78 | 78 | build-depends: base >= 4.7 && < 4.23,
|
| 79 | 79 | binary == 0.8.*,
|
| 80 | - bytestring >= 0.10 && < 0.13,
|
|
| 80 | + bytestring >= 0.10 && < 0.14,
|
|
| 81 | 81 | containers >= 0.5 && < 0.9,
|
| 82 | 82 | directory >= 1.2 && < 1.4,
|
| 83 | 83 | filepath >= 1.3 && < 1.6,
|
| ... | ... | @@ -40,7 +40,7 @@ library |
| 40 | 40 | CPP
|
| 41 | 41 | |
| 42 | 42 | build-depends: base >= 4.9.0 && < 4.23,
|
| 43 | - bytestring >= 0.10.6.0 && <0.13
|
|
| 43 | + bytestring >= 0.10.6.0 && <0.14
|
|
| 44 | 44 | ghc-options: -Wall
|
| 45 | 45 | |
| 46 | 46 | exposed-modules: GHC.Compact
|
| ... | ... | @@ -53,7 +53,7 @@ executable ucd2haskell |
| 53 | 53 | Generator.WordEncoding
|
| 54 | 54 | build-depends:
|
| 55 | 55 | base >= 4.7 && < 5
|
| 56 | - , bytestring >= 0.11 && < 0.13
|
|
| 56 | + , bytestring >= 0.11 && < 0.14
|
|
| 57 | 57 | , directory >= 1.3.6 && < 1.4
|
| 58 | 58 | , filepath >= 1.4.2 && < 1.6
|
| 59 | 59 | , getopt-generics >= 0.13 && < 0.14
|
| ... | ... | @@ -89,7 +89,7 @@ library |
| 89 | 89 | ghc-internal >= 9.1001.0 && <=@ProjectVersionForLib@.0,
|
| 90 | 90 | ghc-prim >= 0.5.0 && < 0.14,
|
| 91 | 91 | binary == 0.8.*,
|
| 92 | - bytestring >= 0.10 && < 0.13,
|
|
| 92 | + bytestring >= 0.10 && < 0.14,
|
|
| 93 | 93 | containers >= 0.5 && < 0.9,
|
| 94 | 94 | deepseq >= 1.4 && < 1.6,
|
| 95 | 95 | filepath >= 1.4 && < 1.6,
|
| 1 | -Subproject commit 991953cd5d3bb9e8057de4a0d8f2cae3455865d8 |
|
| 1 | +Subproject commit c61650dc4cbbb4b7f5c8f96ccb23bb48dc5f580f |
| 1 | -Subproject commit 2e693aad07540173a0169971b27c9acac28eeff1 |
|
| 1 | +Subproject commit 13b7bef9c40cd454a6e7b357dece7262e5276744 |
| 1 | -Subproject commit 552730e23e1fd2dae46a60d75138b8d173492462 |
|
| 1 | +Subproject commit cbd35433d33a05676266d516e612b0aa31d5a5bc |
| 1 | -Subproject commit 5f343f668f421bfb30cead594e52d0ac6206ff67 |
|
| 1 | +Subproject commit b302347c7a1965a3e411bf885a1fc10b69f33744 |
| 1 | -Subproject commit 507f50844802f1469ba6cadfeefd4e3fecee0416 |
|
| 1 | +Subproject commit 4ae1bbd587bcbe0c643cefb00337ce85e0ff2507 |
| 1 | -Subproject commit c9b3e95b5c15b118e55522bd92963038c6a88160 |
|
| 1 | +Subproject commit 2076de9eabaeeca54e6e5715f26798248abaf67d |
| ... | ... | @@ -33,7 +33,7 @@ Executable iserv |
| 33 | 33 | Build-Depends: array >= 0.5 && < 0.6,
|
| 34 | 34 | base >= 4 && < 5,
|
| 35 | 35 | binary >= 0.7 && < 0.11,
|
| 36 | - bytestring >= 0.10 && < 0.13,
|
|
| 36 | + bytestring >= 0.10 && < 0.14,
|
|
| 37 | 37 | containers >= 0.5 && < 0.9,
|
| 38 | 38 | deepseq >= 1.4 && < 1.6,
|
| 39 | 39 | ghci == @ProjectVersionMunged@
|