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

Move libtest out of rust-lang/rust #57842

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@gnzlbg
Copy link
Contributor

gnzlbg commented Jan 22, 2019

This is a first step towards a number of goals explained in this internals post: https://internals.rust-lang.org/t/a-path-forward-towards-re-usable-libtest-functionality-custom-test-frameworks-and-a-stable-bench-macro

This PR does not fully remove libtest from rust-lang/rust, we keep a shim that imports and re-exports the external libtest, and adds the proc_macro dependency, etc.

r? @alexcrichton

cc @djrenren @petrochenkov

@gnzlbg

This comment has been minimized.

Copy link
Contributor Author

gnzlbg commented Jan 22, 2019

@alexcrichton once we have something that "works" for this PR, it would be great if you could move the extracted libtest source (https://github.com/gnzlbg/libtest) into a Rust org (the nursery or rust-lang/rust).

Also, I extracted the libtest crate there by forking the rust repo and removing everything but the crate, because I wanted to preserve the history. But this means that the libtest crate repo is huge, which makes the initial fetch very slow. I think this won't be a problem once we release the libtest crate to crates.io and add it as a normal dependency instead of a git dependency, but I prefer to do that when the official repo for libtest is set up.

@djrenren

This comment has been minimized.

Copy link
Contributor

djrenren commented Jan 22, 2019

Hey heads up, with respect to size, we can use git filter-branch to retain only the history of the folder.

From a fresh checkout of rust-lang/rust I just ran:

git filter-branch --prune-empty --subdirectory-filter src/libtest master

I've hosted the result here: https://github.com/djrenren/libtest

but it looks like it lacks libterm and licenses. Still I think this is a good idea to clean up the history.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 22, 2019

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:10bc2efe:start=1548187995177865080,finish=1548188081514306979,duration=86336441899
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
[00:01:22] 
######################################################################## 100.0%
[00:01:22] extracting /checkout/obj/build/cache/2019-01-04/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
[00:01:22]     Updating crates.io index
[00:01:32]     Updating git repository `https://github.com/gnzlbg/libtest`
[00:04:04]   Downloaded cmake v0.1.33
[00:04:04]   Downloaded serde_derive v1.0.81
[00:04:04]   Downloaded time v0.1.40
[00:04:04]   Downloaded toml v0.4.10
---

[00:05:59] travis_fold:start:tidy
travis_time:start:tidy
tidy check
[00:05:59] tidy error: /checkout/src/libtest/lib.rs:1: TODO is deprecated; use FIXME
[00:06:01] invalid source: "git+https://github.com/gnzlbg/libtest#01f857bc49ce423bae84368226a17854c47c109a"
[00:06:01] invalid source: "git+https://github.com/gnzlbg/libtest#01f857bc49ce423bae84368226a17854c47c109a"
[00:06:01] some tidy checks failed
[00:06:01] 
[00:06:01] 
[00:06:01] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:06:01] 
[00:06:01] 
[00:06:01] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:06:01] Build completed unsuccessfully in 0:00:48
[00:06:01] Build completed unsuccessfully in 0:00:48
[00:06:01] Makefile:69: recipe for target 'tidy' failed
[00:06:01] make: *** [tidy] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0baf7eb6
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Jan 22 20:20:51 UTC 2019
---
travis_time:end:1695083d:start=1548188452043108450,finish=1548188452047722788,duration=4614338
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:38ecf0cb
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0ea59972
travis_time:start:0ea59972
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:0bc74ed9
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 22, 2019

Heh seems like a good start! Always like seeing those massive negative numbers :)

Some other items to cover before merging:

  • All unstable code should continue to live in this repository (but the bulk of all code should still live externally)
  • We'll want to move the repo under the rust-lang GitHub organization (let me know when you're ready)
  • We'll want to publish to crates.io and depend on the crates there from the unstable code in this repo
@Dylan-DPC

This comment has been minimized.

Copy link
Member

Dylan-DPC commented Feb 11, 2019

ping from triage @gnzlbg you need to address the first point in #57842 (comment) and the conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment