Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up`EntryPoint` only accepts flat arguments #451
Comments
OK, this type is hitting two limitations of entry points at once. :)
I agree that it would be nice to support both of them, especially since we recommend using We managed to avoid doing any particularly complicated parsing on the command-line by not supporting these types. For 1D arrays, those naturally map to a space-separated list of command-line arguments. For arrays of tuples and nested arrays, I don't see a way around a proper recursive parser that supports Q#-like syntax for unnamed tuples and nested arrays. So this would be:
where the quotes By the way, for this specific case, is it possible to replace |
Describe the bug
The new
@EntryPointattribute does not take structured arguments (sensibly) as it is intended to work with command line applications. However, if I am using an@EntryPointfrom a C# or other host I think it would make sense to be able to pass structured arguments. My use case is as follows (project here):qsharp
I have a sample to demonstrate this new library, and I want to be able to "fuzz" it by generating random data for the qRAM to store and then query what is there after. The data is in the form of an array of tuples of (address, data-value) and I don't really want to de-structure this to pass into separate arguments of
TestImplicitQRAM. Currently I am just hardcoding data to get around this but would really like to help work out a way to pass structured arguments from non-standalone hosts!To Reproduce
See the usecase linked to here: qRAM Library
Expected behavior
I expect that from non-standalone hosts (C#, F#, etc.) that
@EntryPointcan accept arguments that are not flat (nested).