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

Enable Strict Mode for Sources #2913

Open
wants to merge 7 commits into
base: next
Choose a base branch
from
Open

Enable Strict Mode for Sources #2913

wants to merge 7 commits into from

Conversation

ItsMeBrianD
Copy link
Member

Description

You can now run evidence sources --strict to cause the process to fail when an error is encountered.

Checklist

  • For UI or styling changes, I have added a screenshot or gif showing before & after
  • I have added a changeset
  • I have added to the docs where applicable
  • I have added to the VS Code extension where applicable

@ItsMeBrianD ItsMeBrianD mentioned this pull request Dec 17, 2024
4 tasks
@@ -351,10 +351,12 @@ prog
.option('--sources', 'only build queries from the specified source directories')
.option('--queries', 'only build the specified queries')
.option('--debug', 'show debug output')
.option('--strict', 'Fail when a source query fails')
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.option('--strict', 'Fail when a source query fails')
.option('--strict', 'fail when a source query fails')


await updateManifest(evaluatedManifest, dataDirectory);
console.log(chalk.bold.green(' ✅ Done!'));
log.info(chalk.bold.green(' ✅ Done!'));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
log.info(chalk.bold.green(' ✅ Done!'));
log.info(chalk.bold.green(' ✔ Sources complete!'));
  • I feel like CLI logging with emojis is off brand
  • "Done" always felt unspecific

Copy link
Member

@archiewood archiewood left a comment

Choose a reason for hiding this comment

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

Overall this seems to work as intended, nice.

Logging

I think the logging in the case of a failure could be improved

Strict

Notice how the error is printed twice

CleanShot 2025-01-02 at 12 24 04@2x

Without strict

Compare with the error case without strict mode, (error only seen once)

CleanShot 2025-01-02 at 12 26 11@2x

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

Successfully merging this pull request may close these issues.

3 participants