revert protobuf update to 3.5.0 — update only to 3.3.0

This commit is contained in:
Vladimir Krivosheev
2018-02-17 16:37:28 +01:00
parent 8ce259cf0a
commit c2d9bc589a
5 changed files with 2451 additions and 1939 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
<component name="libraryTable">
<library name="protobuf" type="repository">
<properties maven-id="com.google.protobuf:protobuf-java:3.5.1" />
<properties maven-id="com.google.protobuf:protobuf-java:3.3.0" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/protobuf/protobuf-java/3.5.1/protobuf-java-3.5.1.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/com/google/protobuf/protobuf-java/3.5.1/protobuf-java-3.5.1-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0-sources.jar!/" />
</SOURCES>
</library>
</component>
@@ -73,12 +73,15 @@ public class CompileDriver {
private final Map<Module, String> myModuleOutputPaths = new HashMap<>();
private final Map<Module, String> myModuleTestOutputPaths = new HashMap<>();
@SuppressWarnings("deprecation") private CompilerFilter myCompilerFilter = CompilerFilter.ALL;
public CompileDriver(Project project) {
myProject = project;
}
@SuppressWarnings("deprecation")
public void setCompilerFilter(CompilerFilter compilerFilter) {
myCompilerFilter = compilerFilter == null? CompilerFilter.ALL : compilerFilter;
}
public void rebuild(CompileStatusNotification callback) {
@@ -202,7 +205,8 @@ public class CompileDriver {
}
@Nullable
private TaskFuture compileInExternalProcess(@NotNull final CompileContextImpl compileContext, final boolean onlyCheckUpToDate) {
private TaskFuture compileInExternalProcess(@NotNull final CompileContextImpl compileContext, final boolean onlyCheckUpToDate)
throws Exception {
final CompileScope scope = compileContext.getCompileScope();
final Collection<String> paths = CompileScopeUtil.fetchFiles(compileContext);
List<TargetTypeBuildScope> scopes = getBuildScopes(compileContext, scope, paths);
@@ -246,8 +250,8 @@ public class CompileDriver {
@Override
public void handleFailure(UUID sessionId, CmdlineRemoteProto.Message.Failure failure) {
compileContext.addMessage(CompilerMessageCategory.ERROR, failure.getDescription(), null, -1, -1);
final String trace = failure.getStacktrace();
compileContext.addMessage(CompilerMessageCategory.ERROR, failure.hasDescription()? failure.getDescription() : "", null, -1, -1);
final String trace = failure.hasStacktrace()? failure.getStacktrace() : null;
if (trace != null) {
LOG.info(trace);
}
@@ -262,7 +266,7 @@ public class CompileDriver {
if (kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.PROGRESS) {
final ProgressIndicator indicator = compileContext.getProgressIndicator();
indicator.setText(messageText);
if (message.getDone() != 0) {
if (message.hasDone()) {
indicator.setFraction(message.getDone());
}
}
@@ -270,12 +274,12 @@ public class CompileDriver {
final CompilerMessageCategory category = kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.ERROR ? CompilerMessageCategory.ERROR
: kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.WARNING ? CompilerMessageCategory.WARNING : CompilerMessageCategory.INFORMATION;
String sourceFilePath = message.getSourceFilePath();
String sourceFilePath = message.hasSourceFilePath() ? message.getSourceFilePath() : null;
if (sourceFilePath != null) {
sourceFilePath = FileUtil.toSystemIndependentName(sourceFilePath);
}
final long line = message.getLine();
final long column = message.getColumn();
final long line = message.hasLine() ? message.getLine() : -1;
final long column = message.hasColumn() ? message.getColumn() : -1;
final String srcUrl = sourceFilePath != null ? VirtualFileManager.constructUrl(LocalFileSystem.PROTOCOL, sourceFilePath) : null;
compileContext.addMessage(category, messageText, srcUrl, (int)line, (int)column);
if (compileContext.shouldUpdateProblemsView() && kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.JPS_INFO) {
@@ -320,8 +324,8 @@ public class CompileDriver {
case BUILD_COMPLETED:
ExitStatus status = ExitStatus.SUCCESS;
final CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status completionStatus = event.getCompletionStatus();
if (completionStatus != CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status.UNRECOGNIZED) {
if (event.hasCompletionStatus()) {
final CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status completionStatus = event.getCompletionStatus();
switch (completionStatus) {
case CANCELED:
status = ExitStatus.CANCELLED;
@@ -9,7 +9,6 @@ import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
@@ -54,8 +53,8 @@ class AutoMakeMessageHandler extends DefaultMessageHandler {
switch (event.getEventType()) {
case BUILD_COMPLETED:
myContext.getProgressIndicator().stop();
final CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status status = event.getCompletionStatus();
if (status != CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status.UNRECOGNIZED) {
if (event.hasCompletionStatus()) {
final CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status status = event.getCompletionStatus();
myBuildStatus = status;
if (status == CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status.CANCELED) {
myContext.getProgressIndicator().cancel();
@@ -103,7 +102,7 @@ class AutoMakeMessageHandler extends DefaultMessageHandler {
final CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind kind = message.getKind();
if (kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.PROGRESS) {
final ProblemsView view = ProblemsView.SERVICE.getInstance(myProject);
if (message.getDone() != 0) {
if (message.hasDone()) {
view.setProgress(message.getText(), message.getDone());
}
else {
@@ -113,10 +112,10 @@ class AutoMakeMessageHandler extends DefaultMessageHandler {
else {
final CompilerMessageCategory category = convertToCategory(kind);
if (category != null) { // only process supported kinds of messages
final String sourceFilePath = message.getSourceFilePath();
final String sourceFilePath = message.hasSourceFilePath() ? message.getSourceFilePath() : null;
final String url = sourceFilePath != null ? VirtualFileManager.constructUrl(LocalFileSystem.PROTOCOL, FileUtil.toSystemIndependentName(sourceFilePath)) : null;
final long line = message.getLine();
final long column = message.getColumn();
final long line = message.hasLine() ? message.getLine() : -1;
final long column = message.hasColumn() ? message.getColumn() : -1;
final CompilerMessage msg = myContext.createAndAddMessage(category, message.getText(), url, (int)line, (int)column, null);
if (kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.ERROR || kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.JPS_INFO) {
if (kind == CmdlineRemoteProto.Message.BuilderMessage.CompileMessage.Kind.ERROR) {
@@ -147,9 +146,9 @@ class AutoMakeMessageHandler extends DefaultMessageHandler {
if (myProject.isDisposed()) {
return;
}
String descr = failure.getDescription();
String descr = failure.hasDescription() ? failure.getDescription() : null;
if (descr == null) {
descr = StringUtil.notNullize(failure.getStacktrace());
descr = failure.hasStacktrace()? failure.getStacktrace() : "";
}
final String msg = "Auto build failure: " + descr;
CompilerManager.NOTIFICATION_GROUP.createNotification(msg, MessageType.INFO);
@@ -1,5 +1,3 @@
syntax = "proto3";
package org.jetbrains.jpsservice;
option java_package = "org.jetbrains.jps.api";
@@ -8,159 +6,159 @@ option optimize_for = LITE_RUNTIME;
message Message {
message UUID {
sint64 most_sig_bits = 1;
sint64 least_sig_bits = 2;
required sint64 most_sig_bits = 1;
required sint64 least_sig_bits = 2;
}
message KeyValuePair {
string key = 1;
string value = 2;
required string key = 1;
required string value = 2;
}
enum Type {
CONTROLLER_MESSAGE = 0;
BUILDER_MESSAGE = 1;
FAILURE = 2;
CONTROLLER_MESSAGE = 1;
BUILDER_MESSAGE = 2;
FAILURE = 3;
}
message Failure {
int32 error_code = 1;
string description = 2;
string stacktrace = 3;
optional int32 error_code = 1;
optional string description = 2;
optional string stacktrace = 3;
}
message ControllerMessage {
enum Type {
BUILD_PARAMETERS = 0;
BUILD_PARAMETERS = 1;
CANCEL_BUILD_COMMAND = 2;
FS_EVENT = 3;
CONSTANT_SEARCH_RESULT = 4;
}
message FSEvent {
uint64 ordinal = 1;
required uint64 ordinal = 1;
repeated string changed_paths = 2;
repeated string deleted_paths = 3;
}
message GlobalSettings {
string global_options_path = 5;
required string global_options_path = 5;
}
message ParametersMessage {
message TargetTypeBuildScope {
string type_id = 1;
bool all_targets = 2;
required string type_id = 1;
optional bool all_targets = 2;
repeated string target_id = 3;
bool force_build = 4;
required bool force_build = 4;
}
enum Type {
BUILD = 0;
CLEAN = 1;
UP_TO_DATE_CHECK = 2;
BUILD = 1;
CLEAN = 2;
UP_TO_DATE_CHECK = 3;
}
Type build_type = 1;
GlobalSettings global_settings = 2;
string project_id = 3;
required Type build_type = 1;
optional GlobalSettings global_settings = 2;
optional string project_id = 3;
repeated TargetTypeBuildScope scope = 4;
repeated string file_path = 5;
repeated KeyValuePair builder_parameter = 6;
}
message ConstantSearchResult {
string owner_class_name = 1;
string field_name = 2;
bool is_success = 3;
required string owner_class_name = 1;
required string field_name = 2;
required bool is_success = 3;
repeated string path = 4;
}
Type type = 1;
ParametersMessage params_message = 2;
FSEvent fs_event = 3;
ConstantSearchResult constant_search_result = 4;
required Type type = 1;
optional ParametersMessage params_message = 2;
optional FSEvent fs_event = 3;
optional ConstantSearchResult constant_search_result = 4;
}
message BuilderMessage {
enum Type {
PARAM_REQUEST = 0;
BUILD_EVENT = 1;
COMPILE_MESSAGE = 2;
CONSTANT_SEARCH_TASK = 3;
PARAM_REQUEST = 1;
BUILD_EVENT = 2;
COMPILE_MESSAGE = 3;
CONSTANT_SEARCH_TASK = 4;
}
message BuildEvent {
enum Type {
BUILD_COMPLETED = 0;
FILES_GENERATED = 1;
CUSTOM_BUILDER_MESSAGE = 2;
BUILD_COMPLETED = 1;
FILES_GENERATED = 2;
CUSTOM_BUILDER_MESSAGE = 3;
}
enum Status {
CANCELED = 0;
ERRORS = 1;
SUCCESS = 2;
UP_TO_DATE = 3;
CANCELED = 1;
ERRORS = 2;
SUCCESS = 3;
UP_TO_DATE = 4;
}
message GeneratedFile {
string output_root = 1;
string relative_path = 2;
required string output_root = 1;
required string relative_path = 2;
}
message CustomBuilderMessage {
string builder_id = 1;
string message_type = 2;
string message_text = 3;
required string builder_id = 1;
required string message_type = 2;
required string message_text = 3;
}
Type event_type = 1;
string description = 2;
Status completion_status = 3;
required Type event_type = 1;
optional string description = 2;
optional Status completion_status = 3;
repeated GeneratedFile generated_files = 4;
CustomBuilderMessage custom_builder_message = 5;
optional CustomBuilderMessage custom_builder_message = 5;
}
message CompileMessage {
enum Kind {
ERROR = 0;
WARNING = 1;
INFO = 2;
PROGRESS = 3;
JPS_INFO = 4;
OTHER = 5;
ERROR = 1;
WARNING = 2;
INFO = 3;
PROGRESS = 4;
JPS_INFO = 5;
OTHER = 6;
}
Kind kind = 1;
string text = 2;
string source_file_path = 3;
uint64 problem_begin_offset = 4;
uint64 problem_end_offset = 5;
uint64 problem_location_offset = 6;
uint64 line = 7;
uint64 column = 8;
float done = 9;
required Kind kind = 1;
optional string text = 2;
optional string source_file_path = 3;
optional uint64 problem_begin_offset = 4;
optional uint64 problem_end_offset = 5;
optional uint64 problem_location_offset = 6;
optional uint64 line = 7;
optional uint64 column = 8;
optional float done = 9;
}
message ConstantSearchTask {
string owner_class_name = 1;
string field_name = 2;
int32 access_flags = 3;
bool is_access_changed = 4;
bool is_field_removed = 5;
required string owner_class_name = 1;
required string field_name = 2;
required int32 access_flags = 3;
optional bool is_access_changed = 4 [default = false];
optional bool is_field_removed = 5 [default = false];
}
Type type = 1;
BuildEvent build_event = 2;
CompileMessage compile_message = 3;
ConstantSearchTask constant_search_task = 4;
required Type type = 1;
optional BuildEvent build_event = 2;
optional CompileMessage compile_message = 3;
optional ConstantSearchTask constant_search_task = 4;
}
UUID session_id = 1;
Type type = 2;
ControllerMessage controller_message = 3;
BuilderMessage builder_message = 4;
Failure failure = 5;
required UUID session_id = 1;
required Type type = 2;
optional ControllerMessage controller_message = 3;
optional BuilderMessage builder_message = 4;
optional Failure failure = 5;
}
File diff suppressed because it is too large Load Diff