`buck project /...` doesn't give reasonable error message
Created by: raviagarwal7
below is the error message received when running buck build /...
.
Action graph will be rebuilt because files have been added or removed.
Generating project: finished in 0.1 sec
UNKNOWN ERROR: null
java.lang.IllegalStateException
at com.google.common.base.Preconditions.checkState(Preconditions.java:488)
at com.facebook.buck.parser.AbstractBuildFileSpec.forEachBuildFileWatchman(AbstractBuildFileSpec.java:163)
at com.facebook.buck.parser.AbstractBuildFileSpec.forEachBuildFile(AbstractBuildFileSpec.java:114)
at com.facebook.buck.parser.BuildFileSpec.forEachBuildFile(BuildFileSpec.java:16)
at com.facebook.buck.parser.AbstractBuildFileSpec.findBuildFiles(AbstractBuildFileSpec.java:269)
at com.facebook.buck.parser.BuildFileSpec.findBuildFiles(BuildFileSpec.java:16)
at com.facebook.buck.parser.TargetSpecResolver.resolveTargetSpecs(TargetSpecResolver.java:85)
at com.facebook.buck.parser.DefaultParser.resolveTargetSpecs(DefaultParser.java:460)
at com.facebook.buck.ide.intellij.IjProjectCommandHelper.parseTargetsAndRunProjectGenerator(IjProjectCommandHelper.java:145)
at com.facebook.buck.cli.ProjectCommand.runWithoutHelp(ProjectCommand.java:291)
at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:307)
at com.facebook.buck.cli.AbstractContainerCommand.run(AbstractContainerCommand.java:77)
at com.facebook.buck.cli.Main.runMainWithExitCode(Main.java:1146)
at com.facebook.buck.cli.Main.runMainThenExit(Main.java:422)
at com.facebook.buck.cli.Main.nailMain(Main.java:2078)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:280)
We have reasonable error message for other cases
$ buck build /Users/...
Build target path should start with an optional cell name, then // and then a relative directory name, not an absolute directory path (found ///Users/...)
$ buck build test
test references non-existent directory test