-
Notifications
You must be signed in to change notification settings - Fork 7
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
[puppy] Introduce a package for misc Dart CLI tools #335
Conversation
Will rebase once #334 lands! |
PR HealthBreaking changes ✔️
Changelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). API leaks ✔️The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.
License Headers ✔️
All source files should start with a license header. |
First tool: for_all_package_dirs to recursively run a command in every directory that contains pubspec.yaml
CC @jakemac53 RE convo in chat |
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.
Some high level comments:
- we may want a single entry-point here - to use
puppy <command>
and the package:args CommandRunner stuff - we may also want to leverage the
pkgs
convention - to not traverse into subdirectories arbitrarily - instead of an arbitrary 'run anything' command, should we instead have specific
pub get
/ ... other commands? - if we do have a 'run anything' command, we'd probably want a shorter name than
for_all_package_dirs
; perhapsmap
(for map-reduce)?
Maybe? I lean towards specific top-level CLIs. They autocomplete where subcommands don't. Unless you have auto-complete magic installed.
I have cases where the package is NOT set up that way. I guess we could add a
Disagree. It's super nice to be able to run anything. Like
Agreed if we go w/ the one top-level thingy |
I'd prefer a single entry-point - I think it scales better as we get more commands - but it's not a blocker for me.
Can we just not support those repos? Or encourage the I'm just hesitant of arbitrary recursion, and supporting nesting of nesting. Perhaps we stop looking after we've hit a pubspec dir? Or do that by default and have a flag to just keep going.
OK, makes sense.
I like |
We should probably at least support |
How about default to no recursing deeper than the first discovered pubspec – unless you opt in In my experience, it rarely causes issues...just (often) failures |
} | ||
} | ||
|
||
@CliOptions(createCommand: true) |
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.
Is there a way to pipe through command aliases here? If we wanted to instead support puppy run
?
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.
Oh crap! I forgot! Just submit a PR to change that now.
First tool:
for_all_package_dirs
to recursively run a command in everydirectory that contains pubspec.yaml