diff --git a/DEPS b/DEPS index 9cfa9f0532..d8c58aea5e 100644 --- a/DEPS +++ b/DEPS @@ -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': diff --git a/engine/src/flutter/build/secondary/third_party/json/BUILD.gn b/engine/src/flutter/build/secondary/flutter/third_party/json/BUILD.gn similarity index 98% rename from engine/src/flutter/build/secondary/third_party/json/BUILD.gn rename to engine/src/flutter/build/secondary/flutter/third_party/json/BUILD.gn index bf24ebf119..cf3c9c1ca9 100644 --- a/engine/src/flutter/build/secondary/third_party/json/BUILD.gn +++ b/engine/src/flutter/build/secondary/flutter/third_party/json/BUILD.gn @@ -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" ] diff --git a/engine/src/flutter/build/secondary/flutter/third_party/tinygltf/BUILD.gn b/engine/src/flutter/build/secondary/flutter/third_party/tinygltf/BUILD.gn index 2f5a95690b..01dd40f247 100644 --- a/engine/src/flutter/build/secondary/flutter/third_party/tinygltf/BUILD.gn +++ b/engine/src/flutter/build/secondary/flutter/third_party/tinygltf/BUILD.gn @@ -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" ] } diff --git a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn b/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn index fd3eb1e550..2ed3e67ad3 100644 --- a/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn +++ b/engine/src/flutter/build/secondary/third_party/inja/BUILD.gn @@ -39,5 +39,5 @@ source_set("inja") { "$source_root/include/inja/utils.hpp", ] - public_deps = [ "//third_party/json" ] + public_deps = [ "//flutter/third_party/json" ] } diff --git a/engine/src/flutter/ci/licenses.sh b/engine/src/flutter/ci/licenses.sh index e6e80fb8ef..7325b830ca 100755 --- a/engine/src/flutter/ci/licenses.sh +++ b/engine/src/flutter/ci/licenses.sh @@ -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 diff --git a/engine/src/flutter/ci/licenses_golden/excluded_files b/engine/src/flutter/ci/licenses_golden/excluded_files index ff79f8867e..af3c9fbaea 100644 --- a/engine/src/flutter/ci/licenses_golden/excluded_files +++ b/engine/src/flutter/ci/licenses_golden/excluded_files @@ -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 diff --git a/engine/src/flutter/ci/licenses_golden/licenses_flutter b/engine/src/flutter/ci/licenses_golden/licenses_flutter index e0e3a8ea4c..0c24e1839e 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_flutter +++ b/engine/src/flutter/ci/licenses_golden/licenses_flutter @@ -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 diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index 569c9c825d..cc333c453c 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 11fcac7657e1af099350216fe4aefee8 +Signature: 0dc8f486152017d9652b1d1f6b4cdf00 diff --git a/engine/src/flutter/tools/licenses/lib/paths.dart b/engine/src/flutter/tools/licenses/lib/paths.dart index a4205dc1c0..4c5ac072df 100644 --- a/engine/src/flutter/tools/licenses/lib/paths.dart +++ b/engine/src/flutter/tools/licenses/lib/paths.dart @@ -48,6 +48,7 @@ final Set skippedPaths = { 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 skippedPaths = { 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',