Skip to content

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

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