Move third_party/json to flutter/third_party/json. (flutter/engine#48844)

As part of eliminating the Flutter buildroot
(https://github.com/flutter/flutter/issues/67373), we are moving all
third-party dependencies from `//third_party` to
`//flutter/third_party`.
This commit is contained in:
Matan Lurey
2023-12-14 20:54:37 -08:00
committed by GitHub
parent 3aae0411b7
commit 23f7b463ef
9 changed files with 186 additions and 99 deletions

2
DEPS
View File

@@ -705,7 +705,7 @@ deps = {
'src/flutter/third_party/tinygltf':
Var('flutter_git') + '/third_party/tinygltf.git' + '@' + '9bb5806df4055ac973b970ba5b3e27ce27d98148',
'src/third_party/json':
'src/flutter/third_party/json':
Var('flutter_git') + '/third_party/json.git' + '@' + '17d9eacd248f58b73f4d1be518ef649fe2295642',
'src/flutter/third_party/stb':

View File

@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_root = "//third_party/json"
source_root = "//flutter/third_party/json"
config("json_public_config") {
include_dirs = [ "$source_root/include" ]

View File

@@ -20,5 +20,5 @@ source_set("tinygltf") {
"//flutter/build/secondary/flutter/third_party/tinygltf/tinygltf_stub.cc",
]
deps = [ "//third_party/json" ]
deps = [ "//flutter/third_party/json" ]
}

View File

@@ -39,5 +39,5 @@ source_set("inja") {
"$source_root/include/inja/utils.hpp",
]
public_deps = [ "//third_party/json" ]
public_deps = [ "//flutter/third_party/json" ]
}

View File

@@ -21,7 +21,7 @@ unset CDPATH
function follow_links() (
cd -P "$(dirname -- "$1")"
file="$PWD/$(basename -- "$1")"
while [[ -h "$file" ]]; do
while [[ -L "$file" ]]; do
cd -P "$(dirname -- "$file")"
file="$(readlink -- "$file")"
cd -P "$(dirname -- "$file")"
@@ -31,7 +31,10 @@ function follow_links() (
)
SCRIPT_DIR=$(follow_links "$(dirname -- "${BASH_SOURCE[0]}")")
SRC_DIR="$(cd "$SCRIPT_DIR/../.."; pwd -P)"
SRC_DIR="$(
cd "$SCRIPT_DIR/../.."
pwd -P
)"
DART_BIN="$SRC_DIR/third_party/dart/tools/sdks/dart-sdk/bin"
PATH="$DART_BIN:$PATH"
@@ -50,7 +53,10 @@ fi
echo "Verifying license script is still happy..."
echo "Using dart from: $(command -v dart)"
untracked_files="$(cd "$SRC_DIR/flutter"; git status --ignored --short | grep -E "^!" | awk "{print\$2}")"
untracked_files="$(
cd "$SRC_DIR/flutter"
git status --ignored --short | grep -E "^!" | awk "{print\$2}"
)"
untracked_count="$(echo "$untracked_files" | wc -l)"
if [[ $untracked_count -gt 0 ]]; then
echo ""
@@ -80,9 +86,9 @@ function collect_licenses() (
# interpreter is faster than using unoptimized machine code, which has
# no chance of being optimized(due to its size).
dart --enable-asserts --interpret_irregexp lib/main.dart \
--src ../../.. \
--out ../../../out/license_script_output \
--golden ../../ci/licenses_golden \
--src ../../.. \
--out ../../../out/license_script_output \
--golden ../../ci/licenses_golden \
"${QUIET}"
)
@@ -98,80 +104,80 @@ function verify_licenses() (
collect_licenses
for f in out/license_script_output/licenses_*; do
if ! cmp -s "flutter/ci/licenses_golden/$(basename "$f")" "$f"; then
echo "============================= ERROR ============================="
echo "License script got different results than expected for $f."
echo "Please rerun the licenses script locally to verify that it is"
echo "correctly catching any new licenses for anything you may have"
echo "changed, and then update this file:"
echo " flutter/sky/packages/sky_engine/LICENSE"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/main/tools/licenses"
echo ""
diff -U 6 "flutter/ci/licenses_golden/$(basename "$f")" "$f"
echo "================================================================="
echo ""
exitStatus=1
fi
if ! cmp -s "flutter/ci/licenses_golden/$(basename "$f")" "$f"; then
echo "============================= ERROR ============================="
echo "License script got different results than expected for $f."
echo "Please rerun the licenses script locally to verify that it is"
echo "correctly catching any new licenses for anything you may have"
echo "changed, and then update this file:"
echo " flutter/sky/packages/sky_engine/LICENSE"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/main/tools/licenses"
echo ""
diff -U 6 "flutter/ci/licenses_golden/$(basename "$f")" "$f"
echo "================================================================="
echo ""
exitStatus=1
fi
done
echo "Verifying license tool signature..."
if ! cmp -s "flutter/ci/licenses_golden/tool_signature" "out/license_script_output/tool_signature"; then
echo "============================= ERROR ============================="
echo "The license tool signature has changed. This is expected when"
echo "there have been changes to the license tool itself. Licenses have"
echo "been re-computed for all components. If only the license script has"
echo "changed, no diffs are typically expected in the output of the"
echo "script. Verify the output, and if it looks correct, update the"
echo "license tool signature golden file:"
echo " ci/licenses_golden/tool_signature"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/main/tools/licenses"
echo ""
diff -U 6 "flutter/ci/licenses_golden/tool_signature" "out/license_script_output/tool_signature"
echo "================================================================="
echo ""
exitStatus=1
echo "============================= ERROR ============================="
echo "The license tool signature has changed. This is expected when"
echo "there have been changes to the license tool itself. Licenses have"
echo "been re-computed for all components. If only the license script has"
echo "changed, no diffs are typically expected in the output of the"
echo "script. Verify the output, and if it looks correct, update the"
echo "license tool signature golden file:"
echo " ci/licenses_golden/tool_signature"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/main/tools/licenses"
echo ""
diff -U 6 "flutter/ci/licenses_golden/tool_signature" "out/license_script_output/tool_signature"
echo "================================================================="
echo ""
exitStatus=1
fi
echo "Verifying excluded files list..."
if ! cmp -s "flutter/ci/licenses_golden/excluded_files" "out/license_script_output/excluded_files"; then
echo "============================= ERROR ============================="
echo "The license is excluding a different number of files than previously."
echo "This is only expected when new non-source files have been introduced."
echo "Verify that all the newly ignored files are definitely not shipped with"
echo "any binaries that we compile (including impellerc and Wasm)."
echo "If the changes look correct, update this file:"
echo " ci/licenses_golden/excluded_files"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/main/tools/licenses"
echo ""
diff -U 6 "flutter/ci/licenses_golden/excluded_files" "out/license_script_output/excluded_files"
echo "================================================================="
echo ""
exitStatus=1
echo "============================= ERROR ============================="
echo "The license is excluding a different number of files than previously."
echo "This is only expected when new non-source files have been introduced."
echo "Verify that all the newly ignored files are definitely not shipped with"
echo "any binaries that we compile (including impellerc and Wasm)."
echo "If the changes look correct, update this file:"
echo " ci/licenses_golden/excluded_files"
echo "For more information, see the script in:"
echo " https://github.com/flutter/engine/tree/main/tools/licenses"
echo ""
diff -U 6 "flutter/ci/licenses_golden/excluded_files" "out/license_script_output/excluded_files"
echo "================================================================="
echo ""
exitStatus=1
fi
echo "Checking license count in licenses_flutter..."
local actualLicenseCount
actualLicenseCount="$(tail -n 1 flutter/ci/licenses_golden/licenses_flutter | tr -dc '0-9')"
local expectedLicenseCount=112 # When changing this number: Update the error message below as well describing the newly expected license types.
local expectedLicenseCount=113 # When changing this number: Update the error message below as well describing the newly expected license types.
if [[ $actualLicenseCount -ne $expectedLicenseCount ]]; then
echo "=============================== ERROR ==============================="
echo "The total license count in flutter/ci/licenses_golden/licenses_flutter"
echo "changed from $expectedLicenseCount to $actualLicenseCount."
echo "It's very likely that this is an unintentional change. Please"
echo "double-check that all newly added files have a BSD-style license"
echo "header with the following copyright:"
echo " Copyright 2013 The Flutter Authors. All rights reserved."
echo "Files in 'third_party/txt' may have an Apache license header instead."
echo "If you're absolutely sure that the change in license count is"
echo "intentional, update 'flutter/ci/licenses.sh' with the new count."
echo "================================================================="
echo ""
exitStatus=1
echo "=============================== ERROR ==============================="
echo "The total license count in flutter/ci/licenses_golden/licenses_flutter"
echo "changed from $expectedLicenseCount to $actualLicenseCount."
echo "It's very likely that this is an unintentional change. Please"
echo "double-check that all newly added files have a BSD-style license"
echo "header with the following copyright:"
echo " Copyright 2013 The Flutter Authors. All rights reserved."
echo "Files in 'third_party/txt' may have an Apache license header instead."
echo "If you're absolutely sure that the change in license count is"
echo "intentional, update 'flutter/ci/licenses.sh' with the new count."
echo "================================================================="
echo ""
exitStatus=1
fi
if [[ $exitStatus -eq 0 ]]; then

View File

@@ -601,6 +601,34 @@
../../../flutter/third_party/inja/test
../../../flutter/third_party/inja/third_party/amalgamate
../../../flutter/third_party/inja/third_party/include/doctest
../../../flutter/third_party/json/.clang-format
../../../flutter/third_party/json/.clang-tidy
../../../flutter/third_party/json/.git
../../../flutter/third_party/json/.github
../../../flutter/third_party/json/.gitignore
../../../flutter/third_party/json/.lgtm.yml
../../../flutter/third_party/json/.reuse
../../../flutter/third_party/json/BUILD.bazel
../../../flutter/third_party/json/CITATION.cff
../../../flutter/third_party/json/CMakeLists.txt
../../../flutter/third_party/json/ChangeLog.md
../../../flutter/third_party/json/Makefile
../../../flutter/third_party/json/README.md
../../../flutter/third_party/json/WORKSPACE.bazel
../../../flutter/third_party/json/cmake
../../../flutter/third_party/json/docs
../../../flutter/third_party/json/meson.build
../../../flutter/third_party/json/tests
../../../flutter/third_party/json/tools/amalgamate/CHANGES.md
../../../flutter/third_party/json/tools/amalgamate/README.md
../../../flutter/third_party/json/tools/amalgamate/amalgamate.py
../../../flutter/third_party/json/tools/gdb_pretty_printer/README.md
../../../flutter/third_party/json/tools/gdb_pretty_printer/nlohmann-json.py
../../../flutter/third_party/json/tools/generate_natvis/README.md
../../../flutter/third_party/json/tools/generate_natvis/generate_natvis.py
../../../flutter/third_party/json/tools/serve_header/README.md
../../../flutter/third_party/json/tools/serve_header/requirements.txt
../../../flutter/third_party/json/tools/serve_header/serve_header.py
../../../flutter/third_party/libjpeg-turbo/src/.git
../../../flutter/third_party/libjpeg-turbo/src/.gitignore
../../../flutter/third_party/libjpeg-turbo/src/BUILDING.md
@@ -2792,34 +2820,6 @@
../../../third_party/icu/source/tools/tzcode/Makefile.in
../../../third_party/icu/source/tools/tzcode/readme.txt
../../../third_party/java
../../../third_party/json/.clang-format
../../../third_party/json/.clang-tidy
../../../third_party/json/.git
../../../third_party/json/.github
../../../third_party/json/.gitignore
../../../third_party/json/.lgtm.yml
../../../third_party/json/.reuse
../../../third_party/json/BUILD.bazel
../../../third_party/json/CITATION.cff
../../../third_party/json/CMakeLists.txt
../../../third_party/json/ChangeLog.md
../../../third_party/json/Makefile
../../../third_party/json/README.md
../../../third_party/json/WORKSPACE.bazel
../../../third_party/json/cmake
../../../third_party/json/docs
../../../third_party/json/meson.build
../../../third_party/json/tests
../../../third_party/json/tools/amalgamate/CHANGES.md
../../../third_party/json/tools/amalgamate/README.md
../../../third_party/json/tools/amalgamate/amalgamate.py
../../../third_party/json/tools/gdb_pretty_printer/README.md
../../../third_party/json/tools/gdb_pretty_printer/nlohmann-json.py
../../../third_party/json/tools/generate_natvis/README.md
../../../third_party/json/tools/generate_natvis/generate_natvis.py
../../../third_party/json/tools/serve_header/README.md
../../../third_party/json/tools/serve_header/requirements.txt
../../../third_party/json/tools/serve_header/serve_header.py
../../../third_party/libcxx/.clang-format
../../../third_party/libcxx/.clang-tidy
../../../third_party/libcxx/.git

View File

@@ -3656,6 +3656,87 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
====================================================================================================
====================================================================================================
LIBRARY: json
ORIGIN: ../../../flutter/third_party/json/LICENSE.MIT
TYPE: LicenseType.mit
FILE: ../../../flutter/third_party/json/include/nlohmann/adl_serializer.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/byte_container_with_subtype.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/abi_macros.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/conversions/from_json.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/conversions/to_chars.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/conversions/to_json.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/exceptions.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/hash.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/input/binary_reader.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/input/input_adapters.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/input/json_sax.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/input/lexer.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/input/parser.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/input/position_t.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/iterators/internal_iterator.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/iterators/iter_impl.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/iterators/iteration_proxy.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/iterators/iterator_traits.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/iterators/json_reverse_iterator.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/iterators/primitive_iterator.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/json_custom_base_class.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/json_pointer.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/json_ref.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/macro_scope.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/macro_unscope.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/call_std/begin.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/call_std/end.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/cpp_future.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/detected.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/identity_tag.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/is_sax.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/std_fs.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/type_traits.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/meta/void_t.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/output/binary_writer.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/output/output_adapters.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/output/serializer.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/string_concat.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/string_escape.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/detail/value_t.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/json.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/json_fwd.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/ordered_map.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/thirdparty/hedley/hedley.hpp
FILE: ../../../flutter/third_party/json/include/nlohmann/thirdparty/hedley/hedley_undef.hpp
FILE: ../../../flutter/third_party/json/nlohmann_json.natvis
FILE: ../../../flutter/third_party/json/single_include/nlohmann/json.hpp
FILE: ../../../flutter/third_party/json/single_include/nlohmann/json_fwd.hpp
FILE: ../../../flutter/third_party/json/tools/amalgamate/config_json.json
FILE: ../../../flutter/third_party/json/tools/amalgamate/config_json_fwd.json
FILE: ../../../flutter/third_party/json/tools/generate_natvis/nlohmann_json.natvis.j2
FILE: ../../../flutter/third_party/json/tools/macro_builder/main.cpp
FILE: ../../../flutter/third_party/json/tools/serve_header/demo.png
FILE: ../../../flutter/third_party/json/tools/serve_header/serve_header.yml.example
FILE: ../../../flutter/third_party/json/wsjcpp.yml
----------------------------------------------------------------------------------------------------
Copyright (c) 2013-2022 Niels Lohmann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
====================================================================================================
====================================================================================================
LIBRARY: glfw
ORIGIN: ../../../flutter/third_party/glfw/src/linux_joystick.h
@@ -11778,4 +11859,4 @@ TO DO
Please send bug reports, offers of help, etc. to jpeg-info@jpegclub.org.
====================================================================================================
Total license count: 112
Total license count: 113

View File

@@ -1,2 +1,2 @@
Signature: 11fcac7657e1af099350216fe4aefee8
Signature: 0dc8f486152017d9652b1d1f6b4cdf00

View File

@@ -48,6 +48,7 @@ final Set<String> skippedPaths = <String>{
r'flutter/third_party/inja/doc', // documentation
r'flutter/third_party/inja/third_party/amalgamate', // only used at build time
r'flutter/third_party/inja/third_party/include/doctest', // seems to be a unit test library
r'flutter/third_party/json/docs',
r'flutter/third_party/libtess2/Contrib/nanosvg.c', // only used by the ../Example
r'flutter/third_party/libtess2/Contrib/nanosvg.h', // only used by the ../Example
r'flutter/third_party/libtess2/Example',
@@ -161,7 +162,6 @@ final Set<String> skippedPaths = <String>{
r'third_party/icu/source/data/brkitr/dictionaries/laodict.txt', // explicitly handled by ICU license
r'third_party/icu/source/data/dtd',
r'third_party/java', // only used for Android builds
r'third_party/json/docs',
r'third_party/libcxx/benchmarks',
r'third_party/libcxx/docs',
r'third_party/libcxx/src/support/solaris',