Commit Graph

327 Commits

Author SHA1 Message Date
Thomas Van Lenten
0a73ec7e88 Remove the support for the kokoro cocoapods integration tests. 2022-05-03 15:34:36 -04:00
David L. Jones
95da0ba5b4
Rename all BUILD files to BUILD.bazel (#9892)
This avoids conflicting names in a couple of cases.

1. Within google, we want to sync files but not name them BUILD (since the structure doesn't match).
2. On case-insensitive filesystems, `build` may be used for a build directory. Naming `BUILD.bazel` avoids potentioal conflicts.
2022-04-29 17:57:55 -07:00
Tamarous
6718fa9dcc
fix: misspelling (#9857) 2022-04-26 09:25:01 -07:00
David L. Jones
d76f8c868c
Add source distribution packaging rules (#9835)
This change adds `rules_pkg`-based targets that will produce source distribution archives, similar to `make dist`.

These rules produce nearly the same outputs as `make dist`. However, there are some differences and caveats:

1. The outputs do not contain vendored googletest sources.
2. You have to run `autogen.sh` before `blaze build pkg:all`. This produces several autotools-related files directly into the source tree.
3. The output .zip files do not have a directory prefix like `protobuf-3.20.1-rc-1` (this will be addressed after [Substitute package variables in `pkg_zip#package_dir`. bazelbuild/rules_pkg#577](https://github.com/bazelbuild/rules_pkg/pull/577); the tar files do have this prefix, though.)
4. One file is missing from the archives, which is produced during the `make` build: benchmarks/gogo/cpp_no_group/cpp_benchmark.cc
5. In several places, I have explicitly excluded some files that are not in the autotools distribution outputs. I think most of those files should probably be included, but for now, I'm aiming for parity with `make dist`. These are marked with comments, so it should be easy to clean them up later.
2022-04-22 16:58:16 -07:00
noahdietz
5abf802bc2 Replace master with main in URLs & docs 2022-04-12 10:25:08 -07:00
Thomas Van Lenten
ca30339529 Tweak how python/python3 is used.
The kokoro Mac configs seem to be pretty old without python3, tweak how things
are invoked to try and better deal with those configs.
2022-04-05 14:25:01 -04:00
Thomas Van Lenten
1e60bd62ed Update the mac python helper scripts to python3.
macOS 12.3 dropped shipping python2.

Update things for python3 (mostly via 2to3).
2022-04-05 10:42:12 -04:00
Adam Cozzette
a336ba0346 Sync from Piper @435734090
PROTOBUF_SYNC_PIPER
2022-03-18 21:25:56 +00:00
Adam Cozzette
b20209f321 Sync from Piper @acozzette/proto_github_202203101748
PROTOBUF_SYNC_PIPER
2022-03-10 18:36:42 +00:00
Thomas Van Lenten
bb4302e878 Add a generation option to control use of forward declarations in headers.
Swift importing ObjC drops methods/properties if the type is only a forward
declaration since the type is incomplete. Historically the generator has always
use forward declarations to reduce how much will have rebuild when a proto file
does change; but that puts it at odds with Swift. If ObjC Protos end up spanning
Swift modules, the Swift import behavior could become a problem; so this option
provides a control for the behavior. The current behavior is to continue forward
declarations, but eventually the default will be changed.

Generate the WKTs using imports instead of forward decls.
2022-03-03 16:05:18 -05:00
Adam Cozzette
76398dab31 Sync from Piper @431959314
PROTOBUF_SYNC_PIPER
2022-03-02 17:37:55 +00:00
Thomas Van Lenten
020e4e33d1 Simplify imports of the WKTs within the library itself.
Overdue followup to https://github.com/protocolbuffers/protobuf/pull/7173

Since all the files are at the same level as the runtime headers, there is no
need for things to be framework based imports, they should all just work like
the other headers do.

- Directly generate the bundled header imports into the preamble section when
  generating for a bundled proto.
- Update the preamble generation to skip the CPP wrapper when generating for a
  bundled proto file.
- Regenerate the WKTs.
- Update GPBProtocolBuffer.h/GPBWellKnownTypes.h to also skip the CPP wrapping.

GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS in the podspec and non bundled files still
has to exist because that comes into play for those files to find the runtime
headers.
2022-03-01 17:01:33 -05:00
Dimitris Koutsogiorgas
89c40311db Rename proto_package_to_prefix_mappings_path to package_to_prefix_mappings_path. 2022-02-25 13:10:36 -05:00
Dimitris Koutsogiorgas
a112c4ab96 Add prefix_to_proto_package_mappings_path ObjC option. 2022-02-23 14:26:53 -05:00
Dimitris Koutsogiorgas
db56692883 Revert "objective-c: Add objc_class_prefix generation option."
This reverts commit b5ab0b7a18.
2022-02-22 14:24:41 -05:00
Dimitris Koutsogiorgas
b5ab0b7a18 objective-c: Add objc_class_prefix generation option. 2022-02-08 08:22:51 -05:00
Chris Bainbridge
65852d6e9c
Fix comment syntax in any.proto (#8792)
* Fix comment syntax in any.proto

Remove extra spaces which cause incorrect indentation in godoc.
Remove the "====" style title which is not rendered by godoc.

* Run ./generate_descriptor_proto.sh
2021-10-27 11:28:21 -07:00
Thomas Van Lenten
5a81e07d44 Add Xcode 13 to the build/test script. 2021-10-01 10:00:09 -04:00
Thomas Van Lenten
57da2b45ae Update some types to be more current. 2021-09-24 11:01:19 -04:00
Joshua Haberman
e5c570bb57 Sync from Piper @395706834
PROTOBUF_SYNC_PIPER
2021-09-09 08:21:42 -07:00
Adam Cozzette
562fc946c7 Sync from Piper @388508285
PROTOBUF_SYNC_PIPER
2021-08-03 11:58:05 -07:00
Joshua Haberman
9521803d40 Sync from Piper @375548932
PROTOBUF_SYNC_PIPER
2021-05-24 13:49:39 -07:00
Deanna Garcia
380e352b0b Sync from Piper @373820256
PROTOBUF_SYNC_PIPER
2021-05-14 17:50:31 +00:00
Thomas Van Lenten
5911099659 Move the class map to a CFDictionary.
Since the keys are `Class`-s, there's no need to hash/copy/etc. them. This
avoids causing `+initialize` on the classes just when building up a registry.
2021-02-22 13:08:32 -05:00
Adam Cozzette
72fddb7272 Fixed the Codespell check 2020-11-24 15:02:25 -08:00
Thomas Van Lenten
2f6a7546e4 Update the pod tests to match the new min iOS version. 2020-11-10 11:10:51 -05:00
Thomas Van Lenten
2123ed5df7 Switch to atomic for setting autocreated objects.
- Update semaphore comment to new scope.
- Use an atomic swap to avoid needing to use the semaphore.

This means the semaphore is create only when extension are auto created (less
memory usage).
2020-10-26 11:28:17 -04:00
Thomas Van Lenten
a645d7176b Update the iOS project for Xcode 12.
- Move the min up to iOS 9.  Things should still work with 8, just can't have
  the project set to that and be able to run the tests, so moving it up to
  support running the tests.
- Remove the bitcode setting from the unittest bundle, was causing an error
  with Xcode 12.
2020-10-21 15:42:09 -04:00
Thomas Van Lenten
676ea98902 Update the build/testing script for Xcode 12. 2020-10-21 15:42:09 -04:00
Thomas Van Lenten
9c27f6a479 Add cast to avoid warning on Xcode 12. 2020-10-21 15:42:09 -04:00
Joshua Haberman
32a94ce353 Merge tag 'refs/tags/sync-piper' into sync-stage
# Conflicts:
#	csharp/src/Google.Protobuf.Test/testprotos.pb
2020-08-17 15:26:33 -07:00
Joshua Haberman
95e6c5b474 Sync from Piper @327110949
PROTOBUF_SYNC_PIPER
2020-08-17 15:26:13 -07:00
Peter Newman
e2cc2de304
Fix lots of spelling errors (#7751)
* Fix a typo

* Fix lots of spelling errors

* Fix a few more spelling mistakes

* s/parsable/parseable/

* Don't touch the third party files

* Cloneable is the preferred C# term

* Copyable is the preferred C++ term

* Revert "s/parsable/parseable/"

This reverts commit 534ecf7675.

* Revert unparseable->unparsable corrections
2020-08-10 11:08:25 -07:00
Yannic Bonenberger
8b93b8eae5 [bazel] Move Objective-C runtime into //objectivec
Removing language-specific targets from the top-level BUILD file
will allow users to keep their workspaces smaller and easier to
maintain by not depending on language rules they don't need.

Similar work was done for Java in #7190.
2020-07-20 16:51:30 -07:00
Joshua Haberman
25755efc4f Sync from Piper @319848517
PROTOBUF_SYNC_PIPER
2020-07-06 13:54:50 -07:00
Joshua Haberman
f77065d4eb Sync from Piper @316511779
PROTOBUF_SYNC_PIPER
2020-06-15 11:48:47 -07:00
Thomas Van Lenten
9f546ba61b ObjC Support a runtime import override.
Option to add a prefix to generated #imports incase ObjC Protos are
used in a build system where one wants to avoid adding a header
search path and have more complete imports.
2020-06-09 13:05:50 -04:00
Joshua Haberman
b971243fe0 Merge branch '3.12.x' into merge-release-branch 2020-06-02 13:24:30 -07:00
Thomas Van Lenten
2360bacd12 Tweak the union used for Extensions to support old generated code.
Support the old field name as well as the union to keep the old generated code
building.

Fixes #7555
2020-05-28 15:02:31 -04:00
Joshua Haberman
0a737d8eb0 Sync from Piper @313142438
PROTOBUF_SYNC_PIPER
2020-05-26 00:26:15 -07:00
Joshua Haberman
1e8d04061c Remove includes of deleted "no_arena" protos from ObjC. 2020-05-13 16:31:53 -07:00
Joshua Haberman
c8fce07914 Removed "no_arena" variants from the build system. 2020-05-13 13:49:35 -07:00
Joshua Haberman
6ed738305b Sync from Piper @311396324
PROTOBUF_SYNC_PIPER
2020-05-13 13:46:15 -07:00
Dave MacLachlan
118589c565 Remove unnecessary call to [self descriptor] in resolveClassMethod:
This was causing problems in OCMock due to recursion when OCMock was trying
to mock a protobuf.

`_forwardStackInvocation:` was being called as part of the resolution of `descriptor`.
2020-05-11 11:31:58 -04:00
Joshua Haberman
32e5deb1ac Sync from Piper @308829107
PROTOBUF_SYNC_PIPER
2020-04-28 08:40:38 -07:00
Thomas Van Lenten
dddeed298b [ObjC] Typos and comment improvements. 2020-04-24 16:36:15 -04:00
Thomas Van Lenten
7b6016e343 [ObjC] Add tests for proto3 optional behaviors. 2020-04-24 16:36:15 -04:00
Thomas Van Lenten
b0e2792842 [ObjC] Generation changes around proto3 optional.
- Bump the version marker in the generated code.
- Set the flag to say clear on zero is known.
- Set clear on zero for proto3 optional fields that aren't tagged as optional.
- Also tweak the call from some C generated code to use different apis with
  better validation.
- Mark the ObjC generator as supporting the proto3 optional feature.
- Regenerate the WKTs to get the new flags.
2020-04-24 16:36:15 -04:00
Thomas Van Lenten
3c8e959b60 [ObjC] Update oneof clearing internals.
- Add/document an public api for clearing oneofs.
- Move the current library internals to a new api and keep a shim for old
  generated code.
2020-04-24 16:36:15 -04:00
Thomas Van Lenten
e1e5b8af79 [ObjC] Update some library internals to not pass syntax versions.
- With the new flags, the syntax isn't needed, so don't pass it.
- To keep library binary compatibility, rename the helpers since one
  "Internal" method was called from generated code. Keep a shim with
  the old signature to support those generated sources.
2020-04-24 16:36:15 -04:00