diff --git a/arduino-core/src/cc/arduino/cli/commands/Compile.java b/arduino-core/src/cc/arduino/cli/commands/Compile.java index e183b4f42..e3c92cd9d 100644 --- a/arduino-core/src/cc/arduino/cli/commands/Compile.java +++ b/arduino-core/src/cc/arduino/cli/commands/Compile.java @@ -14,6 +14,110 @@ public final class Compile { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } + /** + * Protobuf enum {@code cc.arduino.cli.commands.CompileResult} + */ + public enum CompileResult + implements com.google.protobuf.ProtocolMessageEnum { + /** + * success = 0; + */ + success(0), + /** + * error = 1; + */ + error(1), + UNRECOGNIZED(-1), + ; + + /** + * success = 0; + */ + public static final int success_VALUE = 0; + /** + * error = 1; + */ + public static final int error_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompileResult valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompileResult forNumber(int value) { + switch (value) { + case 0: return success; + case 1: return error; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CompileResult> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompileResult findValueByNumber(int number) { + return CompileResult.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return cc.arduino.cli.commands.Compile.getDescriptor().getEnumTypes().get(0); + } + + private static final CompileResult[] VALUES = values(); + + public static CompileResult valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompileResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cc.arduino.cli.commands.CompileResult) + } + public interface CompileReqOrBuilder extends // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.CompileReq) com.google.protobuf.MessageOrBuilder { @@ -306,6 +410,16 @@ public final class Compile { * @return The optimizeForDebug. */ boolean getOptimizeForDebug(); + + /** + *
+     * When set to true the compiled binary will not be copied to the export directory
+     * 
+ * + * bool dryRun = 17; + * @return The dryRun. + */ + boolean getDryRun(); } /** * Protobuf type {@code cc.arduino.cli.commands.CompileReq} @@ -465,6 +579,11 @@ public final class Compile { optimizeForDebug_ = input.readBool(); break; } + case 136: { + + dryRun_ = input.readBool(); + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -1012,6 +1131,20 @@ public final class Compile { return optimizeForDebug_; } + public static final int DRYRUN_FIELD_NUMBER = 17; + private boolean dryRun_; + /** + *
+     * When set to true the compiled binary will not be copied to the export directory
+     * 
+ * + * bool dryRun = 17; + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1074,6 +1207,9 @@ public final class Compile { if (optimizeForDebug_ != false) { output.writeBool(16, optimizeForDebug_); } + if (dryRun_ != false) { + output.writeBool(17, dryRun_); + } unknownFields.writeTo(output); } @@ -1148,6 +1284,10 @@ public final class Compile { size += com.google.protobuf.CodedOutputStream .computeBoolSize(16, optimizeForDebug_); } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, dryRun_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1198,6 +1338,8 @@ public final class Compile { .equals(other.getLibrariesList())) return false; if (getOptimizeForDebug() != other.getOptimizeForDebug()) return false; + if (getDryRun() + != other.getDryRun()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1252,6 +1394,9 @@ public final class Compile { hash = (37 * hash) + OPTIMIZEFORDEBUG_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getOptimizeForDebug()); + hash = (37 * hash) + DRYRUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDryRun()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1421,6 +1566,8 @@ public final class Compile { bitField0_ = (bitField0_ & ~0x00000002); optimizeForDebug_ = false; + dryRun_ = false; + return this; } @@ -1476,6 +1623,7 @@ public final class Compile { } result.libraries_ = libraries_; result.optimizeForDebug_ = optimizeForDebug_; + result.dryRun_ = dryRun_; onBuilt(); return result; } @@ -1593,6 +1741,9 @@ public final class Compile { if (other.getOptimizeForDebug() != false) { setOptimizeForDebug(other.getOptimizeForDebug()); } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2937,6 +3088,48 @@ public final class Compile { onChanged(); return this; } + + private boolean dryRun_ ; + /** + *
+       * When set to true the compiled binary will not be copied to the export directory
+       * 
+ * + * bool dryRun = 17; + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + /** + *
+       * When set to true the compiled binary will not be copied to the export directory
+       * 
+ * + * bool dryRun = 17; + * @param value The dryRun to set. + * @return This builder for chaining. + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + *
+       * When set to true the compiled binary will not be copied to the export directory
+       * 
+ * + * bool dryRun = 17; + * @return This builder for chaining. + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3005,6 +3198,17 @@ public final class Compile { * @return The errStream. */ com.google.protobuf.ByteString getErrStream(); + + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return The result. + */ + cc.arduino.cli.commands.Compile.CompileResult getResult(); } /** * Protobuf type {@code cc.arduino.cli.commands.CompileResp} @@ -3021,6 +3225,7 @@ public final class Compile { private CompileResp() { outStream_ = com.google.protobuf.ByteString.EMPTY; errStream_ = com.google.protobuf.ByteString.EMPTY; + result_ = 0; } @java.lang.Override @@ -3063,6 +3268,12 @@ public final class Compile { errStream_ = input.readBytes(); break; } + case 24: { + int rawValue = input.readEnum(); + + result_ = rawValue; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -3115,6 +3326,25 @@ public final class Compile { return errStream_; } + public static final int RESULT_FIELD_NUMBER = 3; + private int result_; + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return The enum numeric value on the wire for result. + */ + public int getResultValue() { + return result_; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return The result. + */ + public cc.arduino.cli.commands.Compile.CompileResult getResult() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Compile.CompileResult result = cc.arduino.cli.commands.Compile.CompileResult.valueOf(result_); + return result == null ? cc.arduino.cli.commands.Compile.CompileResult.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -3135,6 +3365,9 @@ public final class Compile { if (!errStream_.isEmpty()) { output.writeBytes(2, errStream_); } + if (result_ != cc.arduino.cli.commands.Compile.CompileResult.success.getNumber()) { + output.writeEnum(3, result_); + } unknownFields.writeTo(output); } @@ -3152,6 +3385,10 @@ public final class Compile { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, errStream_); } + if (result_ != cc.arduino.cli.commands.Compile.CompileResult.success.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, result_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3171,6 +3408,7 @@ public final class Compile { .equals(other.getOutStream())) return false; if (!getErrStream() .equals(other.getErrStream())) return false; + if (result_ != other.result_) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3186,6 +3424,8 @@ public final class Compile { hash = (53 * hash) + getOutStream().hashCode(); hash = (37 * hash) + ERR_STREAM_FIELD_NUMBER; hash = (53 * hash) + getErrStream().hashCode(); + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -3323,6 +3563,8 @@ public final class Compile { errStream_ = com.google.protobuf.ByteString.EMPTY; + result_ = 0; + return this; } @@ -3351,6 +3593,7 @@ public final class Compile { cc.arduino.cli.commands.Compile.CompileResp result = new cc.arduino.cli.commands.Compile.CompileResp(this); result.outStream_ = outStream_; result.errStream_ = errStream_; + result.result_ = result_; onBuilt(); return result; } @@ -3405,6 +3648,9 @@ public final class Compile { if (other.getErrStream() != com.google.protobuf.ByteString.EMPTY) { setErrStream(other.getErrStream()); } + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -3499,6 +3745,58 @@ public final class Compile { onChanged(); return this; } + + private int result_ = 0; + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return The enum numeric value on the wire for result. + */ + public int getResultValue() { + return result_; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + result_ = value; + onChanged(); + return this; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return The result. + */ + public cc.arduino.cli.commands.Compile.CompileResult getResult() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Compile.CompileResult result = cc.arduino.cli.commands.Compile.CompileResult.valueOf(result_); + return result == null ? cc.arduino.cli.commands.Compile.CompileResult.UNRECOGNIZED : result; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult(cc.arduino.cli.commands.Compile.CompileResult value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 3; + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -3572,7 +3870,7 @@ public final class Compile { static { java.lang.String[] descriptorData = { "\n\026commands/compile.proto\022\027cc.arduino.cli" + - ".commands\032\025commands/common.proto\"\344\002\n\nCom" + + ".commands\032\025commands/common.proto\"\364\002\n\nCom" + "pileReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.c" + "li.commands.Instance\022\014\n\004fqbn\030\002 \001(\t\022\022\n\nsk" + "etchPath\030\003 \001(\t\022\026\n\016showProperties\030\004 \001(\010\022\022" + @@ -3581,10 +3879,13 @@ public final class Compile { "\030\010 \003(\t\022\020\n\010warnings\030\t \001(\t\022\017\n\007verbose\030\n \001(" + "\010\022\r\n\005quiet\030\013 \001(\010\022\016\n\006vidPid\030\014 \001(\t\022\022\n\nexpo" + "rtFile\030\r \001(\t\022\014\n\004jobs\030\016 \001(\005\022\021\n\tlibraries\030" + - "\017 \003(\t\022\030\n\020optimizeForDebug\030\020 \001(\010\"5\n\013Compi" + - "leResp\022\022\n\nout_stream\030\001 \001(\014\022\022\n\nerr_stream" + - "\030\002 \001(\014B-Z+github.com/arduino/arduino-cli" + - "/rpc/commandsb\006proto3" + "\017 \003(\t\022\030\n\020optimizeForDebug\030\020 \001(\010\022\016\n\006dryRu" + + "n\030\021 \001(\010\"m\n\013CompileResp\022\022\n\nout_stream\030\001 \001" + + "(\014\022\022\n\nerr_stream\030\002 \001(\014\0226\n\006result\030\003 \001(\0162&" + + ".cc.arduino.cli.commands.CompileResult*\'" + + "\n\rCompileResult\022\013\n\007success\020\000\022\t\n\005error\020\001B" + + "-Z+github.com/arduino/arduino-cli/rpc/co" + + "mmandsb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -3596,13 +3897,13 @@ public final class Compile { internal_static_cc_arduino_cli_commands_CompileReq_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cc_arduino_cli_commands_CompileReq_descriptor, - new java.lang.String[] { "Instance", "Fqbn", "SketchPath", "ShowProperties", "Preprocess", "BuildCachePath", "BuildPath", "BuildProperties", "Warnings", "Verbose", "Quiet", "VidPid", "ExportFile", "Jobs", "Libraries", "OptimizeForDebug", }); + new java.lang.String[] { "Instance", "Fqbn", "SketchPath", "ShowProperties", "Preprocess", "BuildCachePath", "BuildPath", "BuildProperties", "Warnings", "Verbose", "Quiet", "VidPid", "ExportFile", "Jobs", "Libraries", "OptimizeForDebug", "DryRun", }); internal_static_cc_arduino_cli_commands_CompileResp_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_cc_arduino_cli_commands_CompileResp_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cc_arduino_cli_commands_CompileResp_descriptor, - new java.lang.String[] { "OutStream", "ErrStream", }); + new java.lang.String[] { "OutStream", "ErrStream", "Result", }); cc.arduino.cli.commands.Common.getDescriptor(); }