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
Not tagging this as a bug since it's not a userland bug.
It's a missing check in our development flow that can (and on several occasions did) result in userland bugs. I don't know what's the appropriate label for such things.
Steps to reproduce:
Map an exports path in sdk/wasp/package.json to something that doesn't exist. For example:
Witness all our checks system fail to detect the error.
Why it matters
Building the SDK creates .d.ts files with unresolvable imports. I'm not sure why the build doesn't realize this - potentially because it doesn't use the exports field for resolving types.
Users import the wasp package, and TypeScript silently resolves these unresolved imports to anys.
Users have incorrect types. The anys propagate to the top. So, most of the times, the types aren't wrong, they're missing (that's why our todoApp build doesn't catch them).
Possible solutions
Ideal: Find a way to enforce correct paths in the package.jsonexports field.
Alternative: Find a way to e2e test our exposed types more robustly.
The text was updated successfully, but these errors were encountered:
Not tagging this as a bug since it's not a userland bug.
It's a missing check in our development flow that can (and on several occasions did) result in userland bugs. I don't know what's the appropriate label for such things.
Steps to reproduce:
Map an
exports
path in sdk/wasp/package.json to something that doesn't exist. For example:Witness all our checks system fail to detect the error.
Why it matters
.d.ts
files with unresolvable imports. I'm not sure why the build doesn't realize this - potentially because it doesn't use theexports
field for resolving types.wasp
package, and TypeScript silently resolves these unresolved imports toany
s.any
s propagate to the top. So, most of the times, the types aren't wrong, they're missing (that's why ourtodoApp
build doesn't catch them).Possible solutions
exports
field.The text was updated successfully, but these errors were encountered: