Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ring session-options is private #20

Open
jamesnyika opened this issue Jul 25, 2016 · 1 comment
Open

ring session-options is private #20

jamesnyika opened this issue Jul 25, 2016 · 1 comment

Comments

@jamesnyika
Copy link

Is it just me or does everyone attempting to use the middlware get an exception as follows

Exception in thread "main" java.lang.IllegalStateException: var: #'ring.middleware.session/session-options is not public, compiling:(spiral/middleware.clj:168:6)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6894)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.analyze(Compiler.java:6625)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5380)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3972)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6885)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.analyze(Compiler.java:6625)
        at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3834)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6889)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.analyze(Compiler.java:6625)
        at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
        at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5380)
        at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3972)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6885)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.access$300(Compiler.java:38)
        at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:589)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6887)
        at clojure.lang.Compiler.analyze(Compiler.java:6669)
        at clojure.lang.Compiler.analyze(Compiler.java:6625)
        at clojure.lang.Compiler.eval(Compiler.java:6950)
        at clojure.lang.Compiler.load(Compiler.java:7398)
        at clojure.lang.RT.loadResourceScript(RT.java:372)
        at clojure.lang.RT.loadResourceScript(RT.java:363)
        at clojure.lang.RT.load(RT.java:453)
        at clojure.lang.RT.load(RT.java:419)
        at clojure.core$load$fn__7570.invoke(core.clj:6001)
        at clojure.core$load.invokeStatic(core.clj:6000)
        at clojure.core$load.doInvoke(core.clj:5984)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5805)
        at clojure.core$load_one.invoke(core.clj:5800)
        at clojure.core$load_lib$fn__7515.invoke(core.clj:5845)
        at clojure.core$load_lib.invokeStatic(core.clj:5844)
        at clojure.core$load_lib.doInvoke(core.clj:5825)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:653)
        at clojure.core$load_libs.invokeStatic(core.clj:5882)
        at clojure.core$load_libs.doInvoke(core.clj:5866)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:653)
        at clojure.core$require.invokeStatic(core.clj:5904)
        at clojure.core$require.doInvoke(core.clj:5904)
        at clojure.lang.RestFn.invoke(RestFn.java:703)
        at tyche.http.spiral$eval2639$loading__7456__auto____2640.invoke(spiral.clj:1)
        at tyche.http.spiral$eval2639.invokeStatic(spiral.clj:1)
        at tyche.http.spiral$eval2639.invoke(spiral.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6946)
        at clojure.lang.Compiler.eval(Compiler.java:6935)
        at clojure.lang.Compiler.load(Compiler.java:7398)
        at clojure.lang.RT.loadResourceScript(RT.java:372)
        at clojure.lang.RT.loadResourceScript(RT.java:363)
        at clojure.lang.RT.load(RT.java:453)
        at clojure.lang.RT.load(RT.java:419)
        at clojure.core$load$fn__7570.invoke(core.clj:6001)
        at clojure.core$load.invokeStatic(core.clj:6000)
        at clojure.core$load.doInvoke(core.clj:5984)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5805)
        at clojure.core$load_one.invoke(core.clj:5800)
        at clojure.core$load_lib$fn__7515.invoke(core.clj:5845)
        at clojure.core$load_lib.invokeStatic(core.clj:5844)
        at clojure.core$load_lib.doInvoke(core.clj:5825)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:653)
        at clojure.core$load_libs.invokeStatic(core.clj:5882)
        at clojure.core$load_libs.doInvoke(core.clj:5866)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:653)
        at clojure.core$require.invokeStatic(core.clj:5904)
        at clojure.core$require.doInvoke(core.clj:5904)
        at clojure.lang.RestFn.invoke(RestFn.java:512)
        at tyche.core$eval34$loading__7456__auto____35.invoke(core.clj:1)
        at tyche.core$eval34.invokeStatic(core.clj:1)
        at tyche.core$eval34.invoke(core.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6946)
        at clojure.lang.Compiler.eval(Compiler.java:6935)
        at clojure.lang.Compiler.load(Compiler.java:7398)
        at clojure.lang.RT.loadResourceScript(RT.java:372)
        at clojure.lang.RT.loadResourceScript(RT.java:363)
        at clojure.lang.RT.load(RT.java:453)
        at clojure.lang.RT.load(RT.java:419)
        at clojure.core$load$fn__7570.invoke(core.clj:6001)
        at clojure.core$load.invokeStatic(core.clj:6000)
        at clojure.core$load.doInvoke(core.clj:5984)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invokeStatic(core.clj:5805)
        at clojure.core$load_one.invoke(core.clj:5800)
        at clojure.core$load_lib$fn__7515.invoke(core.clj:5845)
        at clojure.core$load_lib.invokeStatic(core.clj:5844)
        at clojure.core$load_lib.doInvoke(core.clj:5825)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invokeStatic(core.clj:653)
        at clojure.core$load_libs.invokeStatic(core.clj:5882)
        at clojure.core$load_libs.doInvoke(core.clj:5866)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invokeStatic(core.clj:653)
        at clojure.core$require.invokeStatic(core.clj:5904)
        at clojure.core$require.doInvoke(core.clj:5904)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at user$eval17$fn__21.invoke(form-init8153935065399769539.clj:1)
        at user$eval17.invokeStatic(form-init8153935065399769539.clj:1)
        at user$eval17.invoke(form-init8153935065399769539.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6946)
        at clojure.lang.Compiler.eval(Compiler.java:6936)
        at clojure.lang.Compiler.load(Compiler.java:7398)
        at clojure.lang.Compiler.loadFile(Compiler.java:7336)
        at clojure.main$load_script.invokeStatic(main.clj:275)
        at clojure.main$init_opt.invokeStatic(main.clj:277)
        at clojure.main$init_opt.invoke(main.clj:277)
        at clojure.main$initialize.invokeStatic(main.clj:308)
        at clojure.main$null_opt.invokeStatic(main.clj:342)
        at clojure.main$null_opt.invoke(main.clj:339)
        at clojure.main$main.invokeStatic(main.clj:421)
        at clojure.main$main.doInvoke(main.clj:384)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:383)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.Var.applyTo(Var.java:700)
        at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalStateException: var: #'ring.middleware.session/session-options is not public
        at clojure.lang.Compiler.isInline(Compiler.java:6737)
        at clojure.lang.Compiler.analyzeSeq(Compiler.java:6880)
        ... 126 more

Can redefining the the var work in this case ?

@dgrnbrg
Copy link
Owner

dgrnbrg commented Jul 25, 2016

Since it's being invoked as a function, we could bypass the private check by invoking it via its var: (#'session/session-options ...). If you made a pull request, I'd be glad to accept!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants