Commit graph

3645 commits

Author SHA1 Message Date
Jon Skeet
3df146e198 Remove unnecessary reflection call
This is the only call to TypeExtensions.IsValueType, so we can remove
that method, making the whole type conditionally compiled out for .NET 3.5
2016-07-08 18:21:25 +01:00
Thomas Van Lenten
8b00675fc8 Merge pull request #1757 from thomasvl/avoid_importing_src
Don't #import the .m files.
2016-07-07 17:27:26 -04:00
Jon Skeet
03d9e096d9 Merge pull request #1735 from jskeet/attribute-placement
Change placement of DebuggerNonUserCodeAttribute
2016-07-07 22:11:22 +01:00
Feng Xiao
c850ebcafa Merge pull request #1758 from dago/pathmax2
Make sure also Solaris x86 gets PATH_MAX
2016-07-07 13:58:11 -07:00
Jon Skeet
e9a7fc837f Remove WriteGeneratedTypeAttributes which is a no-op
This does not affect the generated code.
If we decide we want to apply attributes to generated types, we should start by
just reverting this change.
2016-07-07 20:20:42 +01:00
Dagobert Michelsen
57638d58e1 Make sure also Solaris x86 gets PATH_MAX 2016-07-07 20:36:01 +02:00
Jisi Liu
eaf3451cbb Merge pull request #1753 from xfxyjwf/fixup
Fix problems detected when integrating the code to our internal repo.
2016-07-07 09:19:40 -07:00
Thomas Van Lenten
be0d7f6664 Don't #import the .m files.
As bazel folks are looking at getting auto generation of module maps going and
the importing of sources files causes issues there.  We were only do it to
hack around some of the apple linker behaviors around objc classes and
categories, but even that isn't complete and CocoaPods was already doing -ObjC,
and developers not using pods could have still needed it to ensure everything
was linked anyways; so drop the hack of importing sources.
2016-07-07 08:45:18 -04:00
Feng Xiao
0d5091ee88 Merge pull request #1742 from ottok/fix-spelling
Fix spelling
2016-07-06 15:44:34 -07:00
Feng Xiao
d84d0ca13e Fix data member declaration order. 2016-07-06 15:38:10 -07:00
Feng Xiao
a29a9c5d49 Don't support global ::string in stringpiece.h 2016-07-06 15:37:27 -07:00
Adam Cozzette
c10938a1d9 Merge pull request #1752 from acozzette/fix-js-tests
Fixed failing JS tests
2016-07-06 14:51:11 -07:00
Adam Cozzette
c64d86ed4f Fixed failing JS tests
A couple of small tweaks were needed to fix test failures that were
inadvertently introduced in the last down integration. I also had to add
the map.js file which was missing.
2016-07-06 14:11:39 -07:00
Thomas Van Lenten
ec4589736e Merge pull request #1712 from dkharrat/swift-error-handling
add nullable qualifier to return types that can be nil, to support Swift 2 try-catch syntax
2016-07-06 10:15:55 -04:00
Dia Kharrat
523bfd4f23 add nullable qualifier to nil return types
Add the `nullable` qualifier to return types of Objective-C methods that
can return a nil due to errors. This change makes these methods
compatible with the Swift 2 try-catch syntax.
2016-07-05 01:30:41 -07:00
Jon Skeet
c53484539c Changes to generated code from previous commit 2016-07-04 08:22:18 +01:00
Jon Skeet
ada0a81a74 Move DebuggerNonUserCodeAttribute to function members
I think this has caught everything.
I've left a stub for attributes to be applied to the types themselves, but we don't currently need anything.

Follow-up commit will include the changes to generated code itself.

Fixes #1671.
2016-07-04 08:22:18 +01:00
Otto Kekäläinen
d2ae496623 Fix spelling error in function ParseTime parameter 2016-07-03 15:32:02 +03:00
Otto Kekäläinen
3808d091f8 Fix spelling in strings and comments 2016-07-03 15:26:04 +03:00
Feng Xiao
cae3b0cbb6 Merge pull request #1704 from lizan/json_parse_options
Add JsonParseOptions to ignore unknown fields
2016-07-01 15:43:37 -07:00
Feng Xiao
02b55d248f Merge pull request #1738 from xfxyjwf/fixbuild
Fix some failing travis tests.
2016-07-01 11:44:39 -07:00
Feng Xiao
e102db1f05 Fix some failing travis tests.
1. Add missing header file to Makefile.am.
2. Re-generate objectivec generated code for well-known types.

Change-Id: If28217c701cf8bd739ea0db240e9eee600f23ee7
2016-07-01 11:02:04 -07:00
Feng Xiao
aeff638a4c Merge pull request #1710 from chezRong/master
Add minified Json printing functionality
2016-07-01 10:18:28 -07:00
Thomas Van Lenten
7e8c893003 Merge pull request #1723 from thomasvl/objc_test_coverage
Xcode project cleanup/setup.
2016-07-01 09:46:51 -04:00
chezRong
454dbf16fc added minified JSON formatting functionality with test 2016-07-01 10:08:16 +01:00
Feng Xiao
2fe0556c7a Fix windows build.
Change-Id: Ibf7d1df850f4b497303f9f617751be98327898ef
2016-06-30 14:29:05 -07:00
Adam Cozzette
69cc213c76 Updated failure_list_java.txt to remove tests that now pass 2016-06-30 10:28:10 -07:00
Adam Cozzette
b83af525db Fixed string formatting in text_format.py to be Python2.6-compatible
In Python 2.6 the positional argument specifiers are apparently required
to be explicitly specified:
http://stackoverflow.com/questions/10054122/valueerror-zero-length-field-name-in-format-python
2016-06-30 10:13:53 -07:00
Adam Cozzette
d64a2d9941 Integrated internal changes from Google
This includes all internal changes from around May 20 to now.
2016-06-29 15:38:03 -07:00
Thomas Van Lenten
6cfc19edde Xcode project cleanup/setup.
- Correct some cases sources were compiled into the static lib and the tests.
- Enable Xcodes code coverage support on the unittests.  We aren't complete on
  coverage, but having the data always there should make it easier to chip away
  at this going forward.
- Drop method in tests that isn't used, wire up a validator in another test.
2016-06-29 09:53:46 -04:00
Thomas Van Lenten
c18aa7795a Validate the tag numbers when parsing. (#1725)
There was a twist code path (that some times showed up due to what happened to
be in memory in failure cases), that would cast a bogus wire type into the
enum, and then fall through switch statements.

Resolve this by validating all wire types when parsing tags and throwing the
error at that point so it can't enter the system.

As added safety, stick in a few asserts for apis that get passed tags to ensure
they also are only seeing valid data.

Bonus: Tweak the parsing loop to skip some work when we get the end marker
(zero tag) instead of still looping through all the fields.
2016-06-29 09:51:13 -04:00
Thomas Van Lenten
e0016c5b6a Merge pull request #1720 from thomasvl/issue_1716
Fix GPBGetMessage{Repeated,Map}Field()
2016-06-28 08:29:19 -04:00
Lizan Zhou
31999a3f95 Add JsonParseOptions to ignore unknown fields
- add JsonParseOptions for JsonToBinaryString allow unknown fields
- rename current JsonOptions to JsonPrintOptions
2016-06-28 00:17:06 -07:00
detlevschwabe
dc0aeaa903 Adding conditional compiler symbol to support .NET 3.5 (#1713)
* Adding condition compiler symbol to support .NET 3.5
2016-06-28 06:31:42 +01:00
Thomas Van Lenten
fc4c617199 Fix GPBGetMessage{Repeated,Map}Field()
- Correct impl by using helpers the message wiring does.
- Add unittests.

Fixes https://github.com/google/protobuf/issues/1716
2016-06-27 20:46:26 -04:00
Thomas Van Lenten
7b5648ca98 Merge pull request #1719 from esteluk/patch-1
Fix Objective-C generator option readme typo
2016-06-27 20:17:49 -04:00
Nathan Wong
3be6110934 Fix Objective-C generator option typo
Looks like this was changed during #1683, but missed in the README :)
2016-06-27 22:56:34 +01:00
Thomas Van Lenten
2bcd43afe4 Merge pull request #1714 from dnkoutso/master
Get value from text format name in GPBEnumDescriptor
2016-06-26 21:09:40 -04:00
Dimitris Koutsogiorgas
37ca94f8ae Get value from text format name in GPBEnumDescriptor 2016-06-26 10:38:58 -07:00
Joshua Haberman
0ab78e19eb Merge pull request #1705 from haberman/revjsver
Updates to package.json: rev version, add WKT, and recateogrize dependencies
2016-06-23 15:14:49 -07:00
Josh Haberman
6a6f95d522 JS package.json: Added author and updated Closure Library version. 2016-06-23 15:08:15 -07:00
Jan Tattermusch
6f67be6f37 Merge pull request #1707 from jskeet/format-value
Expose JsonFormatter.WriteValue.
2016-06-23 11:32:54 -07:00
Jon Skeet
0421238cc1 Expose JsonFormatter.WriteValue.
This isn't useful to most users, but can be handy in advanced use cases,
as requested in #1465.
2016-06-23 12:31:10 +01:00
Josh Haberman
1dc62803e8 Moved all dependencies to devDependencies.
The runtime doesn't depend on anything, so these
packages should always have been in devDependencies.
2016-06-22 16:29:20 -07:00
Josh Haberman
48735cba77 Add "google" to package.json "files" for WKT. 2016-06-22 13:11:26 -07:00
Josh Haberman
c4b40a37dd Create patch release for JS to include WKT. 2016-06-22 13:08:50 -07:00
Jon Skeet
a897ebb6a8 Merge pull request #1700 from jskeet/ordering
Remove ordering guarantees in the MapField documentation
2016-06-21 18:26:02 +01:00
Thomas Van Lenten
a230b5d209 Rename methods to avoid ObjC KVC collisions. (#1699)
Note: Breaking API change on the Dictionary classes.

The numeric value classes were using "Value" in the naming, but this silently
collided with the KVC category on NSObject; meaning KVC code could break up a
keypath and call these selectors with the wrong types leading to crashes (even
though the code all would compile cleanly).

- Rename the methods to use the "type" instead of literal "Value".
- Update all the impls and tests.
- Enable the warning that will catch issues like this in the future.

Fixes https://github.com/google/protobuf/issues/1616
2016-06-21 08:25:28 -04:00
Jon Skeet
e3f6e2b870 Remove ordering guarantees in the MapField documentation
This doesn't currently change the ordering in the implementation, but allows us to do so in the future.
We also need to change
https://developers.google.com/protocol-buffers/docs/reference/csharp-generated#singular
which states "Finally, unlike Dictionary<TKey, TValue>, MapField<TKey, TValue> preserves insertion order of entries."
(We can just remove that sentence, I think.)
2016-06-21 07:22:48 +01:00
Sergio Campamá
1a5333b8c1 Adds destination flag to xcodebuild to avoid possible flake errors (#1697)
Adds destination flag to xcodebuild to avoid possible flake errors
2016-06-20 13:44:38 -04:00