-
Notifications
You must be signed in to change notification settings - Fork 150
method code too large #135
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
Comments
Hi. In a JVM a single method can be 64kb (of bytecode). In Compojure (and by so, in compojure-api) the route-trees are in the end nested functions, so a large route-tree can generate a large (bytecode) method. Solution is to split your routes with |
Hi,Tommi, |
Thanks,Deraen. |
Dears, |
This appears related to aot compiling the routes for the uberjar, and I see that your project is setup to We also ran into this issue with our project, and it showed up when we started using a large model schema as the Our project is not setup like the default Also, the main function has to I found this first suggested in this comment: #33 (comment) As mentioned in #102 (comment), |
thanks Paul! I have to study more with AOT to understand what happens. With But as Paul said, AOT just the base minimum, similar case also here: #129 (comment) ... this should be in the README. |
can this be closed? |
Yes,it could be closed. |
Allow these projects to AOT compile all namespaces except for their route namespaces that use the compojure-api macros. See metosin/compojure-api#135 (comment) and metosin/compojure-api#102 for why compojure-api macros should not be AOT compiled.
Allow these projects to AOT compile all namespaces except for their route namespaces that use the compojure-api macros. See metosin/compojure-api#135 (comment) and metosin/compojure-api#102 for why compojure-api macros should not be AOT compiled.
Allow these projects to AOT compile all namespaces except for their route namespaces that use the compojure-api macros. See metosin/compojure-api#135 (comment) and metosin/compojure-api#102 for why compojure-api macros should not be AOT compiled.
Allow these projects to AOT compile all namespaces except for their route namespaces that use the compojure-api macros. See metosin/compojure-api#135 (comment) and metosin/compojure-api#102 for why compojure-api macros should not be AOT compiled.
When I tried to build a uberjar with the following repository:
https://github.com/hughjfchen/midadmin-platform
I got "method code too large" error. I had to remove some API routes before built the uberjar
successfully.
The problem can be reproduced with following steps:
1.clone the above repo
2.run "lein uberjar"
3.You will get the "method code too large" error.
The text was updated successfully, but these errors were encountered: