[Git][ghc/ghc][wip/test-nightlies] 2 commits: Remove stray dump flags in GHC.Rename.Names

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Fri May 19 13:57:08 UTC 2023



Matthew Pickering pushed to branch wip/test-nightlies at Glasgow Haskell Compiler / GHC


Commits:
c393da4a by Matthew Pickering at 2023-05-18T10:26:22+01:00
Remove stray dump flags in GHC.Rename.Names

- - - - -
4d8ef877 by Matthew Pickering at 2023-05-19T12:23:55+01:00
ghcup-metadata: Add dlOutput field

ghcup now requires us to add this field which specifies where it should
download the bindist to. See
https://gitlab.haskell.org/ghc/ghcup-metadata/-/issues/1 for some more
discussion.

- - - - -


2 changed files:

- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Rename/Names.hs


Changes:

=====================================
.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
=====================================
@@ -63,7 +63,8 @@ eprint(f"Supported platforms: {job_mapping.keys()}")
 # Artifact precisely specifies a job what the bindist to download is called.
 class Artifact(NamedTuple):
     job_name: str
-    name: str
+    download_name: str
+    output_name: str
     subdir: str
 
 # Platform spec provides a specification which is agnostic to Job
@@ -72,8 +73,14 @@ class PlatformSpec(NamedTuple):
     name: str
     subdir: str
 
-source_artifact = Artifact('source-tarball', 'ghc-{version}-src.tar.xz', 'ghc-{version}' )
-test_artifact = Artifact('source-tarball', 'ghc-{version}-testsuite.tar.xz', 'ghc-{version}' )
+source_artifact = Artifact('source-tarball'
+                          , 'ghc-{version}-src.tar.xz'
+                          , 'ghc-{version}-src.tar.xz'
+                          , 'ghc-{version}' )
+test_artifact = Artifact('source-tarball'
+                        , 'ghc-{version}-testsuite.tar.xz'
+                        , 'ghc-{version}-testsuite.tar.xz'
+                        , 'ghc-{version}' )
 
 def debian(arch, n):
     return linux_platform(arch, "{arch}-linux-deb{n}".format(arch=arch, n=n))
@@ -129,7 +136,7 @@ def download_and_hash(url):
 def mk_one_metadata(release_mode, version, job_map, artifact):
     job_id = job_map[artifact.job_name].id
 
-    url = base_url.format(job_id=job_id, artifact_name=urllib.parse.quote_plus(artifact.name.format(version=version)))
+    url = base_url.format(job_id=job_id, artifact_name=urllib.parse.quote_plus(artifact.download_name.format(version=version)))
 
     # In --release-mode, the URL in the metadata needs to point into the downloads folder
     # rather then the pipeline.
@@ -143,10 +150,13 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
     eprint(f"Bindist URL: {url}")
     eprint(f"Download URL: {final_url}")
 
-    # Download and hash from the release pipeline, this must not change anyway during upload.
+    #Download and hash from the release pipeline, this must not change anyway during upload.
     h = download_and_hash(url)
 
-    res = { "dlUri": final_url, "dlSubdir": artifact.subdir.format(version=version), "dlHash" : h }
+    res = { "dlUri": final_url
+          , "dlSubdir": artifact.subdir.format(version=version)
+          , "dlOutput": artifact.output_name.format(version=version)
+          , "dlHash" : h }
     eprint(res)
     return res
 
@@ -155,7 +165,11 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
 def mk_from_platform(pipeline_type, platform):
     info = job_mapping[platform.name][pipeline_type]
     eprint(f"From {platform.name} / {pipeline_type} selecting {info['name']}")
-    return Artifact(info['name'] , f"{info['jobInfo']['bindistName']}.tar.xz", platform.subdir)
+    return Artifact(info['name']
+                   , f"{info['jobInfo']['bindistName']}.tar.xz"
+                   , "ghc-{version}-{pn}.tar.xz".format(version="{version}", pn=platform.name)
+                   , platform.subdir)
+
 
 # Generate the new metadata for a specific GHC mode etc
 def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):


=====================================
compiler/GHC/Rename/Names.hs
=====================================
@@ -12,8 +12,6 @@ Extracting imported and top-level names in scope
 {-# LANGUAGE TypeFamilies #-}
 {-# LANGUAGE LambdaCase #-}
 
-{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-}
-
 module GHC.Rename.Names (
         rnImports, getLocalNonValBinders, newRecordFieldLabel,
         extendGlobalRdrEnvRn,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/08bd7063963df86397392b5ef4a7322d715a0b23...4d8ef877b4b8bd65ec0ea211abab0f34a307376c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/08bd7063963df86397392b5ef4a7322d715a0b23...4d8ef877b4b8bd65ec0ea211abab0f34a307376c
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/20230519/a0aa7e34/attachment-0001.html>


More information about the ghc-commits mailing list