https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

01/29/2020, 5:00 AM
Hey I’m running into this when running
./pants
on a PR that changes
src/rust/engine/fs/src/lib.rs
. Greg ran into the issue early today. Any idea why this isn’t happening in CI?
Copy code
error[E0432]: unresolved import `testutil`
 --> fs/src/posixfs_tests.rs:2:5
  |
2 | use testutil;
  |     ^^^^^^^^ no `testutil` external crate

error[E0433]: failed to resolve: use of undeclared type or module `tokio`
   --> fs/src/posixfs_tests.rs:374:21
    |
374 |   let mut runtime = tokio::runtime::Runtime::new().unwrap();
    |                     ^^^^^ use of undeclared type or module `tokio`

error: unused import: `tempfile`
 --> fs/src/posixfs_tests.rs:1:5
  |
1 | use tempfile;
  |     ^^^^^^^^
  |
note: lint level defined here
 --> fs/src/lib.rs:4:9
  |
4 | #![deny(warnings)]
  |         ^^^^^^^^
  = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`

error: unused imports: `GlobExpansionConjunction`, `GlobMatching`, `PathGlobs`, `PathStatGetter`, `PathStat`, `StrictGlobMatching`
 --> fs/src/posixfs_tests.rs:5:32
  |
5 |   Dir, DirectoryListing, File, GlobExpansionConjunction, GlobMatching, Link, PathGlobs, PathStat,
  |                                ^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^        ^^^^^^^^^  ^^^^^^^^
6 |   PathStatGetter, PosixFS, Stat, StrictGlobMatching, SymlinkBehavior, VFS,
  |   ^^^^^^^^^^^^^^                 ^^^^^^^^^^^^^^^^^^

error: unused import: `Future`
 --> fs/src/posixfs_tests.rs:9:31
  |
9 | use futures01::future::{self, Future};
  |                               ^^^^^^
a

aloof-angle-91616

01/29/2020, 5:02 AM
hmmmm
i think we added a new dep earlier today or yesterday, i think i had cargo re-update from crates.io recently
which PR?
also, i think in chat, i would prefer using slack snippets for code, because they can take up less vertical space unless someone elects to expand it
👍 1
not a problem
h

hundreds-father-404

01/29/2020, 5:08 AM
i think i had cargo re-update from crates.io recently
how do you do that?
a

aloof-angle-91616

01/29/2020, 5:23 AM
omg
oh and
i meant i had cargo re-update automatically
so if you didn't have that happen, it may be related
and not re-update cargo itself
but update the package listing from crates.io
which just takes a long time so i noticed
also thank you @witty-crayon-22786 for https://github.com/pantsbuild/pants/pull/9018/ rust async await is so incredibly hype
❤️ 1
if you send me the PR that's failing i can try to investigate
@hundreds-father-404^
it's late so no rush just wanted to make sure you saw
h

hundreds-father-404

01/29/2020, 5:44 AM
Writing the PR description now!
a

aloof-angle-91616

01/29/2020, 5:44 AM
great!
h

hundreds-father-404

01/29/2020, 5:49 AM
https://github.com/pantsbuild/pants/pull/9032 I’d greatly appreciate if you could please pull it down and try running
./pants
. Even if CI ends up going green, I’m concerned that when people pull master and run
./pants
, things will fail
a

aloof-angle-91616

01/29/2020, 5:57 AM
running now
i repro
👍 1
i agree that we should not merge this until we can fix this issue
h

hundreds-father-404

01/29/2020, 5:57 AM
i repro
Hm this seems unlikely to pass CI, then
a

aloof-angle-91616

01/29/2020, 5:57 AM
i'm gonna bisect script
💯 1
h

hundreds-father-404

01/29/2020, 5:58 AM
I can’t figure out how to fix things. I tried removing the problematic imports but then it complained it couldn’t find the symbols
a

aloof-angle-91616

01/29/2020, 5:58 AM
we apparently upgraded cargo to 1.40 as well
👍 1
(which is almost definitely the issue)
bisecting to check though
and then figure out why
h

hundreds-father-404

01/29/2020, 5:59 AM
Ohhhh that sounds like it. I thought it was
async await
but that change was minimal and I don’t think that was it anymore
w

witty-crayon-22786

01/29/2020, 6:01 AM
@hundreds-father-404:
Copy code
#[cfg(test)]
mod fs_tests;
mod posixfs_tests;
has the effect of only the top thing being marked a test
...might cause this?
h

hundreds-father-404

01/29/2020, 6:02 AM
ohhhhhhhh thank you!
w

witty-crayon-22786

01/29/2020, 6:02 AM
yea, could definitely cause this.
[dependencies]
vs
[dev-dependencies]
h

hundreds-father-404

01/29/2020, 6:02 AM
TIL
w

witty-crayon-22786

01/29/2020, 6:03 AM
yeaaa. that could be better.
h

hundreds-father-404

01/29/2020, 6:03 AM
That did it! Thank you! And thank you to @aloof-angle-91616 for diving in to this too
a

aloof-angle-91616

01/29/2020, 6:04 AM
do we know why we had the different behavior locally vs CI?
h

hundreds-father-404

01/29/2020, 6:04 AM
do we know why we had the different behavior locally vs CI?
CI failed too. This was only happening on my branch because of the bad change I made Greg said he had encountered a very similar issue, though..not sure what that was
a

aloof-angle-91616

01/29/2020, 6:05 AM
oh ok! thanks stu!