mystamps icon indicating copy to clipboard operation
mystamps copied to clipboard

Make the project at least compilable on newer JDKs

Open php-coder opened this issue 5 years ago • 4 comments

Reported by @milik27:

While we don't support JDK 11 (#1158) and JDK 17 (#1556) yet we should look and try to fix the compilation at least. This should help to new contributors to work with project (even to just compile frontend).

At this moment, compilation fails on JDK14:

image

This thread might be helpful: https://stackoverflow.com/questions/59097317/warning-options-bootstrap-class-path-not-set-in-conjunction-with-source-8


TODO:

  • [x] jdk11 and jdk17: fix Warning: bootstrap class path not set in conjunction with -source 8 (log); solution: pass <source>/<target> parameter to maven-compiler-plugin on JDK8 only and pass <release> on 11 and 17
  • [ ] jdk11: fix Error: Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.5:testCompile (default) on project mystamps: Error occurred while calling a method on a Groovy class from classpath. InvocationTargetException: BUG! exception in phase 'class generation' in source unit 'src/test/groovy/ru/mystamps/web/feature/site/CronServiceImplTest.groovy' unsupported Target MODULE (log)
  • [x] jdk17 only: deal with java.lang.IllegalAccessError: class com.google.errorprone.ErrorProneJavacPlugin (in unnamed module @0x510e4d79) cannot access class com.sun.tools.javac.api.BasicJavacTask (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.api to unnamed module @0x510e4d79 (log); solution: pass extra options to maven-compiler-plugin (see http://errorprone.info/docs/installation)
  • [x] jdk17: fix java.lang.NoSuchMethodError: 'java.lang.Iterable com.sun.tools.javac.code.Scope$WriteableScope.getSymbolsByName(com.sun.tools.javac.util.Name, com.sun.tools.javac.util.Filter)' (log); solution: update error-prone to >=2.7.1 (#1440)
  • [ ] jdk17: fix java.lang.reflect.InaccessibleObjectException: Unable to make protected void java.lang.Object.finalize() throws java.lang.Throwable accessible: module java.base does not "opens java.lang" to unnamed module @109a452c during gmavenplus-plugin:1.5:testCompile (log)

php-coder avatar Apr 17 '20 14:04 php-coder

In order to be able to develop frontend without Maven, this should help:

$ cd src/main/frontend
$ npm ci
$ npm run build

php-coder avatar Apr 17 '20 15:04 php-coder

Я так понимаю ответ на запрос я не смогу получить, и axios как то странно работает

пт, 17 апр. 2020 г. в 18:39, Slava Semushin [email protected]:

In order to be able to develop frontend without Maven, this should help:

$ cd src/main/frontend $ npm ci $ npm run build

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/php-coder/mystamps/issues/1350#issuecomment-615315450, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ24AFOP2N2WKOH2WHD6KH3RNBZZXANCNFSM4MKZ3IAQ .

milik27 avatar Apr 17 '20 16:04 milik27

Я так понимаю ответ на запрос я не смогу получить, и axios как то странно работает

В прототипе axios за-stub-лен, чтобы работать без сервера:

https://github.com/php-coder/mystamps/blob/778dc2ac827d40745c45fa1775812aa845a785d4/src/main/webapp/WEB-INF/views/series/info.html#L796-L861

Посмотри как работают формы для импорта серии и добавления похожей серии на этой странице. Там есть три разных ответа от сервера и при каждом клике возвращается следующий -- таким образом можно проверить и все ошибочные ответы от сервера и основную логику. Надо сделать по аналогии.

Ты можешь просто скопировать код для post и сделать наподобие для get. Справишься или мне сделать?

php-coder avatar Apr 17 '20 17:04 php-coder

Как вариант -- отладь компонент на любом сервере (хоть своем, хоть онлайн, типа https://my-json-server.typicode.com)

php-coder avatar Apr 17 '20 17:04 php-coder