Hey I’m running into this when running `./pants` o...
# development
h
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
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
i think i had cargo re-update from crates.io recently
how do you do that?
a
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
Writing the PR description now!
a
great!
h
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
running now
i repro
👍 1
i agree that we should not merge this until we can fix this issue
h
i repro
Hm this seems unlikely to pass CI, then
a
i'm gonna bisect script
💯 1
h
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
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
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
@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
ohhhhhhhh thank you!
w
yea, could definitely cause this.
[dependencies]
vs
[dev-dependencies]
h
TIL
w
yeaaa. that could be better.
h
That did it! Thank you! And thank you to @aloof-angle-91616 for diving in to this too
a
do we know why we had the different behavior locally vs CI?
h
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
oh ok! thanks stu!