Skip to content
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

feat: --output flag #169

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Conversation

isaacharrisholt
Copy link
Contributor

Closes #168

Copy link
Contributor

@matthewnitschke-wk matthewnitschke-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I like the general idea, and the ability to specify output location, just have 2 small questions

Comment on lines +17 to +18
help:
'The output file to write the index to. Use "-" to write to stdout',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a use case for outputting to stdout? given the potential size and usage of these files, I'm curious how this might be used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use SCIP internally for some stuff, and we sometimes have to save to a file just to read it straight back in to parse it. This way we can skip the write to disk

@@ -71,5 +78,11 @@ Future<void> main(List<String> args) async {

final index = await indexPackage(packageRoot, packageConfig, pubspec);

File('index.scip').writeAsBytesSync(index.writeToBuffer());
print(result['output']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this was left in for debugging purposes, could we remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yep! Sorry 😅

@matthewnitschke-wk
Copy link
Contributor

QA +1

  • verified that providing --output="../foobar.scip" outputs the scip file in the specified directory
  • verified that passing --output="-" outputs to stdout
  • verified that the default is still index.scip

@matthewnitschke-wk
Copy link
Contributor

🚀 @Workiva/release-management-p 🚢

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@btr-rmconsole-1 btr-rmconsole-1 bot merged commit aa470bb into Workiva:master Jan 31, 2025
12 checks passed
@isaacharrisholt isaacharrisholt deleted the output_flag branch January 31, 2025 16:03
@matthewnitschke-wk
Copy link
Contributor

FYI @isaacharrisholt v1.6.0 was just published to pub.dev

Thanks again for the contribution!

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

Successfully merging this pull request may close these issues.

Feature request: --output flag
3 participants