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

[core] Verify types in test code #457

Merged
merged 12 commits into from
Jun 27, 2024
Merged

Conversation

michaldudak
Copy link
Member

Our current setup omits test code while typechecking on the root level (pnpm typescript run in workspace root). This PR fixes it by defining tests as a separate TS project and referencing production code in their tsconfig, as discussed with @Janpot on the code infra meeting.

@michaldudak michaldudak added the core Infrastructure work going on behind the scenes label Jun 13, 2024
@michaldudak michaldudak requested a review from Janpot June 13, 2024 12:22
@mui-bot
Copy link

mui-bot commented Jun 13, 2024

Netlify deploy preview

https://deploy-preview-457--base-ui.netlify.app/

Generated by 🚫 dangerJS against 9d31088

tsconfig.typecheck.json Outdated Show resolved Hide resolved
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 25, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 27, 2024
@michaldudak michaldudak requested a review from Janpot June 27, 2024 08:11
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

👍 Let's move forward with this.

Just for tracking purposes: Building multiple projects with references could lead to weird race conditions as we saw in mui/material-ui#30200. Something we could avoid by building type declarations in a single tsc command at the monorepo level, again with project references to every project that needs its types emitted. Something to experiment with in follow-up

@michaldudak michaldudak enabled auto-merge (squash) June 27, 2024 09:12
@michaldudak michaldudak merged commit 3b31db3 into mui:master Jun 27, 2024
18 checks passed
@michaldudak michaldudak deleted the typecheck-tests branch June 27, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants