Skip to content

Enable JuliaC compilation of MOF writer with unsafe-warn - #3098

Draft
blegat wants to merge 8 commits into
bl/juliac-affine-quadraticfrom
bl/juliac
Draft

blegat wants to merge 8 commits into
bl/juliac-affine-quadraticfrom
bl/juliac

Conversation

@blegat

@blegat blegat commented Oct 8, 2026

Copy link
Copy Markdown
Member

This PR is not meant to be merged as is but rather to take a look at the list of things we need to do to get a MOF writer with JuliaC working.
We should probably discuss on individual changes on separate PRs.

@blegat

blegat commented Oct 9, 2026

Copy link
Copy Markdown
Member Author

I think I should split it in 2. First a JuliaC test that write MOF for a model without ScalarNonlinearFunctions and then a PR dealing with the nonlinear part

end
Base.write(io, JSON.json(object))
tree = _json_tree(object)::JSON.Object{String,Any}
Base.write(io, JSON.json(tree))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to reviewing small PRs. I'm not very enthused about changes like this. I don't really like that we're making the code much more verbose just to support JuliaC. JuliaC should have some way to deal with type unstable code + a script at compile time.

return array
end
return value
end

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is ugly... we moved away from dictionaries because they ate up a lot of performance writing very large Sienna instances: #2606

@blegat
blegat changed the base branch from master to bl/juliac-affine-quadratic October 11, 2026 17:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants