Comments (6)
Thanks for the report. A PR to fix this would be welcome.
from ring.
I found that I can use 1.8.0
version and it compiles fine. But that's not a good workaround.
One fix that I can think of is to split the namespace so that the imports would be located in two separate namespaces and the builder methods would be separated as well.
I think this would require a major version bump (then the non-ssl namespace would be graalvm compilable and the other not).
One alternative to it would be to dynamically load the class by its title when the ssl
method is called. But this would mean that if the JAR that contains that class changes then the build will break (but it would be known at build time at least).
Example: https://github.com/clojure/clojure/blob/e6fce5a42ba78fadcde00186c0b0c3cd00f45435/src/clj/clojure/core.clj#L6837
In any way the ssl
function is not useful in graalvm
because it loads the offending class. Do you think it's a good idea to support graalvm? I reported because I had an issue with it but I don't know what are the goals of this lib.
There could also be a hybrid approach where we would still have two namespaces but we would load the ssl
namespace lazily on method call. This way we would be able to keep the current interface but still separate the namespaces. Then eventually the method could be marked with ^:deprecated
.
I don't want to remove the functionality because somebody may depend on it (it would be unfortunate if suddenly somebody would find out that their webpage is HTTP-only because some kind of scanner didn't load).
Edit: I thought that ssl-connector
is public. I'll make the lazy-namespace PR to review. Or maybe you'll have a better idea.
from ring.
I think supporting GraalVM is a good idea, but if we want to make the support official it'll need tests to prevent regressions from classes like this. I'm fine with lazy loading the offending piece of code, with an eye to looking to add some GraalVM tests in future to prevent this sort of thing from happening in future.
from ring.
My chat with @borkdude showed that I have no idea where the bug is. I tried to create a minimum repro and I think I can't find it. I'll try to import more things.
But on my large project it's consistently not failing with version 1.8.0
and failing with 1.8.1
. So I missed something in my repro.
from ring.
I tried with my minimal repro and when I add [com.google.firebase/firebase-admin "8.1.0"]
then my minimal repro fails no matter what. So it fails even if it's the only dependency.
But it gets more interesting.
There is version 9.0.0
which doesn't fail on minimal repro and even on the version with all of the other dependencies. But it fails when I use it in my large project.
So um... sorry for wasting time and accusing this project when it's not its fault. But at this point I actually don't really know what fails in my codebase. Something somehow binds together. But probably it's incorrect timing of the logger initialization on the google's side.
But currently I don't know and I'll close this issue. Minimal repro with this project and logger worked alright. So GraalVM works for 1.9.1
. So at least somebody verified it.
from ring.
Thanks for the investigation and verifying it works with 1.9.1. I hope you find the cause of your issue.
from ring.
Related Issues (20)
- Consider adding data_readers for clj-time or coercing to timestamp HOT 1
- URL path causes exception in resource middleware HOT 3
- Broken link on https://github.com/ring-clojure/ring/wiki/Creating-responses HOT 2
- request: How to register wasm mime on clojure ring server? HOT 2
- Ring Jetty Adapter attempts to handle requests that have already been handled HOT 6
- Release new version of ring-jetty-adapter to avoid CVE-2022-2191 HOT 1
- ring-jetty and timeouts HOT 5
- Can ring use the latest version of Jetty - 9.4.49.v20220914 HOT 1
- upgrade of Apache Commons FileUpload to 1.5 HOT 13
- Websocket support HOT 1
- The AES / CBC algorithm used in the cookie session store _might_ be insecure HOT 3
- Attributes in the `Set-Cookie` header are formatted incorrectly HOT 1
- How to measure time that it takes to complete a request? HOT 2
- Documentation for cookies HOT 2
- How to change UriCompliance mode HOT 2
- Streaming body issue with a synchronous ring handler HOT 4
- Add support for Partitioned cookies (CHIPS) HOT 1
- JettyWebSocketServerContainer can not implement WebSocketPolicy because it is not an interface HOT 4
- Reflection warnings HOT 2
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 ring.