Code Monkey home page Code Monkey logo

Comments (8)

tcripps avatar tcripps commented on July 24, 2024

Thanks for the feedback and for pointing out the spelling error. The stack trace in your log should not prevent you from compiling. It simply comes from logging an error level condition. I am considering changing that to a warning.

I don't think removing the path to protoc is the right way to disable the compilation of only some protobuf files in your project. You can do it at the module level (or for all modules in your project) via the Facet settings by opening the Project Structure dialog, selecting Facets on the left pane. Then either disable compilation individually per module or for all modules by clicking on the "Protobuf Facet" group label, and then the "All Facets" tab and unchecking the "Enable compilation" checkbox. I know this is super obvious (sarcasm), but that's where IDEA buries facet settings.

from idea-plugin-protobuf.

ksafonov avatar ksafonov commented on July 24, 2024

Oh there's one more stack trace actually (see below). Maybe this one stops compilation?

I've got ~ 30 maven modules in my project, two of them have *.proto files (in main/resources). Surprisingly, IDEA detected the Protobuf facet for none of them. I manually added facets for these modules and unchecked the 'Enable compilation' option. This did not help unfortunately.

I would also include the name of the module into the "Cannot generate protobuf files as the path to protoc has not been set" warning.

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lcom.intellij.openapi.compiler.GeneratingCompiler$GenerationItem;
at protobuf.compiler.PbCompiler.generate(PbCompiler.java:107)
at protobuf.compiler.PbPrecompileTask.execute(PbPrecompileTask.java:32)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:2375)
at com.intellij.compiler.impl.CompileDriver.access$900(CompileDriver.java:122)
at com.intellij.compiler.impl.CompileDriver$8.run(CompileDriver.java:706)
at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:167)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:373)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:436)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:153)

On Jan 17, 2014, at 10:48 AM, Travis Cripps [email protected] wrote:

Thanks for the feedback and for pointing out the spelling error. The stack trace in your log should not prevent you from compiling. It simply comes from logging an error level condition. I am considering changing that to a warning.

I don't think removing the path to protoc is the right way to disable the compilation of only some protobuf files in your project. You can do it at the module level (or for all modules in your project) via the Facet settings by opening the Project Structure dialog, selecting Facets on the left pane. Then either disable compilation individually per module or for all modules by clicking on the "Protobuf Facet" group label, and then the "All Facets" tab and unchecking the "Enable compilation" checkbox. I know this is super obvious (sarcasm), but that's where IDEA buries facet settings.


Reply to this email directly or view it on GitHub.

from idea-plugin-protobuf.

tcripps avatar tcripps commented on July 24, 2024

Thanks for the follow up. I think there may be an error, then.

On Sat, Jan 18, 2014 at 11:48 PM, Kirill Safonov
[email protected]:

Oh there's one more stack trace actually (see below). Maybe this one stops
compilation?

I've got ~ 30 maven modules in my project, two of them have *.proto files
(in main/resources). Surprisingly, IDEA detected the Protobuf facet for
none of them. I manually added facets for these modules and unchecked the
'Enable compilation' option. This did not help unfortunately.

I would also include the name of the module into the "Cannot generate
protobuf files as the path to protoc has not been set" warning.

java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
[Lcom.intellij.openapi.compiler.GeneratingCompiler$GenerationItem;
at protobuf.compiler.PbCompiler.generate(PbCompiler.java:107)
at protobuf.compiler.PbPrecompileTask.execute(PbPrecompileTask.java:32)
at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:2375)
at
com.intellij.compiler.impl.CompileDriver.access$900(CompileDriver.java:122)
at com.intellij.compiler.impl.CompileDriver$8.run(CompileDriver.java:706)
at com.intellij.compiler.progress.CompilerTask.run(CompilerTask.java:167)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)

at
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)

at
com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)

at
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)

at
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)

at
com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:373)

at
com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:436)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:680)
at
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:153)

On Jan 17, 2014, at 10:48 AM, Travis Cripps [email protected]
wrote:

Thanks for the feedback and for pointing out the spelling error. The
stack trace in your log should not prevent you from compiling. It simply
comes from logging an error level condition. I am considering changing that
to a warning.

I don't think removing the path to protoc is the right way to disable
the compilation of only some protobuf files in your project. You can do it
at the module level (or for all modules in your project) via the Facet
settings by opening the Project Structure dialog, selecting Facets on the
left pane. Then either disable compilation individually per module or for
all modules by clicking on the "Protobuf Facet" group label, and then the
"All Facets" tab and unchecking the "Enable compilation" checkbox. I know
this is super obvious (sarcasm), but that's where IDEA buries facet
settings.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-32703084
.

from idea-plugin-protobuf.

mhgrove avatar mhgrove commented on July 24, 2024

To confirm, failure to specify the path to protoc or an incorrect path prevents your entire project from building.

My protobuf files almost never change, protoc does not need to run on every compile. It should be manual only.

from idea-plugin-protobuf.

tcripps avatar tcripps commented on July 24, 2024

mhgrove: In the case of an initial build, you'd expect the failure to run the protoc build phase to be a failure. Once you've built successfully, the plugin should detect that your .proto files haven't changed and skip class generation without invoking protoc. There was a bug in v0.5.5 in detecting this properly. If you don't expect the .proto files to change, you can also just disable the plugin by going to the module manager screen, clicking on Facets in the list on the left, choosing the ProtoBuffers facet (top group--not a module), selecting the All Modules and then deselect the checkbox that enables compilation.

from idea-plugin-protobuf.

ryanobjc avatar ryanobjc commented on July 24, 2024

I'd also like to be able to disable compilation as well! This error is preventing the build from running:

4:40:00 PM Throwable: Cannot generate protobuf files as the path to protoc has not been set. Please set in Settins > Compiler
4:40:01 PM Compilation completed with 0 errors and 0 warnings in 0 sec

My project has 500k loc and normally generates 500+ warnings. There are no protobuf facets configured.

from idea-plugin-protobuf.

ryanobjc avatar ryanobjc commented on July 24, 2024

looks like if i set the setting to literally any value, the plugin works.

Kind of a bummer that the out of the box install of this plugin breaks your build, but not in any way that is obvious. Intellij says the build completed. It did not. This bug was really confusing to me.

from idea-plugin-protobuf.

driekken avatar driekken commented on July 24, 2024

This issue prevents IntelliJ (version 14.0.2) from compiling Scala sources.

And the only sign that something is wrong is the same as above:

Throwable: Cannot generate protobuf files as the path to protoc has not been set. Please set in Settins > Compiler

The funny thing is that I don't have any *.proto files or the Protobuf Facet enabled at all in my project.

I've set the setting to a gibberish value and now everything works ok. Probably uninstalling the Protobuf plugin should also do the trick, but I did not try it.

I've been scratching my head for a few hours not understanding what's going on, so hopefully this will help people with a similar problem.

from idea-plugin-protobuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.