Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version mismatch between fj and fj-app can cause problems #980

Closed
hannobraun opened this issue Aug 23, 2022 · 0 comments · Fixed by #1237
Closed

Version mismatch between fj and fj-app can cause problems #980

hannobraun opened this issue Aug 23, 2022 · 0 comments · Fixed by #1237
Labels
type: bug Something isn't working

Comments

@hannobraun
Copy link
Owner

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 of fj-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 the fj crate in the compiled artifact and checking that version in fj-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's build.rs. Maybe this build.rs can be moved to the fj crate, so the version is made available there. I think it needs to go into a pub static, to show up as a symbol in the compiled artifact? However it's done, fj-app already depends on fj, so it can just read the version from there for its current needs, instead of relying on its own build.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant