New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Travis CI: Check for undefined references. #2244
Conversation
8f0dfec
to
0e1c1b4
Compare
.travis.yml
Outdated
# Fail if there are undefined references | ||
- if [ "$BUILD_TYPE" = "check-references" ]; then | ||
docker exec -it texlive-basic bash -c "cd /$TRAVIS_REPO_SLUG/source && make -j2"; | ||
! grep -Fqe 'LaTeX Warning: There were undefined references.' std.log; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we roll this into one of the existing tests? It seems awfully wasteful to run a whole new build for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkoeppe Well, this check needs to have the PDF built first (so LaTeX has a chance to try to resolve all the references). We can add the check to one or more of the builds, but then Travis CI would report a build failure instead of just a missing reference error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can totally live with that. All that matters, ever, is green-vs-notgreen.
How about putting this together with the overfull box test?
(We already build this document way too many times. You really think that once should suffice...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tkoeppe Tested and appears to work okay. The only downside is that it doesn't tell you which check fails, so someone will have to do more digging to determine that. Maybe we should add a make test
option that runs the checks locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't a slightly cleverer combination of parentheses and echo
solve this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly. I'll experiment with it and see what I can come up with. I think when I tried something like that previously something (docker?) swallowed stdout. But I might be misremembering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second glance, a simpler option should work. I removed the -q
flag (which suppresses grep's output). So ostensibly the console log should show the Overfull \hbox
messages and the undefined references
message if they exist in std.log
. (Assuming the output doesn't get swallowed by Travis CI.)
8803e78
to
42f7b2b
Compare
42f7b2b
to
1533c74
Compare
This adds a Travis CI check for undefined references (e.g., a
\ref
that points to a nonexistent\label
).This PR causes no change in the PDF output.