add a new Travis CI check that 'make alldepend' is a no-op#8753
add a new Travis CI check that 'make alldepend' is a no-op#8753gasche merged 2 commits intoocaml:trunkfrom
Conversation
|
I can't remember what is in place for canonicalising the dependency files (I know you've done some things with this before?). I wonder if it might want to be restricted to checking the OCaml dependencies only, but leave C dependencies alone? |
|
Overall, it's a good idea, though! |
|
Checking only OCaml dependencies: I think that would be nice, but I don't know how to do that without splitting the single per-directory |
|
I'm just doing some checking on that - incidentally, I don't think your code as it stands can possibly work, because |
|
I initially started with a check that is part of Build, but in fact at least the OCaml part works from the I should definitely configure first, and I forgot that. I will experiment on my local machine to ensure that |
|
Quick testing suggests that I need to The reason why I moved the check out of the main Build test is that I expect this check to fail on a semi-regular basis, and I want to make sure that it is very clear to users what is failing. I can print a lot of contextual information (and I do), but having a separate check at the Travis level will always be a much better user interface. |
|
OK, testing df63138 on CentOS 7 and Ubuntu 18.04. They both find the following actual missing dependency: diff --git a/otherlibs/dynlink/.depend b/otherlibs/dynlink/.depend
index bbad580..0a3555b 100644
--- a/otherlibs/dynlink/.depend
+++ b/otherlibs/dynlink/.depend
@@ -14,7 +14,8 @@ dynlink_common.cmi : \
dynlink_platform_intf.cmo : \
dynlink_types.cmi \
dynlink_platform_intf.cmi
-dynlink_platform_intf.cmi :
+dynlink_platform_intf.cmi : \
+ dynlink_types.cmi
dynlink_types.cmo : \
dynlink_types.cmi
dynlink_types.cmi :but Ubuntu also generates this: dra@bionic:~/ocaml$ git diff --stat otherlibs/dynlink/.depend | 3 ++- otherlibs/unix/.depend | 24 ++++++++++++------------ runtime/.depend | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------- 3 files changed, 94 insertions(+), 93 deletions(-) and the extra changes are all C dependencies which have been reordered. |
|
So it seems that we do need to separately check for C and OCaml dependencies... |
|
I decided to close the PR for now, because I don't have the time to make it work correctly (by separating differences in OCaml and C dependencies somehow). |
|
This branch should work if #9332 is accepted |
|
#9332 will be merged once CI comes back - this PR I think should then "just work" (modulo a rebase) and add considerable value |
|
Thanks for reviving this one. Indeed, it would be nice to have this if we get rid of C dependencies. I am less available to deal with this right now, so please feel free to adopt this PR if there are further changes to be made and you want to avoid delays on my end. |
|
I am trying to test the rebased patchset at home and I encountered two issues:
I fixed (1) by pushing a change to BEST_OCAMLDEP to use the bootstrap compiler instead of |
|
The |
|
I tried to push a fix for the cst2constr.h failure I was observing. I don't know if this is a real issue and, in that case, why it was not caught earlier. |
|
Sorry @gasche, I didn't realise you'd start working on it given your comment - I've been fixing this in my own fork temporarily. |
|
I took 3db9aab and have set this build running - https://travis-ci.org/github/dra27/ocaml/builds/681862234 |
|
The simpler fix for the win32unix problem is twofold: firstly there's no reason for |
|
Can I force push dra27@d8c8b5f here? |
|
https://travis-ci.org/github/dra27/ocaml/jobs/681862241 succeeded in 1:11, which I think is OK for this test |
|
Hm.
|
|
I haven't just disabled - I've fixed it and disabled it. There was one missing flag in one Makefile for a quite complicated piece of work - please shoot me! |
|
This test does not need to generate C file dependencies, so I put |
|
Thanks! I found the fix you mention in your branch, I looked at the gcc documentation and I understand what MG does now. This is a bug in #9332; in particular, I think we should move this conversation to #9322, fix it now, and go back to the present PR later. |
|
Yes, I'm already working on it |
|
Just to confirm: I am now convinced that I should stop working on it again, and will try to stick to it. Please feel free to force-push. (Thanks for the explanation on the configuration change.) |
|
Hopefully this will now have CI greenness by the morning! (it's passed Travis on my fork, again) |
|
Huzzah, modulo the Changes test, we have green. I committed a dummy version with @gasche - I've put the no-change-entry-needed label on, but no problem if you want to put an entry in, obviously. I'm happy with the |
|
Indeed, I merged. |
|
Hopefully that’s an end of - or at least big reduction in - random unexplained parallel build failures! |
|
I'm getting increasingly skeptical about this; I observe many parallel build failures when doing incremental builds (typically interactions between stdlib, .cma and plain compilation units), and I think that most of them are due to incorrect Makefile dependencies rather than incorrect module dependency information. |
|
What about that leaves you skeptical that this at least improves things? |
|
Oh, I think the check is a good idea. I'm skeptical that it will fix a large proportion of the parallel build failures I see in my personal usage. |
|
Ah well, onwards and upwards, then! 🙂 |
Parallel build breaks in the development version when we forget to run
make alldependafter some of our changes. (The releases are safe from this issue because refreshing dependencies is part of the release process.) This is annoying¹.The present PR adds a check that
make alldependis a no-op at each pull-request. The hope is that people who forgot to runmake alldependwill get surprised by test failures, instead of random developers surprised by parallel build failures.This test might prove too fragile in practice, if C-dependency tools have an output that varies too much from one contributor's environment to another. I propose to merge and see, backtracking if problems happen.
¹: As an example of annoyance, see the related comment where @dra27 wonders about the reasonableness of enabling parallel builds on
+trunkopam switches: ocaml/opam-repository#14257 (comment)..