[Git][ghc/ghc][wip/memory-barriers] 4 commits: Fix two lint failures in rts/linker/MachO.c

Ben Gamari gitlab at gitlab.haskell.org
Fri Jun 7 15:04:46 UTC 2019



Ben Gamari pushed to branch wip/memory-barriers at Glasgow Haskell Compiler / GHC


Commits:
975b7972 by Matthew Pickering at 2019-06-07T15:04:19Z
Fix two lint failures in rts/linker/MachO.c

- - - - -
a623940c by Matthew Pickering at 2019-06-07T15:04:22Z
gitlab-ci: Linters, don't allow to fail

Ben disabled them in cd85f8a71bb56cff332560e1d571b3406789fb71 but didn't
say how or why they were broken.

- - - - -
9553a920 by Matthew Pickering at 2019-06-07T15:04:23Z
gitlab-ci: Don't run two submodule checking jobs on Marge jobs

- - - - -
60373c3d by Ben Gamari at 2019-06-07T15:04:25Z
gitlab-ci: Use --unshallow when fetching for linters

GitLab creates a shallow clone. However, this means that we may not have
the base commit of an MR when linting, causing `git merge-base` to fail.
Fix this by passing `--unshallow` to `git fetch`, ensuring that we have
the entire history.

- - - - -


2 changed files:

- .gitlab-ci.yml
- rts/linker/MachO.c


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -49,13 +49,16 @@ stages:
 ############################################################
 
 ghc-linters:
-  allow_failure: true
   stage: lint
   image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
   script:
-    - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
+    # GitLab creates a shallow clone which means that we may not have the base
+    # commit of the MR being tested (e.g. if the MR is quite old), causing `git
+    # merge-base` to fail.  Passing `--unshallow` to `git fetch` ensures that
+    # we have the entire history.
+    - git fetch --unshallow "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
     - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
-    - "echo Merge base $base"
+    - "echo Linting changes between $base..$CI_COMMIT_SHA"
     #    - validate-commit-msg .git $(git rev-list $base..$CI_COMMIT_SHA)
     - validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA)
     - .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA
@@ -101,6 +104,9 @@ lint-submods-mr:
   only:
     refs:
       - merge_requests
+  except:
+    variables:
+      - $CI_MERGE_REQUEST_LABELS =~ /.*wip/marge_bot_batch_merge_job.*/
 
 .lint-changelogs:
   stage: lint


=====================================
rts/linker/MachO.c
=====================================
@@ -1216,7 +1216,7 @@ ocGetNames_MachO(ObjectCode* oc)
     IF_DEBUG(linker, debugBelch("ocGetNames_MachO: will load %d sections\n",
                                 oc->n_sections));
 
-#if defined (ios_HOST_OS)
+#if defined(ios_HOST_OS)
     for(int i=0; i < oc->n_sections; i++)
     {
         MachOSection * section = &oc->info->macho_sections[i];
@@ -1641,7 +1641,7 @@ ocResolve_MachO(ObjectCode* oc)
     {
         IF_DEBUG(linker, debugBelch("ocResolve_MachO: relocating section %d\n", i));
 
-#if defined aarch64_HOST_ARCH
+#if defined(aarch64_HOST_ARCH)
         if (!relocateSectionAarch64(oc, &oc->sections[i]))
             return 0;
 #else



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/467172e3951f65c312a8720f9b7bca164687229e...60373c3d871a419766a181280d5c85f6c601f550

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/467172e3951f65c312a8720f9b7bca164687229e...60373c3d871a419766a181280d5c85f6c601f550
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/20190607/6841819b/attachment-0001.html>


More information about the ghc-commits mailing list