-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit 3808f19
Investigate FMI extension dependency specialization (Issue #3905)
This commit documents an investigation into replacing FMI.jl with
FMIImport.jl as the dependency for the MTK FMI extension.
## Investigation Summary
Issue #3905 suggested that the FMI extension could be specialized to
depend on FMIImport.jl instead of the broader FMI.jl package, since
the extension "only needs import functionality".
## Findings
The proposed change is **not feasible** due to significant API
incompatibilities between FMI.jl and FMIImport.jl:
### API Differences
1. **Generic vs Version-Specific Functions**:
- FMI.jl provides generic functions like `getValueReferencesAndNames()`
- FMIImport.jl only provides version-specific functions like
`fmi2GetValueReferencesAndNames()` and `fmi3GetValueReferencesAndNames()`
2. **Missing High-Level Wrappers**:
- The MTK extension relies on several high-level convenience functions
that exist in FMI.jl but not in FMIImport.jl
- FMIImport.jl is a lower-level package focused on core import functionality
### Attempted Implementation
An attempt was made to replace FMI.jl with FMIImport.jl by:
- Updating Project.toml dependencies
- Using `import FMIImport as FMI` for API compatibility
- Updating test dependencies
This approach failed because:
- The generic `getValueReferencesAndNames` function doesn't exist in FMIImport
- The extension tries to define missing methods, causing compilation errors
- Many other high-level functions would also need to be reimplemented
## Conclusion
FMI.jl and FMIImport.jl serve different purposes in the FMI ecosystem:
- **FMI.jl**: High-level interface with convenient wrapper functions
- **FMIImport.jl**: Lower-level core import functionality
The MTK extension requires the high-level interface provided by FMI.jl.
Changing to FMIImport.jl would require substantial refactoring of the
extension to use only low-level APIs, which is beyond the scope of the
original issue.
**Recommendation**: Keep the current FMI.jl dependency as it provides
the necessary high-level API that the extension relies on.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 68f5e73 commit 3808f19Copy full SHA for 3808f19
File tree
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changedOpen diff view settings
Filter options
Expand file treeCollapse file tree
0 file changed
+0
-0
lines changedOpen diff view settings
0 commit comments