Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Command line too long #18

Open
kevinstembridge opened this issue Jun 17, 2014 · 2 comments
Open

Command line too long #18

kevinstembridge opened this issue Jun 17, 2014 · 2 comments
Assignees
Milestone

Comments

@kevinstembridge
Copy link

Hi,
We have a large number of proto files to be compiled. We're getting an error about the command line being too long. Is it possible for the plugin to invoke protoc for one file at a time?

@sergei-ivanov
Copy link
Owner

Hello Kevin,

I must admit we have never hit this limitation before in our environment. The plugin by default hashes paths for dependencies to make command line more compact, but it does not do anything about proto files from the current project.

Invoking protoc separately on each proto file will only work well if those files are not dependent on each other. I can probably add the source proto folder itself into the list of import paths, but I am not sure if it's not going to create some sort of circular reference. Let me experiment with that.

There is a workaround available if you need to address the problem right now. If you can split your proto files into a number of independent groups, you can set up several plugin executions using inclusion/exclusion patterns. The only gotcha is that the plugin clears out the output directory on each run, so each separate execution will need to have its own output directory configured. Clearing out the output directory is more of a nuisance than help and I am going to make it optional in the next release.

Kind regards,
Sergei

@sergei-ivanov sergei-ivanov added this to the 0.3.x milestone Jun 17, 2014
@sergei-ivanov sergei-ivanov self-assigned this Jun 17, 2014
@kevinstembridge
Copy link
Author

Hi Sergei,
Thanks for looking at this.
We ended up using the maven-exec-plugin to invoke protoc directly and use a wildcard pattern to pick up the proto files. Maybe your plugin could optionally accept a wildcard pattern as well.

@sergei-ivanov sergei-ivanov modified the milestones: 0.3.x, 0.4.x Feb 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants