opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
758 stars 308 forks source link

Require SWIG version 4.1.1 exactly #3756

Closed nickbianco closed 2 months ago

nickbianco commented 3 months ago

Brief summary of changes

Installing a SWIG version greater than 4.1.1 causes the bindings to fail due to deprecated features that we do not yet have an alternative solution for. This change will lock us into 4.1.1 for now until we implement fixes for versions >4.1.1.

Testing I've completed

Looking for feedback on...

CHANGELOG.md (choose one)


This change is Reviewable

nickbianco commented 3 months ago

Thanks @aymanhab! Opened #3758 to track the issue.

nickbianco commented 3 months ago

@aymanhab, where would we document the required SWIG version? I don't think we've documented this previously.

aymanhab commented 2 months ago

The build scripts here https://github.com/opensim-org/opensim-core/tree/main/scripts/build have hardcoded version for swig but @AlbertoCasasOrtiz may know of other places where the swig version is spelled out

aymanhab commented 2 months ago

Once @AlbertoCasasOrtiz responds we can delete the branch, I merged this already. Thanks @nickbianco

AlbertoCasasOrtiz commented 2 months ago

@aymanhab @nickbianco I've searched for apparitions of "SWIG 4.1.1" in the code. I am only copying here one line per file, but it can appear multiple times in each file:

Bindings\CMakeLists.txt:2:    find_package(SWIG 4.1.1 EXACT REQUIRED)

scripts\build\opensim-core-linux-build-script.sh:170:# Download and install SWIG 4.1.1.

scripts\build\opensim-core-linux-build-script.sh:171:echo "LOG: INSTALLING SWIG 4.1.1..."

scripts\build\opensim-core-macos-build-script.sh:86:# Download and install SWIG 4.1.1.

scripts\build\opensim-core-macos-build-script.sh:87:echo "LOG: INSTALLING SWIG 4.1.1..."

Looking for only "SWIG" I found it is also present in the github workflow files:

.github\workflows\continuous_integration.yml:44:        choco install swig --version 4.1.1 --yes --limit-output

Bindings\SWIGSimTK\common.h:245://     // TODO Remove when moving to SWIG 3.

scripts\docker\ubuntu18.04\Dockerfile:62:# Download and install SWIG 4.0.2.

.github\Dockerfile:26:        swig3.0

Bindings\Python\tests\test_sockets_inputs_outputs.py:24:# TODO ClonePtr<Output> in swig doc3.0: 25.3.15.2

Bindings\Python\swig\python_preliminaries.i:8:/** The following line produces legacy documentation in python wrapper,
replaced with -doxygen in swig 4.0+ */