You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect syntaxhighlighter.tsx to get a TS error but it doesn't.
This is happening because the bootstrap script pre-builds all the packages and later on, other packages depend on the compiled code. So there is no static analysis outside of the package being currently edited.
Describe the solution you'd like
One of the main benefits of the monorepo is to get integrated code earlier on. Type checking is the crucial part of it and the shorter the feedback loop is the better. While working on #18146 I was certain I'm done with the refactoring only to realize I broke a lot of usages after I pushed my code to GitHub and waited for CI to finish.
I would define the requirements as follows:
Type checking of the whole monorepo (or at least major parts of it) while working locally
IDEs should be able to resolve to proper packages not /dist when "Go to declaration" is used
Refactorings in editors should work across all packages
Ideally, without the need to re-compile the whole project's source code
Faster compilation times of packages (probably out of scope but who knows)
This is happening because the bootstrap script pre-builds all the packages and later on, other packages depend on the compiled code. So there is no static analysis outside of the package being currently edited.
This should be solvable with project references - in fact with them you shouldn't even have to prebuild anything to get a good IDE experience. However, prebuilding + recompiling on watch might be better for startup times and overall performance. YMMV, it depends on the size of the monorepo in question
Is your feature request related to a problem? Please describe
While working on some PRs I've noticed that there is no type checks in place between packages.
For example, while having https://github.com/storybookjs/storybook/blob/ca2441260bdf2eaf29e6cf58d34bde60856ca7e9/lib/components/src/syntaxhighlighter/syntaxhighlighter.tsx open and removing
storybook/lib/theming/src/types.ts
Line 89 in 62439ad
I would expect
syntaxhighlighter.tsx
to get a TS error but it doesn't.This is happening because the bootstrap script pre-builds all the packages and later on, other packages depend on the compiled code. So there is no static analysis outside of the package being currently edited.
Describe the solution you'd like
One of the main benefits of the monorepo is to get integrated code earlier on. Type checking is the crucial part of it and the shorter the feedback loop is the better. While working on #18146 I was certain I'm done with the refactoring only to realize I broke a lot of usages after I pushed my code to GitHub and waited for CI to finish.
I would define the requirements as follows:
/dist
when "Go to declaration" is usedDescribe alternatives you've considered
See #18194 after reading the following:
but I didn't succeed to make it work.
Are you able to assist to bring the feature to reality?
Yes
The text was updated successfully, but these errors were encountered: