diff --git a/.clang-format b/.clang-format index 70e3630a1..30845ee59 100644 --- a/.clang-format +++ b/.clang-format @@ -93,7 +93,9 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Left RawStringFormats: - - Delimiter: pb + - Language: Cpp + Delimiters: + - pb Language: TextProto BasedOnStyle: google ReflowComments: true diff --git a/Dockerfile b/Dockerfile index c9146898a..bedd735b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ # This describes an image that should be able to generate libsbp bindings. # See the README.md for instructions on how to use it. -ARG UBUNTU_RELEASE=focal +ARG UBUNTU_RELEASE=jammy FROM ubuntu:${UBUNTU_RELEASE} @@ -23,8 +23,8 @@ ARG DEBIAN_FRONTEND=noninteractive ENV NODE_VERSION=v22.13.1 ENV JAVA_VERSION=11.0.11.hs-adpt ENV GRADLE_VERSION=7.1.1 -ENV CC=gcc-7 -ENV CXX=g++-7 +ENV CC=gcc-10 +ENV CXX=g++-10 ENV RUSTUP_HOME=/rust ENV CARGO_HOME=/cargo @@ -77,15 +77,15 @@ RUN \ doxygen \ graphviz \ imagemagick \ - enchant \ - clang-format-6.0 \ + enchant-2 \ + clang-format-11 \ python3 python3-dev python3-distutils \ python3.9 python3.9-dev python3.9-distutils \ python3.10 python3.10-dev python3.10-distutils \ python3.11 python3.11-dev python3.11-distutils \ dpkg-dev \ - cmake-data=3.16.3-1ubuntu1.20.04.1 \ - cmake=3.16.3-1ubuntu1.20.04.1 \ + cmake=3.22.1-1ubuntu1 \ + cmake-data=3.22.1-1ubuntu1 \ libjson-perl \ libdigest-crc-perl \ && curl -sSL https://get.haskellstack.org/ | sh \ @@ -131,9 +131,9 @@ RUN \ # install perl runtime for kaitai struct RUN \ cd /tmp \ - && curl -LO https://github.com/kaitai-io/kaitai_struct_perl_runtime/archive/refs/tags/0.10.zip \ - && unzip 0.10.zip \ - && cd kaitai_struct_perl_runtime-0.10 \ + && curl -LO https://github.com/kaitai-io/kaitai_struct_perl_runtime/archive/refs/tags/0.11.zip \ + && unzip 0.11.zip \ + && cd kaitai_struct_perl_runtime-0.11 \ && perl Makefile.PL \ && make install \ && rm -rf /tmp/* diff --git a/Makefile b/Makefile index 653367c00..1e71b3724 100644 --- a/Makefile +++ b/Makefile @@ -109,7 +109,7 @@ else endif verify-prereq-c: verify-prereq-generator - @command -v clang-format-6.0 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`clang-format-6.0\` but it's not installed. Aborting.\n\nHave you installed clang-format-6.0? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; } + @command -v clang-format-11 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`clang-format-11\` but it's not installed. Aborting.\n\nHave you installed clang-format-11? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; } @command -v checkmk 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`checkmk\` but it's not installed. Aborting.\n\nHave you installed checkmk? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; } @command -v cmake 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`cmake\` but it's not installed. Aborting.\n\nHave you installed cmake? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; } @command -v pkg-config 1>/dev/null 2>/dev/null || { echo >&2 -e "I require \`pkg-config\` but it's not installed. Aborting.\n\nHave you installed pkg-config? See the C readme at \`c/README.md\` for setup instructions.\n"; exit 1; } diff --git a/c/README.md b/c/README.md index 0a08a3571..3ec732667 100644 --- a/c/README.md +++ b/c/README.md @@ -8,18 +8,17 @@ with no dependencies other than the standard C libraries. ## Installation -On Debian-based systems (including Ubuntu 12.10 or later) you can get +On Debian-based systems (including Ubuntu 22.04 or later) you can get dependencies with: ```shell -sudo apt-get install build-essential pkg-config cmake doxygen check clang-format-6.0 +sudo apt-get install build-essential pkg-config cmake doxygen check clang-format-11 ``` On Mac: ```shell -brew tap swift-nav/swift-devs -brew install check cmake pkg-config doxygen clang-tools-6.0 +brew install check cmake pkg-config doxygen clang-format@11 ``` On other systems, you can obtain CMake from your operating system @@ -57,6 +56,6 @@ https://github.com/swift-nav/sbp_tutorial. ## LICENSE -Copyright © 2015-2021 Swift Navigation +Copyright © 2015-2025 Swift Navigation Distributed under MIT. diff --git a/c/scripts/clang-format.sh b/c/scripts/clang-format.sh index a0a4ddbd2..5aff78ada 100755 --- a/c/scripts/clang-format.sh +++ b/c/scripts/clang-format.sh @@ -3,13 +3,9 @@ set -e -x # This only reformats the generated headers and tests # as it is introduced as part of fixing the docs, -# and clang-format-6 would otherwise cause regressions +# and clang-format-11 would otherwise cause regressions # in the Google style of hand-written code. GENERATED_HEADERS=$(grep -rl --include="*.h" "Automatically generated" include/libsbp/* src/) GENERATED_C_SOURCES=$(grep -rl --include="*.c" "Automatically generated" src/) -CLANG_FORMAT=clang-format-6.0 +CLANG_FORMAT=clang-format-11 $CLANG_FORMAT -i $GENERATED_HEADERS $GENERATED_C_SOURCES test/*.c test/*.h test/auto* test/cpp/auto* - -# clang-format-6 adds whitespace to blank lines inside comments -sed -i.bak 's/^ *$//' $GENERATED_HEADERS -rm ${GENERATED_HEADERS//.h/.h.bak} diff --git a/package-lock.json b/package-lock.json index d725b8c01..6f638e554 100644 --- a/package-lock.json +++ b/package-lock.json @@ -552,6 +552,7 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -905,6 +906,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -3615,6 +3617,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -3829,6 +3832,7 @@ "integrity": "sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.6", @@ -3876,6 +3880,7 @@ "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^2.1.1",