infinite-technology / bobbin Goto Github PK
View Code? Open in Web Editor NEWRevolutionary high-performance Groovy/Java Slf4j logger
Home Page: https://i-t.io/Bobbin/
License: Apache License 2.0
Revolutionary high-performance Groovy/Java Slf4j logger
Home Page: https://i-t.io/Bobbin/
License: Apache License 2.0
I imagine this is a Won't Fix but it looks like this doesn't work on groovy 2.4.x (maybe I need to upgrade?). Writing this up just so someone else can find this when searching the repo / google.
Error I get back is
java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.memoize.EvictableCache.getAndPut(Ljava/lang/Object;Lorg/codehaus/groovy/runtime/memoize/MemoizeCache$ValueProvider;)Ljava/lang/Object;
After running
@Grab(group='io.infinite', module='bobbin', version='2.0.0')
import io.infinite.blackbox.BlackBox
import io.infinite.carburetor.CarburetorLevel
@BlackBox(level = CarburetorLevel.EXPRESSION)
String foobar(String foo) {
String bar = "bar"
String foobar = foo + bar
return foobar
}
foobar("foo")
When running on Groovy 2.4.12
The problem:
If we add some dependency with a transitive dependency to "org.slf4j:slf4j-api:1.8.0" and more recent, the Bobbin does not work
Expected behavior:
Bobbin : main: Application working dir: /Users/%username%/Desktop/%project%
Bobbin : main: Searching for Bobbin.yml in: ./Bobbin.yml (full path: /Users/%username%/Desktop/%project%/Bobbin.yml)
Bobbin : main: Found: /Users/%username%/Desktop/%project%/Bobbin.yml
Actual behavior:
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/Users/%username%/Desktop/%project%/%project%/build/distributions/%project%-1.0.1/lib/bobbin-4.1.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
Example Gradle configuration:
def kotlin_version = '1.3.71'
def groovy_version = '2.5.4'
def bobbin_version = '4.1.0'
def textio_version = '3.4.1'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
implementation "org.codehaus.groovy:groovy-all:$groovy_version"
implementation "io.i-t:bobbin:$bobbin_version"
// the library below depends on a more recent slf4j artifact
implementation "org.beryx:text-io:$textio_version"
}
Please, if you have any questions regarding configuration details, leave a comment and I will reply with more information on the problem.
As suggested by Habr user
https://habr.com/ru/users/mikaakim/ it is useful to have option of Yaml configuration.
Good practice example: https://github.com/virtualdogbert/GroovyConfigWriter/blob/master/build.gradle
@virtualdogbert - Thank you for sharing this example! We are using it as basis for our build now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.