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

Better discovery for TurboSnap trace-changed and related directories #737

Merged
merged 16 commits into from
May 30, 2023

Conversation

ethriel3695
Copy link
Contributor

@ethriel3695 ethriel3695 commented Apr 6, 2023

This adds better tracing for diagnosing TurboSnap tracing in sub-directories

Here is the output expanded

The root directory of your project: /Users/reuben/source/chromaui/chromatic-cli

The base directory (The relative path from the root to the storybook config root): .

The storybook directory (The directory can either be at the root or in a sub-directory): .storybook

If you are having trouble with tracing, please check the following:

  1. Make sure you have the correct root path, base path, and storybook path.

  2. Make sure you have the correct storybook config file.

  3. Make sure you have the correct storybook config file path.
You can either set the flags storybook-base-dir or storybook-config-dir to help TurboSnap find the correct storybook config file.

   ℹ Traced 1 changed file to 1 affected story file:

— bin-src/ui/messages/errors/invalidRepositorySlug.stories.ts + 1 modules [changed]
  ⎸  bin-src/ui/messages/errors/invalidRepositorySlug.stories.ts
  ⎸  bin-src/ui/messages/errors/invalidRepositorySlug.ts
  ∟ [story index]

The output with Untraced

The root directory of your project: /Users/reuben/source/chromaui/chromatic-cli

The base directory (The relative path from the root to the storybook config root): .

The storybook directory (The directory can either be at the root or in a sub-directory): .storybook

We detected some untraced files, this may affect your traced changes as 
    the untraced flag instructs TurboSnap to not trace dependencies for the files: 
  bin-src/ui/messages/errors/invalidRepositorySlug.ts


If you are having trouble with tracing, please check the following:

  1. Make sure you have the correct root path, base path, and storybook path.

  2. Make sure you have the correct storybook config file.

  3. Make sure you have the correct storybook config file path.
You can either set the flags storybook-base-dir or storybook-config-dir to help TurboSnap find the correct storybook config file.

   ℹ Traced 1 changed file to 0 affected story files:

How to Test

  1. Checkout the branch
  2. Run yarn
  3. Build Storybook
  4. Run yarn chromatic trace ./libs/shared/ui-components/src/index.js -m expanded to see the new output
  5. Run yarn chromatic trace ./libs/shared/ui-components/src/index.js -m expanded -u './bin-src/ui/messages/errors/invalidRepositorySlug.ts' and verify the untraced output

@ethriel3695 ethriel3695 marked this pull request as ready for review May 25, 2023 16:23
@ethriel3695 ethriel3695 requested a review from tevanoff May 25, 2023 20:06
Copy link
Member

@thafryer thafryer left a comment

Choose a reason for hiding this comment

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

Looks good. We should centralize the long helper text so that we don't have to tweak it in multiple places if changes need to be made.

bin-src/trace.test.ts Outdated Show resolved Hide resolved
@ethriel3695 ethriel3695 requested a review from thafryer May 26, 2023 21:51
@ethriel3695 ethriel3695 merged commit 1a27f7b into main May 30, 2023
18 checks passed
@ethriel3695 ethriel3695 deleted the trace-diagnostics-update branch May 30, 2023 15:34
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.

None yet

3 participants