Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

A developer found pants 'FAILURE: deduced and actual class name mismatch' misleading #15

Open
ericzundel opened this issue Feb 24, 2015 · 0 comments

Comments

@ericzundel
Copy link
Member

jmake: Could not find class file for /Users/cconroy/Development/java/tracon/src/test/java/com/squareup/tracon/protocol/http/match/Foo.java
                         Warning: unable to find .class file corresponding to source /Users/cconroy/Development/java/tracon/src/test/java/com/squareup/tracon/protocol/http/match/Foo.java: expected /Users/cconroy/Development/java/.pants.d/compile/jvm/java/classes/Foo.class

This is a frequently seen error from jmake and can cause some head scratching. There are several different classes of problems that cause this error:

  • multiple top level classes in one source file
  • package name different from source path
  • in this case, the class was commented out.

It might be nice to add some extra logic to jmake to try to guess which problem this is and give better diagnostics.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant