Migrate utf8_range dependency to a git subtree (#11608)

This will make the CMake workflow easier, where users won't need to either install utf8_range or initialize our submodules.  Since this is a relatively small library that's owned by us, we can just bundle it with protobuf as a subtree

Closes #11608

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11608 from mkruskal-google:utf8_range_dep 57d5d91b68
PiperOrigin-RevId: 503314822
pull/11608/head^2
Mike Kruskal 2 years ago committed by Copybara-Service
parent 79bac90f86
commit 9978ec386c
  1. 2
      .github/workflows/codespell.yml
  2. 3
      .gitmodules
  3. 6
      cmake/utf8_range.cmake
  4. 1
      third_party/utf8_range
  5. 8
      update_subtrees.sh

@ -14,5 +14,5 @@ jobs:
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true
skip: ./.git,./conformance/third_party,*.snk,*.pb,*.pb.cc,*.pb.h,./src/google/protobuf/testdata,./objectivec/Tests,./python/compatibility_tests/v2.5.0/tests/google/protobuf/internal,./.github/workflows/codespell.yml
skip: ./.git,./third_party,./conformance/third_party,*.snk,*.pb,*.pb.cc,*.pb.h,./src/google/protobuf/testdata,./objectivec/Tests,./python/compatibility_tests/v2.5.0/tests/google/protobuf/internal,./.github/workflows/codespell.yml
ignore_words_list: "alow,alse,ba,chec,cleare,copyable,cloneable,dedup,dur,errorprone,falsy,files',fo,fundementals,hel,importd,inout,leapyear,nd,nin,ois,ons,parseable,process',ro,te,testof,ue,unparseable,wasn,wee,gae,keyserver,objext,od,optin,streem,sur,falsy"

3
.gitmodules vendored

@ -9,6 +9,3 @@
[submodule "third_party/jsoncpp"]
path = third_party/jsoncpp
url = https://github.com/open-source-parsers/jsoncpp.git
[submodule "third_party/utf8_range"]
path = third_party/utf8_range
url = https://github.com/protocolbuffers/utf8_range.git

@ -2,10 +2,8 @@ set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Disable utf8_range tests")
if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/utf8_range/CMakeLists.txt")
message(FATAL_ERROR
"Cannot find third_party/utf8_range directory that's needed to "
"build conformance tests. If you use git, make sure you have cloned "
"submodules:\n"
" git submodule update --init --recursive\n")
"Cannot find third_party/utf8_range directory that's needed for "
"the protobuf runtime.\n")
endif()
set(utf8_range_ENABLE_INSTALL ${protobuf_INSTALL} CACHE BOOL "Set install")

@ -1 +0,0 @@
Subproject commit de0b4a8ff9b5d4c98108bdfe723291a33c52c54f

@ -0,0 +1,8 @@
#! /bin/bash -eux
set -eux
cd $(dirname $0)
git subtree pull --prefix third_party/utf8_range \
https://github.com/protocolbuffers/utf8_range.git main --squash
Loading…
Cancel
Save