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

Stack overflow when processing big services or repo #5

Closed
cezkosLTC opened this issue Nov 30, 2022 · 2 comments · Fixed by #6
Closed

Stack overflow when processing big services or repo #5

cezkosLTC opened this issue Nov 30, 2022 · 2 comments · Fixed by #6

Comments

@cezkosLTC
Copy link

cezkosLTC commented Nov 30, 2022

Hey guys,
First of all thanks for open-sourcing it. protodeps seem very useful, but there's a problem in the case that I'm working on.
Specifically I try to compile the whole googleapis repo and work on it with pronto.
Problem shown up quickly with a stack overflow when I tried to process the whole repo at once. Then tried single service and it fortunately succeeded but when I tried to list them in subsequent repositories definitions it occurred that some of them are big enough (like cloud/compute) to cause stack overflow breaking the compilation. Can you please help with providing a fix for that?

(def proto-version "3.19.0") 
(def grpc-version "1.30.2")  

(defproject something "0.1.0"
  :dependencies [[org.clojure/clojure "1.10.0"]
                 [com.google.protobuf/protobuf-java ~proto-version]
                 [io.grpc/grpc-stub ~grpc-version]]
  :plugins [[com.appsflyer/lein-protodeps "1.0.4"]]
  :source-paths ["src" "resources"]
  :java-source-paths ["resources/googleapis/java"]
  :lein-protodeps {:output-path       "resources/googleapis/java" 
                   :java-source-paths ["resources/googleapis/java"]
                   :proto-version     ~proto-version
                   :grpc-version      ~grpc-version
                   :compile-grpc?     true
                   :repos             {:google.api {:repo-type    :filesystem  ;; SUCCEEDS
                                                           :config       {:path "./resources"} 
                                                           :proto-paths  ["proto/"]
                                                           :dependencies [proto/google/api]}
                                        :google.cloude.compute {:repo-type    :filesystem ;; FAILS
                                                                          :config       {:path "./resources"}
                                                                          :proto-paths  ["proto/"]
                                                                          :dependencies [proto/google/cloud/compute]
                                        :google {:repo-type    :filesystem  ;; FAILS
                                                           :config       {:path ".resources"}
                                                           :proto-paths  ["proto/"]
                                                           :dependencies [proto/google]}}})
@nenorbot
Copy link
Contributor

@cezkosLTC Until this gets reviewed, would be nice if you could validate this fix by cloning https://github.com/nenorbot/lein-protodeps and running lein install locally. Then you can try the fix by changing your project's plugin version to 1.0.5-SNAPSHOT and re-running lein protodeps generate.

@cezkosLTC
Copy link
Author

Works like a charm. Thanks a lot.

@evg-tso evg-tso closed this as completed in #6 Dec 7, 2022
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

Successfully merging a pull request may close this issue.

2 participants