Comments (5)
You've submitted a couple classloader PRs, but perhaps it'd be good to try and create unit tests to verify all this. Running under maven, tomcat, gradle, etc. introduce all sorts of interesting classloader issues and it'd be good to have some coverage of what you're attempting to solve. I'm supportive of your effort to let you passthru the classloader, but I'd love your help making sure we don't regress in future versions.
from rocker.
If you can give some guidance about how the testing works for this project, I'll gladly contribute tests. I could quite work it out on my own.
Just to be clear, there's no PR for this one. The change is debatable, so I wanted to discuss first.
from rocker.
Unit tests for runtime classes are all on runtime/src/test/java. Any changes affecting a classloader for those classes in that module would go in there.
Unit/integration tests that target Java 6+ compatibility all go in java6tests/src/test/java. I'd foresee some of your classloading changes needing to be tested in here.
Unit/integration tests that target Java 8+ compatibility all go in java8tests/src/test/java. I doubt any classloader tests would need to go in there.
Testing classloaders is complicated as many of the issues only seem triggered in the environment the project runs in. So we'd need to figure out a good way of mocking up what those look like and then confirming the various parts of the project work under that type of classloader.
from rocker.
I experience the same problem. Because Rocker uses its own classloaders, they can
t see .class files in Play Framework 1.x (I guess 2.x is the same) project. Because Play messes with classpaths and has dev and prod environments where in dev it autocompiles and reloads stuff in memory, and in prod it will precompile, we must use Play.classLoader to load the classes.
from rocker.
Hi @ssijak - when rocker's hot reloading feature is turned off (as it should be in prod) - the only special classloader used is to load up the byte arrays of static template content. Even if Play uses its own classloader, I wouldn't think that would conflict. So to be clear -- are you having issues in dev or prod? If its just dev -- have you turned off hot reloading to see if that works?
from rocker.
Related Issues (20)
- GraalVM compatibility HOT 4
- Warnings in Gradle Plugin (@Input annotation used on property of type 'File') HOT 6
- call java function in template HOT 1
- rocker-maven-plugin templateDirectory
- With block invalid: multiple equals symbols found for assignment String href = "/abc?x=y"
- [Doc] it's unclear how to instantiate Rocker
- Loading templates from classpath / jar ? HOT 1
- Parentheses right after variable HOT 2
- Compile time include postprocessor
- support Java 11 HOT 1
- Github latest release points to outdated release.
- Unable to get hot-reload working with tomcat server HOT 3
- Question about formatting
- Generation crashes with NPE if a non-normal file is present in the template directory HOT 1
- Global default null value rendering to avoid NPEs
- it's abandoned? HOT 1
- How to configure Rocker to use GuavaHtmlStringify? HOT 4
- Support Java 17 HOT 2
- Why rocker dont import List class? HOT 2
- Gradle 7 support
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 rocker.