Version mismatch between fj
and fj-app
can cause problems
#980
Labels
type: bug
Something isn't working
Milestone
Fornjot models depend on the
fj
crate to define shapes and to interface with the Fornjot app.fj-app
compiles and loads those models at runtime.It is possible to define a Fornjot model using one version of the
fj
crate, and load this model with a different version offj-app
. This might work, or it might cause a hard-to-understand error message, or weird behavior, or even a segmentation fault. It would be better to prevent this outright, by embedding the version of thefj
crate in the compiled artifact and checking that version infj-app
when the model is loaded. A version mismatch should result in a friendly error message.We already have code that determines the version in
fj-app
'sbuild.rs
. Maybe thisbuild.rs
can be moved to thefj
crate, so the version is made available there. I think it needs to go into apub static
, to show up as a symbol in the compiled artifact? However it's done,fj-app
already depends onfj
, so it can just read the version from there for its current needs, instead of relying on its ownbuild.rs
.The text was updated successfully, but these errors were encountered: