-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Make --model
parameter of host application more flexible
#9
Comments
--model
parameter of host application more flexible
The issue description specifies "falling back to the current behavior", if all else fails. #123 is relevant here, as it would make said current behavior more sane. |
Updated the issue description to make it more clear what can be done to address this issue. |
I'm working on this. |
I've looked into this, and it has turned out to be surprisingly difficult. The problem is, a model looks like any other Cargo package, so determining whether there is a model in the current directory isn't straight-forward. This could be solved by adding a special file to model directories, or special metadata to the How models look is an area that is going to change a lot in the future, with the planned move to WASM (#71) and support for more modeling languages. Once that has settled down somewhat, I think it's worth revisiting this issue. For now, I've added it to the feature wishlist. |
Currently, if you run
fj-host -m my-model
, it tries to find a model inmodels/my-model
. This is convenient for use in this repository, but it is less convenient for other use cases.Here's how I could see that being fixed:
-m
argument is passed and there is a Cargo package in the current directory, load that.-m
arugment is passed and there is no Cargo package in the current directory, fall back to current behavior.-m
is an existing path, attempt to load a model from there.Labeling https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, as this is a rather small change that doesn't require detailed knowledge of Fornjot. Some notes on the implementation:
args.rs
.model.rs
.I think it would make sense to add the new logic in
model.rs
.The text was updated successfully, but these errors were encountered: