-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
--dry-run
option is not working
#1637
Comments
Would this be the right time to rename this argument to |
Good point @snoyer |
Is this issue still open? If it is I would like to work on it. |
It is open! |
Hum, since you are working on another issue, I'd like to keep this one open for other developpers with no experience on the project if thats ok |
sure thats fine |
Hey there, this looks interesting, if no one else is working on it, can i pick it up? Thank you so much! |
Sounds good! @rehanganapathy , go for it :) |
@rehanganapathy any news on this ? |
for issue f3d-app#1637 this will make it clearer as dry-run does not do what most people expect (not make changes). This new argument will lead people to search for no-render if they actually intend to use the feature that most projects refer to as dry-run
no feedback, unassigning it |
Hello! With this patch, the config value is never set. application/F3DStarter.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/application/F3DStarter.cxx b/application/F3DStarter.cxx
index e1cc563a..6b00c5bc 100644
--- a/application/F3DStarter.cxx
+++ b/application/F3DStarter.cxx
@@ -713,12 +713,16 @@ int F3DStarter::Start(int argc, char** argv)
// but this duplicate the initialization value as it is present in
// F3DOptionTools::DefaultAppOptions too
bool dryRun = false;
+ if (cliOptionsDict.find("dry-run") != cliOptionsDict.end())
+ {
+ dryRun = f3d::options::parse<bool>(cliOptionsDict["dry-run"]);
+ }
if (cliOptionsDict.find("no-render") != cliOptionsDict.end())
{
dryRun = f3d::options::parse<bool>(cliOptionsDict["no-render"]);
}
std::string config;
- if (cliOptionsDict.find("config") != cliOptionsDict.end())
+ if (!dryRun && cliOptionsDict.find("config") != cliOptionsDict.end())
{
config = f3d::options::parse<std::string>(cliOptionsDict["config"]);
} Is it correct and/or a good starting point? |
It is definitely a good starting point! Do you want to open a PR with this patch @t-h2o ? |
That's me, vincenzo. i am getting this issue |
Sorry, this issue is not available |
You can review the current PR on this issue #1720 if you want |
FIxed by #1720 |
Describe the bug
F3D usually uses a config file, but there is an option to disable this behavior,
--dry-run
. It seems to be non-functionnal currentlyTo Reproduce
Steps to reproduce the behavior, using a built f3d with BUILD_TESTING enabled:
Expected behavior
Config file should not be read
Additional context
in
F3DStarter.cxx:655
, although the comment says that dry-run is being checked, its actually not. Add the check here by checking the cli option and position the boolean accordingly. Also add a test for it inapplication/testing/CMakeLists.txt
The text was updated successfully, but these errors were encountered: