Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpimath] Remove PathWeaver support #7813

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

Gold856
Copy link
Contributor

@Gold856 Gold856 commented Feb 21, 2025

Closes #7812.

@Gold856 Gold856 requested a review from a team as a code owner February 21, 2025 04:47
@github-actions github-actions bot added component: wpimath Math library component: glass Glass app and backend 2027 2027 target labels Feb 21, 2025
@rzblue rzblue linked an issue Feb 21, 2025 that may be closed by this pull request
@calcmogul
Copy link
Member

Looks like there's more to remove.

[tav@myriad allwpilib]$ rg TrajectoryUtil
wpimath/CMakeLists.txt
17:    src/main/native/cpp/jni/TrajectoryUtilJNI.cpp

wpimath/src/test/native/cpp/trajectory/TrajectoryJsonTest.cpp
8:#include "frc/trajectory/TrajectoryUtil.h"
18:  EXPECT_NO_THROW(deserialized = TrajectoryUtil::DeserializeTrajectory(
19:                      TrajectoryUtil::SerializeTrajectory(trajectory)));

wpimath/src/test/java/edu/wpi/first/math/jni/TrajectoryUtilJNITest.java
11:public class TrajectoryUtilJNITest {
14:    assertDoesNotThrow(TrajectoryUtilJNI::forceLoad);

wpimath/src/test/java/edu/wpi/first/math/trajectory/TrajectoryJsonTest.java
25:                TrajectoryUtil.deserializeTrajectory(
26:                    TrajectoryUtil.serializeTrajectory(trajectory)));

wpimath/src/main/java/edu/wpi/first/math/jni/TrajectoryUtilJNI.java
9:/** TrajectoryUtil JNI. */
10:public final class TrajectoryUtilJNI extends WPIMathJNI {
46:  private TrajectoryUtilJNI() {}

wpimath/src/main/native/include/frc/trajectory/TrajectoryUtil.h
18:class WPILIB_DLLEXPORT TrajectoryUtil {
20:  TrajectoryUtil() = delete;

wpimath/src/main/native/cpp/jni/TrajectoryUtilJNI.cpp
13:#include "edu_wpi_first_math_jni_TrajectoryUtilJNI.h"
14:#include "frc/trajectory/TrajectoryUtil.h"
61: * Class:     edu_wpi_first_math_jni_TrajectoryUtilJNI
66:Java_edu_wpi_first_math_jni_TrajectoryUtilJNI_fromPathweaverJson
71:        frc::TrajectoryUtil::FromPathweaverJson(JStringRef{env, path}.c_str());
81: * Class:     edu_wpi_first_math_jni_TrajectoryUtilJNI
86:Java_edu_wpi_first_math_jni_TrajectoryUtilJNI_toPathweaverJson
92:    frc::TrajectoryUtil::ToPathweaverJson(trajectory,
100: * Class:     edu_wpi_first_math_jni_TrajectoryUtilJNI
105:Java_edu_wpi_first_math_jni_TrajectoryUtilJNI_deserializeTrajectory
109:    auto trajectory = frc::TrajectoryUtil::DeserializeTrajectory(
120: * Class:     edu_wpi_first_math_jni_TrajectoryUtilJNI
125:Java_edu_wpi_first_math_jni_TrajectoryUtilJNI_serializeTrajectory
132:                       frc::TrajectoryUtil::SerializeTrajectory(trajectory));

wpimath/src/main/native/cpp/jni/Exceptions.cpp
23:     "TrajectoryUtil$TrajectorySerializationException",

wpimath/src/main/java/edu/wpi/first/math/trajectory/TrajectoryUtil.java
11:import edu.wpi.first.math.jni.TrajectoryUtilJNI;
18:public final class TrajectoryUtil {
19:  private TrajectoryUtil() {
85:    return createTrajectoryFromElements(TrajectoryUtilJNI.fromPathweaverJson(path.toString()));
96:    TrajectoryUtilJNI.toPathweaverJson(getElementsFromTrajectory(trajectory), path.toString());
107:    return createTrajectoryFromElements(TrajectoryUtilJNI.deserializeTrajectory(json));
118:    return TrajectoryUtilJNI.serializeTrajectory(getElementsFromTrajectory(trajectory));

wpimath/src/main/native/cpp/trajectory/TrajectoryUtil.cpp
5:#include "frc/trajectory/TrajectoryUtil.h"
17:void TrajectoryUtil::ToPathweaverJson(const Trajectory& trajectory,
31:Trajectory TrajectoryUtil::FromPathweaverJson(std::string_view path) {
46:std::string TrajectoryUtil::SerializeTrajectory(const Trajectory& trajectory) {
51:Trajectory TrajectoryUtil::DeserializeTrajectory(std::string_view jsonStr) {

@Gold856 Gold856 force-pushed the remove-pathweaver-json branch from b62a3c3 to 9a95ec6 Compare February 21, 2025 05:09
@PeterJohnson PeterJohnson changed the title Remove PathWeaver support [wpimath] Remove PathWeaver support Feb 21, 2025
@PeterJohnson PeterJohnson merged commit b39744b into wpilibsuite:2027 Feb 21, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2027 2027 target component: glass Glass app and backend component: wpimath Math library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[wpimath] Delete TrajectoryUtil JNI functions
3 participants