osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

Upgrade FlatBuffers to 25.9.23 and use TypeScript workflow

Open afarber opened this issue 1 month ago • 2 comments

Fix #7235 by:

  • Upgrade FlatBuffers from 24.3.25 to 25.9.23
  • Switch from "flatc --js" to "flatc --ts" with transpilation to Javascript
  • Update the import paths in test files

Tasklist

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

afarber avatar Nov 15 '25 11:11 afarber

Hi @SiarheiFedartsou, hi @DennisOSRM please review my PR.

flatc does not support generating Javascript files anymore, so I transpile Typescript to Javascript.

afarber avatar Nov 16 '25 09:11 afarber

Hi @DennisOSRM and @SiarheiFedartsou please review my PR.

The PR modifies many files in the third_party/flatbuffers folder.

To verify, that I have not introduced any "trojan horses", you could run:

  git clone --depth 1 --branch v25.9.23 https://github.com/google/flatbuffers.git /tmp/flatbuffers-official

  for dir in include src CMakeLists.txt; do
    echo "=== Comparing $dir ==="
    diff -r "third_party/flatbuffers/$dir" "/tmp/flatbuffers-official/$dir" \
      --exclude='*.o' --exclude='*.so' --exclude='CMakeFiles' \
      --exclude='*.cmake' --exclude='Makefile' 2>/dev/null || echo "No differences"
  done

afarber avatar Nov 29 '25 09:11 afarber