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

Explicitly type-check user code during wasp compile #1718

Open
infomiho opened this issue Feb 6, 2024 · 0 comments
Open

Explicitly type-check user code during wasp compile #1718

infomiho opened this issue Feb 6, 2024 · 0 comments

Comments

@infomiho
Copy link
Contributor

infomiho commented Feb 6, 2024

Edit by @sodic at 22.08.2024.

Note

Original title was Provide type-checking in development. I changed it because we should do this for both wasp start and wasp build.

We should explicitly run tsc --noEmit to type-check user files before attempting to build the SDK or the framework code (in both wasp start and wasp build).

We currently only check the user code implicitly when building other modules, which makes the error messages confusing and sometimes postponed until the build (thanks to bundling, see below).

To make things worse, the user code is currently implicitly type-checked and built in four different contexts, each with its own errors and reporting channels. This problem is already covered in #2247 and can be solved independently of this one.

Solving this issue will probably close #1664 (or close to it).

Original issue

After we switch to using a bundler for our server code (#1714) we will stop using tsc and won't display type errors in the terminal anymore.

Some people prefer seeing the type errors in the terminal alongside their IDE (or they only check for type errors in their terminal instead of their IDE).

We can run tsc --noEmit alongside our bundler to output type errors. We could probably narrow it down only type checking user's code instead of the whole server or web app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants