babashka / clojure-lanterna

A Clojurey wrapper around the Lanterna terminal output library.
http://multimud.github.io/clojure-lanterna
12 stars 3 forks source link

Fix reflection warnings #2

Closed borkdude closed 4 years ago

borkdude commented 4 years ago

Currently lein check gives:

Reflection warning, lanterna/terminal.clj:93:3 - call to method moveCursor on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/terminal.clj:113:19 - reference to field getPosition on com.googlecode.lanterna.terminal.Terminal can't be resolved.
Reflection warning, lanterna/terminal.clj:142:3 - call to method applyForegroundColor on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/terminal.clj:145:3 - call to method applyBackgroundColor on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/terminal.clj:150:3 - call to method applySGR on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/screen.clj:34:26 - reference to field getTerminal on com.googlecode.lanterna.screen.Screen can't be resolved.
Reflection warning, lanterna/screen.clj:40:29 - reference to field getTerminal on com.googlecode.lanterna.screen.Screen can't be resolved.
Reflection warning, lanterna/screen.clj:104:4 - call to method setCursorPosition on com.googlecode.lanterna.screen.Screen can't be resolved (no such method).
Reflection warning, lanterna/screen.clj:106:4 - call to method setCursorPosition on com.googlecode.lanterna.screen.Screen can't be resolved (no such method).
Compiling namespace lanterna.terminal
Reflection warning, lanterna/terminal.clj:93:3 - call to method moveCursor on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/terminal.clj:113:19 - reference to field getPosition on com.googlecode.lanterna.terminal.Terminal can't be resolved.
Reflection warning, lanterna/terminal.clj:142:3 - call to method applyForegroundColor on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/terminal.clj:145:3 - call to method applyBackgroundColor on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
Reflection warning, lanterna/terminal.clj:150:3 - call to method applySGR on com.googlecode.lanterna.terminal.Terminal can't be resolved (no such method).
borkdude commented 4 years ago

Most of them are fixed. Not sure what to do with these:

$ lein check
Compiling namespace lanterna.common
Compiling namespace lanterna.constants
Compiling namespace lanterna.screen
Reflection warning, lanterna/screen.clj:34:26 - reference to field getTerminal on com.googlecode.lanterna.screen.Screen can't be resolved.
Reflection warning, lanterna/screen.clj:40:29 - reference to field getTerminal on com.googlecode.lanterna.screen.Screen can't be resolved.
Compiling namespace lanterna.terminal
kwrooijen commented 4 years ago

Reflection warning, lanterna/screen.clj:34:26 - reference to field getTerminal on com.googlecode.lanterna.screen.Screen can't be resolved. Reflection warning, lanterna/screen.clj:40:29 - reference to field getTerminal on com.googlecode.lanterna.screen.Screen can't be resolved.

These probably need to be hinted as ^TerminalScreen since Screen doesn't implement this method

borkdude commented 4 years ago

Yep, that was it 👍