Skip to content

Commit

Permalink
Remove legacy C API [AP-1684] (#1404)
Browse files Browse the repository at this point in the history
# Removal Warning

This PR will be merged on **8/4/2024**. On this date the legacy C API
will become unavailable, it will not be reintroduced. On or shortly
after this date libsbp version v6.0.0 will be tagged and released

# Description

@swift-nav/devinfra



Remove legacy C API including all generated code, examples, templates,
and sbpg module.

Remove all references to "v4" API which were lying around in a handful
of places. There is no such thing as the V4 API any more, there is just
the libsbp API

# API compatibility

Yes

Legacy C API completely removed including:
- Any message types in the form `struct msg_xxx_t`
- Functions relating to sending or processing encoded payloads or frames
- payload and frame callback types
- `#define`s message types - in the form `SBP_MSG_XXX`
- C++ `LegacyState` wrapper
- All files under the `libsbp/legacy` directory
- V4 compatibility headers for modern API in `libsbp/v4/<package.h>`


## API compatibility plan

The modern API was introduce to this repository in Sep 2021. The legacy
API was retained but all symbols were marked as deprecated and compile
time messages were output by GCC and Clang whenever a legacy header was
used

In Dec 2023 the legacy was moved to a more difficult to access place. It
was no longer accessible simply by include `libsbp/sbp.h` All headers
were retained but even more compile time messages were added indicating
that these files would be deleted in the next major version

This PR is the final stage of the deprecation plan. Any users of this
repository should have already converted their code to use the moden
API.

# JIRA Reference

https://swift-nav.atlassian.net/browse/AP-1684
  • Loading branch information
woodfell authored Apr 29, 2024
1 parent faba77a commit 42b1e19
Show file tree
Hide file tree
Showing 1,222 changed files with 32,259 additions and 307,235 deletions.
43 changes: 0 additions & 43 deletions c/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,6 @@ filegroup(
visibility = ["//visibility:public"],
)

SBP_LEGACY_C_SOURCES = glob(["test/legacy/auto*.c"])

swift_cc_test(
name = "sbp-legacy-test",
srcs = [
"test/check_main_legacy.c",
"test/check_edc.c",
"test/check_sbp.c",
"test/check_bitfield_macros.c",
"test/check_suites_legacy.h",
] + SBP_LEGACY_C_SOURCES,
includes = [
"include/libsbp",
],
copts = [
"-Wno-deprecated-declarations",
],
type = UNIT,
deps = [
":sbp",
"@check",
],
)

SBP_C_SOURCES = glob(["test/auto*.c"])

swift_cc_test(
Expand Down Expand Up @@ -140,22 +116,3 @@ swift_cc_test(
],
)

SBP_CPP_LEGACY_SOURCES = glob(["test/legacy/cpp/auto*.cc"])

swift_cc_test(
name = "sbp-cpp-legacy-test",
srcs = [
"test/legacy/cpp/test_sbp_stdio.cc",
] + SBP_CPP_LEGACY_SOURCES,
data = [
"test/legacy/cpp/sbp_data/gnss_data.sbp",
],
copts = [
"-Wno-deprecated-declarations",
],
type = UNIT,
deps = [
":sbp",
"@googletest//:gtest_main",
],
)
1 change: 0 additions & 1 deletion c/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ option(BUILD_EXAMPLES "" OFF)

if(BUILD_EXAMPLES)
add_custom_target(examples)
add_subdirectory(legacy)
add_subdirectory(libsbp)
endif()
4 changes: 0 additions & 4 deletions c/examples/legacy/CMakeLists.txt

This file was deleted.

15 changes: 0 additions & 15 deletions c/examples/legacy/cpp_example/CMakeLists.txt

This file was deleted.

49 changes: 0 additions & 49 deletions c/examples/legacy/cpp_example/README.md

This file was deleted.

118 changes: 0 additions & 118 deletions c/examples/legacy/cpp_example/cpp_example.cc

This file was deleted.

18 changes: 0 additions & 18 deletions c/examples/legacy/example/CMakeLists.txt

This file was deleted.

53 changes: 0 additions & 53 deletions c/examples/legacy/example/README.md

This file was deleted.

Loading

0 comments on commit 42b1e19

Please sign in to comment.