Skip to content

Add a CI job for JuliaC - #3094

Open
blegat wants to merge 5 commits into
masterfrom
bl/juliac-ci
Open

blegat wants to merge 5 commits into
masterfrom
bl/juliac-ci

Conversation

@blegat

@blegat blegat commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

For JuMPy, I'd like to have, in addition to the HiGHS backend, a backend that just writes a MOF so it would be nice to have the MOF writer trimable. It was actually not too hard if we just want --trim=unsafe-warn, the full change is in bl/juliac but I split it in separate PRs. --trim=safe is quite hard but it's easy to know whether the warning thrown by --trim=unsafe-warn are going to be an issue or not. If a user ends up calling a method that was missing from the JuliaC binary, he just gets a MethodError so it's easy to see what's happening. So --trim=unsafe-warn is a nice target.
We start with --trim=no, same reason as jump-dev/HiGHS.jl#372 (comment)

@odow

odow commented Sep 30, 2026

Copy link
Copy Markdown
Member

What is the downside to adding JuliaC as an explicit test dependency? Does it work with Julia v1.10?

@odow

odow commented Sep 30, 2026

Copy link
Copy Markdown
Member

This is the way to do it though. We just gradually add more things to the test/JuliaC to cover things that are trimmable.

@odow

odow commented Sep 30, 2026

Copy link
Copy Markdown
Member

For JuMPy, I'd like to have, in addition to the HiGHS backend, a backend that just writes a MOF

Why?

@odow odow changed the title Add JuliaC CI coverage for the MOF writer Add a CI job for JuliaC Sep 30, 2026
image_recipe = JuliaC.ImageRecipe(
output_type = "--output-exe",
file = joinpath(@__DIR__, "MyApp"),
trim_mode = "no",

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.

So there's a design question here: what's the point of testing this with trim_mode = no? Shouldn't we test only with safe or unsafe-warn? I don't see how writing a JSON file can ever be type-stable.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm mimicking your approach with HiGHS of starting with no then fixing it. We can wait to have the required PRs though before merging this one. We can make it work if nothing is in the UniversalFallback and we specialize on GenericModel.

@blegat

blegat commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

For JuMPy, I'd like to have, in addition to the HiGHS backend, a backend that just writes a MOF

Why?

In NexOR, we have web servers running Odoo with Python will all the data we need to model the optimization problem with JuMPy. And we need to send the problem to servers that will run the actual optimization. The idea is to use MOF for that, the prototype is https://github.com/NexOR-Optimization/NexOR.jl. I'd be nice to be able to compile NexOR.jl with JuliaC to add it as backend of JuMPy so that we just run compiled code on the web servers without needing Julia.

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