Comments (7)
I realize this may not be directly an issue of the library, but a consequence of using the ShadowJar plugin.
Note that i have the following file in my generated jar:
kotlinx/ast/grammar/kotlin/target/antlr/kotlin/KotlinGrammarAntlrKotlinParser.class
from ast.
Hi @gauthier-roebroeck-mox,
when the class is not found (for example, if you remove the .class file from the jar file) you will get a ClassNotFoundException. NoClassDefFoundError means that there was an exception while running the static initialisation code of the given class. There should be another error in the log before this. This can be a ClassNotFoundException, caused by one of the dependencies not found.
can you send me a list of all kotlinx.ast and org.antlr file in yours jar file? maybe like this:
unzip -l jarfile.jar | grep kotlinx
unzip -l jarfile.jar | grep ast
from ast.
@drieks here is a gist with the 2 greps you provided. Appreciate if you can help finding out what's missing for your library to function.
from ast.
There should be another error in the log before this
There's no other error prior to that one.
Here is the code I use to parse:
fun parseFromStream(input: InputStream, properties: PropertiesProvider): List<Pair<String, List<Schema>>> {
val source = AstSource.String("", input.bufferedReader().readText())
val kotlinFile = KotlinGrammarAntlrKotlinParser.parseKotlinFile(source)
...
}
from ast.
Hi @gauthier-roebroeck-mox,
sadly it is very hard to help in this case because I can't debug it. Can you create a repository containing only the files required to reproduce this problem?
from ast.
Can you create a repository containing only the files required to reproduce this problem?
That may be difficult, it is an internal private project for my employer, i cannot share the code as is.
from ast.
Hi @gauthier-roebroeck-mox,
you can start with an empty project/directory and add only the required files, mainly the build file. No additional dependencies (expect kotlinx.ast) are required, only one small example main and the important part, the jar building settings. No other source files are required. This is called "minimal working example" and allows me to debug this problem.
from ast.
Related Issues (20)
- Add a grammar for Kotlin Script
- org.antlr.v4.kotlinruntime.atn.ATNConfig object has a large number of instance counts, OOM
- Need "kts" scripts support
- incorrect breakline parsing HOT 1
- AST Node Tree Refactoring / Insertion / Removal
- Consider editing repository setings to remove "Packages" section HOT 2
- I am really confused, which dependency should be used? HOT 5
- End-of-line comments not available in summary HOT 2
- Property delegate not available in summary HOT 2
- Argument with unary prefix is incomplete in summary AST HOT 2
- Best way to add new keywords like in the Spock test HOT 4
- Can I get the specified method code block HOT 3
- Record syntax error messages
- Why column is called row?
- Unsupported ast node functionType when function type used as generic type
- Publish somewhere different than jitpack.io HOT 10
- Is it possible to insert an element? HOT 2
- Add support for @JvmSuppressWildcards/ Annotations for types. HOT 4
- How can I get the specified method code block!Looking forward to answer
- How do I rely on this project on Maven? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ast.