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

refactor(opts): remove config from opts #9562

Merged
merged 5 commits into from
Dec 4, 2024

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Dec 4, 2024

Description

Remove the config field from Opts entirely. I'm doing this because the config data already gets partially moved into Opts, so by keeping the config around, we have multiple sources for the same data. Now Opts is the fully transformed, normalized config for a run.

You can review this commit by commit if you like

Testing Instructions

@NicholasLYang NicholasLYang requested a review from a team as a code owner December 4, 2024 18:07
Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 7:42pm
8 Skipped Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Dec 4, 2024 7:42pm

@@ -172,7 +172,7 @@ impl Default for CacheActions {
}
}

#[derive(Clone, Debug, Default, PartialEq, Eq)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the Default impl here because we shouldn't automatically create a default, it should directly flow from config.

Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

Very minor comments around naming/visibility

crates/turborepo-cache/src/lib.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/commands/mod.rs Outdated Show resolved Hide resolved
crates/turborepo-lib/src/opts.rs Outdated Show resolved Hide resolved
@NicholasLYang NicholasLYang merged commit 2f0a75b into main Dec 4, 2024
36 checks passed
@NicholasLYang NicholasLYang deleted the nicholasyang/continue-opts-refactor branch December 4, 2024 20:36
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.

2 participants