-
-
Notifications
You must be signed in to change notification settings - Fork 984
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
Add support for response files #2320
Conversation
It looks like this addresses the existing problem of |
Yes, I did create workaround by injecting whitespace in BDN. For sure this should be fixed in CommandLine library, but I do not sure reaction of time of their maintainers. also coincidentally I thought that quality of life for BDN is more important then proper fix. Will try to submit real fix a bit later. |
this is required when your option can accept command line arguments to other applications. See dotnet/BenchmarkDotNet#2320 (comment) for example of parsing issues
@kant2002 thanks for the PR. As I can see, this PR suggests reserving the @adamsitnik what do you think? |
|
@adamsitnik I would like to hear your opinion on the matter. Are you have time for take a look at PR ? |
if (arg.StartsWith("@")) | ||
{ | ||
var fileName = arg.Substring(1); | ||
if (File.Exists(fileName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the given file doesn't exist? I believe we should warn the user about that rather than just silently ignore such an argument.
var fileName = arg.Substring(1); | ||
if (File.Exists(fileName)) | ||
{ | ||
var lines = File.ReadAllLines(fileName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add try..catch with proper exception handling? If there are some issues with the given file (e.g., we don't have permission to read the file content), it would be nice to print an error message rather than just throwing an exception.
@kant2002 I think I'm OK with introducing such a |
@kant2002 thanks! |
I make workaround here for now, but essentially issues in CommadLine library. Also place workardoud for stupid bug with quoted argumetns with space in them.
I notice issue with parsing and request for RSP on Discord where @kg and @radical discuss how to feed proper parameters in
benchmarks_ci.py