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

yarn check-types builds a production bundle and creates untracked files #6726

Open
2 of 4 tasks
nflaig opened this issue May 2, 2024 · 5 comments
Open
2 of 4 tasks
Labels
scope-devex Issues for improving developer experience.

Comments

@nflaig
Copy link
Member

nflaig commented May 2, 2024

Since we merged #6685, running yarn check-types has become really slow and at the same time also creates untracked files (see #6685 (comment))

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 #6685 (comment))

  • fix build error
  • no more untracked files as side effect of running build
  • yarn lint should consistently pass, irrespective of running yarn check-types before
  • move build out of yarn check-types to speed up time to run yarn check-types by 25%-30%
@nflaig nflaig added the scope-devex Issues for improving developer experience. label May 3, 2024
@nflaig
Copy link
Member Author

nflaig commented May 3, 2024

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')

@nazarhussain
Copy link
Contributor

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.

@nazarhussain
Copy link
Contributor

nazarhussain commented May 6, 2024

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.

@nflaig
Copy link
Member Author

nflaig commented May 6, 2024

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)

@nflaig
Copy link
Member Author

nflaig commented May 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-devex Issues for improving developer experience.
Projects
None yet
Development

No branches or pull requests

2 participants