Call the generated JMEOS surface from the AIS and SNCB mains - #45
Merged
estebanzimanyi merged 1 commit intoJul 22, 2026
Merged
Conversation
JMEOS carries two FFI facades: functions.GeneratedFunctions, emitted from the MEOS-API catalog at build time, and the hand-maintained functions.functions. These two mains are the only callers of the hand one left in the ecosystem, and holding it alive costs the surface its single generated source: a MEOS rename reaches a hand-maintained declaration as an UnsatisfiedLinkError at call time. Bind GeneratedFunctions instead. Every signature involved is identical between the two facades, including tsequence_make, whose first parameter is a Pointer in both, so the call sites change only in the class they name. The SNCB main imported the facade without calling it; that import goes too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Binds
functions.GeneratedFunctionsin the two mains that call JMEOS's hand-maintained facade.JMEOS carries two FFI facades:
GeneratedFunctions, emitted from the MEOS-API catalog at build time, andfunctions.functions, maintained by hand. A GitHub code search across MobilitySpark, MobilityFlink and MobilityKafka finds the hand facade only inaisdata/Query8_V2_Main.javaandsncbdata/Query8_V2_Main.java; the generators of all three consumers readfunctions.GeneratedFunctionsalone (codegen_jvm.pyline 59,codegen_spark_udfs.pyline 1000).Those two call sites are what keeps the JVM surface from having a single generated source. A hand-maintained declaration binds its C symbol by name and jnr-ffi resolves it on first call, so a MEOS rename surfaces as
UnsatisfiedLinkError: unknownat run time — the failure mode behind the sixteen JMEOS declarations that named symbols absent from libmeos.Every signature involved is identical between the two facades,
tsequence_make(Pointer instants, int count, boolean, boolean, int, boolean)included, and the caller passes aPointerfromMemory.allocate, so the twelve call sites change only in the class they name. The SNCB main imports the facade without calling it, and that import goes with them.grep -rn "functions\.functions" --include=*.javaover the repository then returns nothing.Against MobilityDB master
da39ebf91— libmeos and the catalog derived from that commit, the JMEOS jar built from JMEOSmainagainst it and installed asorg.jmeos:meos:1.0—mvn -Dmeos.lib.dir=… -Dmeos.enabled=true clean testis 12 tests, 0 failures, 0 errors.