Commit ef1e8e71 authored by Hao Nguyen's avatar Hao Nguyen

Add module for JavaLite and fix builds

parent 6dc9832a
......@@ -116,6 +116,7 @@ cc_library(
"src/google/protobuf/implicit_weak_message.cc",
"src/google/protobuf/io/coded_stream.cc",
"src/google/protobuf/io/strtod.cc",
"src/google/protobuf/io/io_win32.cc",
"src/google/protobuf/io/zero_copy_stream.cc",
"src/google/protobuf/io/zero_copy_stream_impl_lite.cc",
"src/google/protobuf/message_lite.cc",
......@@ -124,7 +125,6 @@ cc_library(
"src/google/protobuf/stubs/bytestream.cc",
"src/google/protobuf/stubs/common.cc",
"src/google/protobuf/stubs/int128.cc",
"src/google/protobuf/stubs/io_win32.cc",
"src/google/protobuf/stubs/status.cc",
"src/google/protobuf/stubs/statusor.cc",
"src/google/protobuf/stubs/stringpiece.cc",
......@@ -514,7 +514,7 @@ cc_binary(
cc_test(
name = "win32_test",
srcs = ["src/google/protobuf/stubs/io_win32_unittest.cc"],
srcs = ["src/google/protobuf/io/io_win32_unittest.cc"],
deps = [
":protobuf_lite",
"//external:gtest_main",
......@@ -553,6 +553,7 @@ cc_test(
"src/google/protobuf/extension_set_unittest.cc",
"src/google/protobuf/generated_message_reflection_unittest.cc",
"src/google/protobuf/io/coded_stream_unittest.cc",
"src/google/protobuf/io/io_win32_unittest.cc",
"src/google/protobuf/io/printer_unittest.cc",
"src/google/protobuf/io/tokenizer_unittest.cc",
"src/google/protobuf/io/zero_copy_stream_unittest.cc",
......@@ -572,7 +573,6 @@ cc_test(
"src/google/protobuf/stubs/bytestream_unittest.cc",
"src/google/protobuf/stubs/common_unittest.cc",
"src/google/protobuf/stubs/int128_unittest.cc",
"src/google/protobuf/stubs/io_win32_unittest.cc",
"src/google/protobuf/stubs/status_test.cc",
"src/google/protobuf/stubs/statusor_test.cc",
"src/google/protobuf/stubs/stringpiece_unittest.cc",
......
This diff is collapsed.
......@@ -362,7 +362,7 @@ test_php_zts_c: protoc_middleman conformance-test-runner conformance-php-c $(oth
# These depend on library paths being properly set up. The easiest way to
# run them is to just use "tox" from the python dir.
test_python: protoc_middleman conformance-test-runner
./conformance-test-runner --enforce_recommended --failure_list failure_list_python.txt ./conformance_python.py
./conformance-test-runner --enforce_recommended --failure_list failure_list_python.txt --text_format_failure_list text_format_failure_list_python.txt ./conformance_python.py
test_python_cpp: protoc_middleman conformance-test-runner
./conformance-test-runner --enforce_recommended --failure_list failure_list_python_cpp.txt ./conformance_python.py
......
......@@ -113,11 +113,13 @@ namespace Google.Protobuf.WellKnownTypes {
/// 01:30 UTC on January 15, 2017.
///
/// In JavaScript, one can convert a Date object to this format using the
/// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
/// standard
/// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
/// method. In Python, a standard `datetime.datetime` object can be converted
/// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
/// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
/// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
/// to this format using
/// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
/// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
/// the Joda Time's [`ISODateTimeFormat.dateTime()`](
/// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
/// ) to obtain a formatter capable of generating timestamps in this format.
/// </summary>
......
......@@ -5,43 +5,56 @@
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=${test.proto.dir}"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_custom_options.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_enormous_descriptor.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset_wire_format.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_optimize_for.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_custom_options.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite_imports_nonlite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_enormous_descriptor.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_no_generic_services.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_optimize_for.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_well_known_types.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/any_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/cached_field_size_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/deprecated_file.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/field_presence_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/lazy_fields_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/lite_equals_and_hash.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_for_proto2_lite_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_for_proto2_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_initialization_order_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_lite_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/message_lite_extension_util_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/multiple_files_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/nested_builders_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/nested_extension.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/nested_extension_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/non_nested_extension.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/non_nested_extension_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test2.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test3.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/proto2_unknown_enum_values.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/outer_class_name_test3.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/packed_field_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/proto2_message.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/proto2_message_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/proto2_unknown_enum_values.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/proto3_message.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/proto3_message_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/test_bad_identifiers.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/test_check_utf8.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/test_check_utf8_size.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/test_custom_options.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/any_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/field_presence_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_for_proto2_lite_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_for_proto2_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_lite_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/map_initialization_order_test.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/wrappers_test.proto"/>
</exec>
<!-- Also generate some Lite protos needed for ExtensionRegistryFactoryTest -->
<exec executable="${protoc}">
<arg value="--java_out=lite:${generated.testsources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=${test.proto.dir}"/>
<arg value="${test.proto.dir}/com/google/protobuf/nested_extension_lite.proto"/>
<arg value="${test.proto.dir}/com/google/protobuf/non_nested_extension_lite.proto"/>
</exec>
</project>
<project name="generate-sources">
<echo message="Running protoc ..."/>
<mkdir dir="${generated.sources.dir}"/>
<exec executable="${protoc}">
<arg value="--java_out=lite:${generated.sources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="${protobuf.source.dir}/google/protobuf/any.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/api.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/duration.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/empty.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/field_mask.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/source_context.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/struct.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/timestamp.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/type.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/wrappers.proto"/>
</exec>
</project>
<project name="generate-test-sources">
<mkdir dir="${generated.testsources.dir}"/>
<exec executable="${protoc}">
<arg value="--java_out=lite:${generated.testsources.dir}"/>
<arg value="--proto_path=${protobuf.source.dir}"/>
<arg value="--proto_path=${protobuf.basedir}/java/core/${test.proto.dir}"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_import_public_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_lite.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_mset_wire_format.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_no_generic_services.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_optimize_for.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_proto3.proto"/>
<arg value="${protobuf.source.dir}/google/protobuf/unittest_well_known_types.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/any_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/cached_field_size_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/deprecated_file.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/field_presence_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/lazy_fields_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/lite_equals_and_hash.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_for_proto2_lite_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_for_proto2_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_initialization_order_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_lite_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/map_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/message_lite_extension_util_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/nested_builders_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/nested_extension.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/nested_extension_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/non_nested_extension.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/non_nested_extension_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/outer_class_name_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/outer_class_name_test2.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/outer_class_name_test3.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/packed_field_test.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto2_message.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto2_message_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto2_unknown_enum_values.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto3_message.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/proto3_message_lite.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/test_bad_identifiers.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/test_check_utf8.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/test_check_utf8_size.proto"/>
<arg value="${protobuf.basedir}/java/core/${test.proto.dir}/com/google/protobuf/wrappers_test.proto"/>
</exec>
</project>
# Remove code enclosed by "BEGIN FULL-RUNTIME" and "END FULL-RUNTIME" to
# create the lite-only version of a test file.
BEGIN {
in_full_runtime = 0;
}
/BEGIN FULL-RUNTIME/ {
in_full_runtime = 1;
next;
}
/END FULL-RUNTIME/ {
in_full_runtime = 0;
next;
}
in_full_runtime {
# Skip full runtime code path.
next;
}
{
print;
}
This diff is collapsed.
<project name="process-lite-sources">
<exec executable="awk" output="${generated.testsources.dir}/com/google/protobuf/TestUtil.java">
<arg value="-f" />
<arg value="${basedir}/lite.awk" />
<arg value="${basedir}/../core/src/test/java/com/google/protobuf/TestUtil.java" />
</exec>
</project>
......@@ -223,6 +223,7 @@
<modules>
<module>bom</module>
<module>lite</module>
<module>core</module>
<module>util</module>
</modules>
......
......@@ -129,11 +129,13 @@ typedef GPB_ENUM(GPBTimestamp_FieldNumber) {
* 01:30 UTC on January 15, 2017.
*
* In JavaScript, one can convert a Date object to this format using the
* standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* standard
* [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
* method. In Python, a standard `datetime.datetime` object can be converted
* to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
* with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
* can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
* to this format using
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
* http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
* ) to obtain a formatter capable of generating timestamps in this format.
**/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment