Skip to content

Commit

Permalink
Merge branch 'shush' into shush-connect
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Jan 23, 2024
2 parents 3d9473c + cc0eedd commit b8f7899
Show file tree
Hide file tree
Showing 13 changed files with 96 additions and 20 deletions.
10 changes: 10 additions & 0 deletions gRPC-C++.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions gRPC-Core.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions gRPC.podspec

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions requirements.bazel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ proto-plus==1.22.3
google-auth==2.23.4
googleapis-common-protos==1.61.0
cachetools==5.3.2
charset-normalizer==3.3.2
charset-normalizer==3.3.2
pyasn1==0.5.0
rsa==4.9
rsa==4.9
greenlet==1.1.3.post0
zope.interface==6.1
opentelemetry-sdk==1.21.0
Expand Down
5 changes: 5 additions & 0 deletions src/objective-c/BoringSSL-GRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ Pod::Spec.new do |s|
end
s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = 'src'

ss.resource_bundles = {
s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy'
}

ss.source_files = 'src/ssl/*.{h,c,cc}',
'src/ssl/**/*.{h,c,cc}',
'src/crypto/*.{h,c,cc}',
Expand Down
8 changes: 8 additions & 0 deletions src/objective-c/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
</dict>
</plist>
10 changes: 10 additions & 0 deletions templates/gRPC-C++.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@

s.header_mappings_dir = 'include/grpcpp'

# Exposes the privacy manifest. Depended on by any subspecs containing
# non-interface files.
s.subspec 'Privacy' do |ss|
ss.resource_bundles = {
s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy'
}
end

s.subspec 'Interface' do |ss|
ss.header_mappings_dir = 'include/grpcpp'

Expand All @@ -172,6 +180,7 @@

s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = '.'
ss.dependency "#{s.name}/Privacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
abseil_version = '1.20230802.0'
Expand Down Expand Up @@ -203,6 +212,7 @@
ss.header_mappings_dir = '.'
ss.dependency "#{s.name}/Cronet-Interface", version
ss.dependency "#{s.name}/Implementation", version
ss.dependency "#{s.name}/Privacy", version

ss.dependency 'gRPC-Core/Cronet-Implementation', version

Expand Down
10 changes: 10 additions & 0 deletions templates/gRPC-Core.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@
s.compiler_flags = '-DGRPC_ARES=0 -Wno-comma'
s.libraries = 'c++'

# Exposes the privacy manifest. Depended on by any subspecs containing
# non-interface files.
s.subspec 'Privacy' do |ss|
ss.resource_bundles = {
s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy'
}
end

# Like many other C libraries, gRPC-Core has its public headers under `include/<libname>/` and its
# sources and private headers in other directories outside `include/`. Cocoapods' linter doesn't
# allow any header to be listed outside the `header_mappings_dir` (even though doing so works in
Expand All @@ -189,6 +197,7 @@
ss.header_mappings_dir = '.'
ss.libraries = 'z'
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Privacy", version
ss.dependency 'BoringSSL-GRPC', '0.0.31'
% for abseil_spec in grpc_abseil_specs:
ss.dependency '${abseil_spec}', abseil_version
Expand All @@ -214,6 +223,7 @@

ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Implementation", version
ss.dependency "#{s.name}/Privacy", version
ss.dependency "#{s.name}/Cronet-Interface", version

ss.source_files = ${ruby_multiline_list(grpc_cronet_files, 22)}
Expand Down
16 changes: 12 additions & 4 deletions templates/gRPC.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
:tag => "v#{version}",
}

s.resource = 'src/objective-c/PrivacyInfo.xcprivacy'

name = 'GRPCClient'
s.module_name = name
s.header_dir = name
Expand All @@ -54,6 +52,14 @@
s.tvos.deployment_target = '12.0'
s.watchos.deployment_target = '6.0'

# Exposes the privacy manifest. Depended on by any subspecs containing
# non-interface files.
s.subspec 'Privacy' do |ss|
ss.resource_bundles = {
s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy'
}
end

s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'

Expand All @@ -74,7 +80,7 @@
"src/objective-c/GRPCClient/GRPCTypes.h",
"src/objective-c/GRPCClient/GRPCTypes.mm"
ss.dependency "gRPC-RxLibrary/Interface", version

ss.dependency "#{s.name}/Privacy", version
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
Expand Down Expand Up @@ -109,7 +115,7 @@
'src/objective-c/GRPCClient/version.h'

ss.dependency "#{s.name}/Interface-Legacy", version

ss.dependency "#{s.name}/Privacy", version
s.ios.deployment_target = '10.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '12.0'
Expand Down Expand Up @@ -143,6 +149,7 @@

ss.dependency "#{s.name}/Interface-Legacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency "#{s.name}/Privacy", version
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version

Expand All @@ -159,6 +166,7 @@
'src/objective-c/GRPCClient/GRPCCall+Cronet.mm',
'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,mm}'
ss.dependency "#{s.name}/GRPCCore", version
ss.dependency "#{s.name}/Privacy", version
ss.dependency 'gRPC-Core/Cronet-Implementation', version
ss.dependency 'CronetFramework'

Expand Down
5 changes: 5 additions & 0 deletions templates/src/objective-c/BoringSSL-GRPC.podspec.template
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@
end
s.subspec 'Implementation' do |ss|
ss.header_mappings_dir = 'src'

ss.resource_bundles = {
s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy'
}

ss.source_files = 'src/ssl/*.{h,c,cc}',
'src/ssl/**/*.{h,c,cc}',
'src/crypto/*.{h,c,cc}',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test_id: 637599745
fixture_id: 262144
rng: 18446744073709551614
17 changes: 8 additions & 9 deletions test/core/util/proto_bit_gen.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <cstdint>
#include <limits>
#include <random>
#include <vector>

namespace grpc_core {
Expand All @@ -39,21 +40,19 @@ class ProtoBitGen : public std::numeric_limits<uint64_t> {
using result_type = uint64_t;

uint64_t operator()() {
if (results_.empty()) {
++current_;
return current_;
if (current_ < results_.size()) {
return results_[current_++];
}
// We loop through but increment by one each round, to guarantee to see all
// values eventually.
uint64_t out =
results_[current_ % results_.size()] + (current_ / results_.size());
++current_;
return out;
return generator_();
}

private:
std::vector<uint64_t> results_;
size_t current_ = 0;
std::mt19937_64 generator_ = [this]() {
std::seed_seq seq(results_.begin(), results_.end());
return std::mt19937_64(seq);
}();
};

} // namespace grpc_core
Expand Down
2 changes: 1 addition & 1 deletion tools/buildgen/generate_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ tools/buildgen/build_cleaner.py build_handwritten.yaml

# /usr/local/google/home/rbellevi/dev/tmp/grpc/venv/bin/python3: No module named virtualenv
# Generate xds-protos
[[ -d generate_projects_virtual_environment ]] || python3 -m virtualenv generate_projects_virtual_environment
[[ -d generate_projects_virtual_environment ]] || { python3 -m pip install virtualenv --upgrade && python3 -m virtualenv generate_projects_virtual_environment; }
generate_projects_virtual_environment/bin/pip install --upgrade --ignore-installed grpcio-tools==1.59.0
generate_projects_virtual_environment/bin/python tools/distrib/python/xds_protos/build.py

Expand Down

0 comments on commit b8f7899

Please sign in to comment.