lodestar
lodestar copied to clipboard
`yarn check-types` builds a production bundle and creates untracked files
Since we merged https://github.com/ChainSafe/lodestar/pull/6685, running yarn check-types
has become really slow and at the same time also creates untracked files (see https://github.com/ChainSafe/lodestar/pull/6685#discussion_r1586631639)
My suggestion is to either revert the PR or come up with a proper solution as of right now this negatively affects developer experience.
It also fails randomly locally, and even in the CI (see https://github.com/ChainSafe/lodestar/pull/6685#discussion_r1586635384)
- [x] fix build error
- [x] no more untracked files as side effect of running build
- [ ]
yarn lint
should consistently pass, irrespective of runningyarn check-types
before - [ ] move build out of
yarn check-types
to speed up time to runyarn check-types
by 25%-30%
Noticed something else, running yarn lint
before yarn check-types
causes no issues. But if check-types
is executed once locally, any lint runs will fail with the following
/home/nico/projects/ethereum/lodestar/packages/light-client/test/unit/webEsmBundle.browser.test.ts
1:1 error Unused eslint-disable directive (no problems were reported from '@typescript-eslint/no-unsafe-call')
yarn lint should consistently pass, irrespective of running yarn check-types before
That depends upon what lint
is doing. We are doing linting on both src and tests. And when you lint test which are depending upon the build artifacts then you have to build first before linting.
move build out of yarn check-types to speed up time to run yarn check-types by 2x (or more)
That's for one package where needed and not for all packages. So in paractivce it's not slowing down 2x.
lint test which are depending upon the build artifacts
this is such a bad design, lint should never depend on build...and it never has until now.
Also right now it's vice versa, just running yarn lint
will pass but if you run yarn check-types
once locally, any yarn lint
afterwards will fail (just give this a try yourself locally)
So in paractivce it's not slowing down 2x.
I meant by 50% but it's more like 25-30%, this is still bad enough imo
Issue seems to be resolved, having a smooth DX on unstable branch now, thanks @nazarhussain :heart: