slachiewicz / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

Caliper stopped displaying user error messages appropriately #173

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I make a mistake on my command line I used to get:

Cannot convert value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10

Instead now I get:

com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, com.google.caliper.util.InvalidCommandException: 
Cannot convert value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
  at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:122)
  while locating com.google.caliper.runner.BenchmarkClass
    for parameter 3 at com.google.caliper.runner.CaliperRun.<init>(CaliperRun.java:123)
  while locating com.google.caliper.runner.CaliperRun
Caused by: com.google.caliper.util.InvalidCommandException: Cannot convert 
value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
        at com.google.caliper.runner.BenchmarkClass.validateParameters(BenchmarkClass.java:215)
        at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1048)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1037)
        at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:96)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:65)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:54)
        at com.google.caliper.Runner.main(Runner.java:448)
        at com.google.common.collect.SetContainsBenchmark.main(SetContainsBenchmark.java:82)

2) Error in custom provider, com.google.caliper.util.InvalidCommandException: 
Cannot convert value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
  at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:122)
  while locating com.google.caliper.runner.BenchmarkClass
    for parameter 1 at com.google.caliper.runner.OutputFileDumper.<init>(OutputFileDumper.java:49)
  while locating com.google.caliper.runner.OutputFileDumper
  while locating com.google.caliper.runner.ResultProcessor annotated with @com.google.inject.multibindings.Element(setName=,uniqueId=16, type=MULTIBINDER)
  at com.google.caliper.runner.RunnerModule.configure(RunnerModule.java:66)
  while locating java.util.Set<com.google.caliper.runner.ResultProcessor>
    for parameter 6 at com.google.caliper.runner.CaliperRun.<init>(CaliperRun.java:123)
  while locating com.google.caliper.runner.CaliperRun
Caused by: com.google.caliper.util.InvalidCommandException: Cannot convert 
value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
        at com.google.caliper.runner.BenchmarkClass.validateParameters(BenchmarkClass.java:215)
        at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1055)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:328)
        at com.google.inject.multibindings.Multibinder$RealMultibinder.get(Multibinder.java:222)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1048)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1037)
        at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:96)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:65)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:54)
        at com.google.caliper.Runner.main(Runner.java:448)
        at com.google.common.collect.SetContainsBenchmark.main(SetContainsBenchmark.java:82)

3) Error in custom provider, com.google.caliper.util.InvalidCommandException: 
Cannot convert value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
  at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:122)
  while locating com.google.caliper.runner.BenchmarkClass
  at com.google.caliper.runner.RunnerModule.provideBenchmarkMethods(RunnerModule.java:130)
  while locating com.google.common.collect.ImmutableSet<com.google.caliper.runner.BenchmarkMethod>
    for parameter 0 at com.google.caliper.runner.FullCartesianScenarioSelection.<init>(FullCartesianScenarioSelection.java:46)
  while locating com.google.caliper.runner.FullCartesianScenarioSelection
  while locating com.google.caliper.runner.ScenarioSelection
    for parameter 8 at com.google.caliper.runner.CaliperRun.<init>(CaliperRun.java:123)
  while locating com.google.caliper.runner.CaliperRun
Caused by: com.google.caliper.util.InvalidCommandException: Cannot convert 
value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
        at com.google.caliper.runner.BenchmarkClass.validateParameters(BenchmarkClass.java:215)
        at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1055)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:90)
        at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:99)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1048)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1037)
        at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:96)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:65)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:54)
        at com.google.caliper.Runner.main(Runner.java:448)
        at com.google.common.collect.SetContainsBenchmark.main(SetContainsBenchmark.java:82)

4) Error in custom provider, com.google.caliper.util.InvalidCommandException: 
Cannot convert value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
  at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:122)
  while locating com.google.caliper.runner.BenchmarkClass
  at com.google.caliper.runner.RunnerModule.provideBenchmarkParameters(RunnerModule.java:81)
  while locating com.google.common.collect.ImmutableSetMultimap<java.lang.String, java.lang.String> annotated with @com.google.caliper.runner.BenchmarkParameters()
    for parameter 2 at com.google.caliper.runner.FullCartesianScenarioSelection.<init>(FullCartesianScenarioSelection.java:46)
  while locating com.google.caliper.runner.FullCartesianScenarioSelection
  while locating com.google.caliper.runner.ScenarioSelection
    for parameter 8 at com.google.caliper.runner.CaliperRun.<init>(CaliperRun.java:123)
  while locating com.google.caliper.runner.CaliperRun
Caused by: com.google.caliper.util.InvalidCommandException: Cannot convert 
value 'Hash10' to type 'SetImpl': No enum const class 
com.google.common.collect.BenchmarkHelpers$SetImpl.Hash10
        at com.google.caliper.runner.BenchmarkClass.validateParameters(BenchmarkClass.java:215)
        at com.google.caliper.runner.RunnerModule.provideBenchmarkClass(RunnerModule.java:123)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1055)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.spi.ProviderLookup$1.get(ProviderLookup.java:90)
        at com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:99)
        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.FactoryProxy.get(FactoryProxy.java:56)
        at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:38)
        at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:62)
        at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
        at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:88)
        at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:269)
        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1002)
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1048)
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:998)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1037)
        at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:96)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:65)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:54)
        at com.google.caliper.Runner.main(Runner.java:448)
        at com.google.common.collect.SetContainsBenchmark.main(SetContainsBenchmark.java:82)

4 errors
        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1011)
        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1037)
        at com.google.caliper.runner.CaliperMain.exitlessMain(CaliperMain.java:96)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:65)
        at com.google.caliper.runner.CaliperMain.main(CaliperMain.java:54)
        at com.google.caliper.Runner.main(Runner.java:448)
        at com.google.common.collect.SetContainsBenchmark.main(SetContainsBenchmark.java:82)

An unexpected exception has been thrown by the caliper runner.
Please see https://sites.google.com/site/caliperusers/issues

Original issue reported on code.google.com by kevinb@google.com on 11 Oct 2012 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by gak@google.com on 1 Nov 2012 at 9:22

GoogleCodeExporter commented 9 years ago

Original comment by gak@google.com on 4 Apr 2013 at 8:35