teavm icon indicating copy to clipboard operation
teavm copied to clipboard

Apparently incorrect package name in ZoneRulesBuilder

Open dsyer opened this issue 3 years ago • 12 comments

ZoneRulesBuilder has package org.threeten.bp.zone; (https://github.com/konsoletyper/teavm/blob/master/tests/src/test/java/org/teavm/classlib/java/time/zone/TestZoneRulesBuilder.java#L47) but that's not consistent with its location in the source tree. Apparently the project still builds (how? maybe tests is not part of the build?) but it upsets the IDE, so I can't work comfortably on this project, if I wanted to fix a bug maybe.

dsyer avatar Mar 25 '22 08:03 dsyer

That's correct location according to these rules. That was done intentionally to be able to simplify merging changes from threeten repository.

konsoletyper avatar Mar 25 '22 08:03 konsoletyper

Yikes. That's complicated. I can't think of a way to persuade the IDE to just ignore that though. Oh well. Is it temporary?

dsyer avatar Mar 25 '22 09:03 dsyer

Ah, I see. Misunderstood your initial question. Now fixed that. Looks like ZoneRulesBuilder was not used anywhere and I simply removed it and tests for it

konsoletyper avatar Mar 25 '22 10:03 konsoletyper

That's helpful, thanks. Now I'm stuck on a load of non-existent dependencies in tools/idea and subdirs. Is that expected ?

dsyer avatar Mar 25 '22 11:03 dsyer

Yes, it's expected. You should build project with IDEA support using Maven at least once in order to download and generate all necessary dependencies. Another way it to disable with-idea profile while importing Maven project.

konsoletyper avatar Mar 25 '22 11:03 konsoletyper

I built from the command line a few times. Doesn't seem to be a problem, but the errors are still there in the IDE. Also now seeing

The constructor URLDecoder() is not visibleJava(134217859)

from URLDecoderTest. Am I using the wrong JDK?

dsyer avatar Mar 25 '22 12:03 dsyer

The constructor URLDecoder() is not visibleJava

Looks like they removed some old deprecated constructor in newer Java versions. I usually open project using Java 11. I think this particular test can be removed.

Doesn't seem to be a problem, but the errors are still there in the IDE

What kind of IDE?

konsoletyper avatar Mar 25 '22 12:03 konsoletyper

$ java -version
openjdk version "11.0.14" 2022-01-18 LTS
OpenJDK Runtime Environment Microsoft-30257 (build 11.0.14+9-LTS)
OpenJDK 64-Bit Server VM Microsoft-30257 (build 11.0.14+9-LTS, mixed mode)

What kind of IDE?

I'm using VSCode (so Eclipse JLS).

dsyer avatar Mar 25 '22 12:03 dsyer

Have no idea why it shows these problems. Can you show them?

konsoletyper avatar Mar 25 '22 12:03 konsoletyper

image

Those dependencies are not installed in the local Maven repository. So it's no surprise they are not found. I don't understand how they are supposed to get there. Part of the build in tools/idea/idea-artifacts? Doesn't seem to be working.

dsyer avatar Mar 25 '22 13:03 dsyer

Yes, teavm-idea-artifacts prepares these dependencies. IDEA has no problems with that, though in IDEA I can enable/disable profiles manually (and AFAIR with-idea profile is not enabled by default in pom.xml). So it's a question to authors of VSCode.

konsoletyper avatar Mar 25 '22 13:03 konsoletyper

Sigh. I give up.

dsyer avatar Mar 25 '22 13:03 dsyer