-
Notifications
You must be signed in to change notification settings - Fork 8
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 stdin/out support #80
Comments
@walkie I am actively investigating this now and interested in your perspective on how to handle this. I am thinking to follow the POSIX syntax:
I'm also thinking that -o could be used to specify a target file. Thoughts? Also I am just looking into structopt now so if you have guidance on how this can be easily done LMK, otherwise I'll dig in (which isn't a bad thing). Thanks! |
For argument parsing, you should probably use clap instead of structopt since that seems to be the standard now. The structopt docs even have a note saying that it's now in maintence mode and to use clap instead. I don't have any strong opinion on the syntax, but following a standard seems like a 👍 to me. The other option might just be to do whatever is most natural/easiest with clap, since that's likely to follow the most common practice. (Those two options might be the same, in which case, even better!) |
@walkie So I now think the actual proper standard is that the absence of a filename is the indicator to read from stdin. However currently framec takes the language parameter as a positional parameter, just like the filename and therefore not really distinguishable (unless I'm missing some subtlety to this). So I'm thinking to make the language a mandatory option with value so:
Would this break a lot of tooling on your side? |
We're not using the CLI at all, so it won't impact us. We call Only tangentially related to the issue here, but we actually have several different I'll let you merge the PR on that one since it adds a new crate to the repo. |
Ok that's good. I'll merge after we get yours in.
…On Thu, Feb 17, 2022 at 11:06 AM Eric Walkingshaw ***@***.***> wrote:
We're not using the CLI at all, so it won't impact us. We call
Exe::run_file directly from a build.rs file.
Only tangentially related to the issue here, but we actually have several
different build.rs files floating around for different projects that all
do slight variants of the same thing. I'm currently abstracting the shared
behavior out, and I plan to add it to the Frame repo as a new frame_build
crate. I'll add a README to that describing our pattern for integrating
Frame state machines into larger Rust projects, which might be helpful for
others hoping to use Frame+Rust.
I'll let you merge the PR on that one since it adds a new crate to the
repo.
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOQ2RRNT6HOVHE2MDI5Y43U3VBJ7ANCNFSM5NO2HJPQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were assigned.Message ID:
***@***.***>
--
*Mark Truluck* - Inventor
e | ***@***.***
w | frame-lang.org
<https://www.patreon.com/framelang>
[image: Frame Language] <https://www.patreon.com/framelang>
|
Enable stdin/out as an option to support use cases for CLI as well as other tools.
The text was updated successfully, but these errors were encountered: