New bugs
Robert Field
robert.field at oracle.com
Tue Mar 3 21:19:15 UTC 2015
On 03/03/15 12:59, andrei.eremeev wrote:
> I tried classpath manually.
>
> -> new Test();
> | Error:
> | cannot find symbol
> | symbol: class Test
> | new Test();
> | ^---^
>
> -> /cp .
> | Path . added to classpath
>
> -> new Test();
> | Error:
> | cannot find symbol
> | symbol: class Test
> | new Test();
> | ^---^
>
> -> | State engine terminated. Resetting...
> andrei-eremeev at aeremeev:/export/data/repositories/repl/langtools/repl$
> ls Test*
> Test.class Test.java
>
> As you can see, current directory contains class Test, but REPL cannot
> find it.
The unnamed package is unique:
http://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4.2
This works with named packages.
> I will add a thorough test suite for classpath (API and shell) tomorrow.
Thanks,
Robert
>
> Andrei Eremeev
>
> On 03/03/2015 11:53 PM, Robert Field wrote:
>>
>> On 03/03/15 12:21, andrei.eremeev wrote:
>>> Hi REPL team,
>>>
>>> 1. /c or /classes prints "class" for enums and annotations, while
>>> "interface" is printed for interfaces.
>>> -> @interface A {}
>>> | Added annotation interface A
>>>
>>> -> /c
>>> | class A
>>>
>>> -> enum A {}
>>> | Replaced enum A
>>>
>>> -> /c
>>> | class A
>>>
>>> -> interface A {}
>>> | Replaced interface A
>>>
>>> -> /c
>>> | interface A
>>
>> Thanks for the test and TODO. Fortunately that will be easy to fix
>> ;-)
>>
>>>
>>> 2. IllegalArgumentException is not thrown when currentDeclaration is
>>> called on the snippet declared in another state.
>>> See the provided example (The appropriate test will be pushed soon).
>>>
>>> SnippetInfo info = assertEval1("class A { void f() {} }");
>>> EvalProcessing evalProcessing =
>>> EvalProcessing.create(newTestingInputStream(),
>>> newPrintStream(newByteArrayOutputStream()),
>>> newPrintStream(newByteArrayOutputStream()));
>>> try(EvalState state = evalProcessing.evalState()) {
>>> List<EvalResult> results = state.eval("class A { int f() {
>>> return 0; } }");
>>> assertEquals(results.size(),1,"Too much snippets");
>>> EvalResult result = results.get(0);
>>> assertTrue(result.outcome.success,"Compilation failed");
>>> state.currentResolution(info.key());
>>> }
>>
>> Thanks for the test and TODO.
>>
>>>
>>> 3. It looks like addToClasspath is broken, REPL cannot find any
>>> classes added to classpath.
>>
>> My ad hoc tests worked. Given that testing this needs side files,
>> wasn't sure of the "right" way to add to the test framework. Can you
>> add tests that show it failing?
>>
>> Thanks,
>> Robert
>>
>>>
>>> Andrei Eremeev
>>
>
More information about the kulla-dev
mailing list