Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Args not flowing to the Program class constructor for a custom loader #336

Closed
glennblock opened this issue Jun 14, 2014 · 9 comments
Closed
Assignees
Milestone

Comments

@glennblock
Copy link

I've created a new ScriptCsLoader (implements IAssemblyLoader) which contains a Program class and returns itself. The extension works properly, but I am finding that the args I pass at the K command line are not flowing in. I add a Console.WriteLine to prove this...

screen shot 2014-06-14 at 2 18 04 pm

As you can see the cmd is: k run start.csx yet start.csx is not flowing in.

I noticed the same behavior happens in VS2014 if you explicitly pass params by configuring the args for a console project. @davidfowl mentioned the VS behavior was a known issue.

@davidfowl
Copy link
Member

Looks like it might be a runtime bug. Will look into it

@davidfowl
Copy link
Member

@ChengTian looks like the command line argument parsing broke this. Specifically, it looks like having a fake run command doesn't use get the right set of RemainingArguments

@davidfowl davidfowl added this to the CTP2 milestone Jun 14, 2014
@glennblock
Copy link
Author

@ChengTian any ETA on this? I guess I can use Environment.Arguments for now?

@glennblock
Copy link
Author

I mean Environment.GetCommandLineArgs();

@glennblock
Copy link
Author

OK, that worked as a work around (see below), but please fix this.

screen shot 2014-06-15 at 12 36 42 pm

@glennblock
Copy link
Author

@davidfowl @ChengTian it looks like Visual Studio actually is passing in the args that you set in the "Command Line Arguments" under debugging. I tested setting it to "start.csx" and ran in the debugger and it did get passed in via Environment.GetCommandLineArgs(). So the bug appears to relate to the invoking of Main.

@davidfowl
Copy link
Member

The bug is known and will be fixed. It's the weekend and the world cup is on so be patient

@glennblock
Copy link
Author

I am not rushing....I am just giving more clarity on what I found :-)

On Sun, Jun 15, 2014 at 4:22 PM, David Fowler [email protected]
wrote:

The bug is known and will be fixed. It's the weekend and the world cup is
on so be patient


Reply to this email directly or view it on GitHub
#336 (comment).

@ChengTian
Copy link
Contributor

@glennblock @davidfowl I am working on this issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants