-
Notifications
You must be signed in to change notification settings - Fork 795
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
bug: TypeScript errors not reported in stencil build when components.d.ts
is not present
#3534
Comments
components.d.ts
is not presentcomponents.d.ts
is not present
Hey @ethanbdev 👋 If I'm reading this correctly, it seems the scenarios in the "Steps to Reproduce" section both require that
Seems to make it sound like the file isn't checked in to source control - is that the case? |
Hey, thanks for the quick reply.. Since it is an autogenerated file it does not make sense to me to check it into source control. Is it a recommended best practice to check that file in? It would change with nearly every pull request and the developer would have to make sure to commit it. |
It is recommended this file be checked in at this time. Stencil currently requires this file to be present to properly perform type checking. We're aware this isn't desirable for everyone, and are tracking issues related to this in #3239. |
For now, I've opened a PR in our documentation to make it explicit we recommend this file be checked in stenciljs/site#907 |
Okay, thank you for the update and thanks for updating the doc. We can monitor that issue. Should I add some of this info as a comment there? |
I am facing the described issue while having It seems to me that TypeScript errors are also not reported if the This is what happened: We are automatically merging minor and patch npm package updates using renovate bot. These updates are usually protected by a build pipeline. A pipeline will run and block the merge request if bundling, TypeScript or tests fail. One of the latest Stencil updates led to a modified What we did not notice is that this Stencil update disabled the TypeScript error reporting for all future updates done by the bot. That is because every build would generate a modified version of This behavior is not expected and is somehow difficult to handle. I am thinking about these workarounds:
I guess these workarounds would not be necessary if #3239 is fixed. |
I can confirm what @PMudra wrote:
|
@rwaskiewicz, Any update on this issue? |
@Manipandian there are no updates to this case. The Stencil team has many competing priorities and limited resources to give every issue the necessary attention it deserves. At this point I recommend to get involved providing a fix for this issue as I can guarantee when we will be able to take a look at this. We are happy to provide guidance in the process. Thanks for understanding. |
Prerequisites
Stencil Version
v2.17.3 (Seen in at least 2.16.1 as well)
Current Behavior
Type errors are not erroring on initial builds (no build outputs), but will on subsequent builds.
This is an issue especially in CI, as we re-create the entire environment. The CI workflow will not error if a type error is committed.
Expected Behavior
The type error should cause the build to error
Steps to Reproduce
components.d.ts
index.ts
to be named orexport * from ./components
or deleteindex.ts
npm run build
-> build completes with no errorsOR
components.d.ts
, simply delete it, and note that the type error will not be reported.(I have provided a repo that matches our setup)
Code Reproduction URL
https://github.com/ethanbdev/stencil-typings-error-repro
Additional Information
It seems extremely breaking that we cannot rely on the types generated in an initial build.
One additional thing I noticed, in the stencil starter if the
components.d.ts
gets deleted, the build does not even work with a different error about the./components
file is not foundThe text was updated successfully, but these errors were encountered: