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

Source maps are broken for user's ServerSession subclasses #2

Open
bogeeee opened this issue Mar 10, 2024 · 2 comments
Open

Source maps are broken for user's ServerSession subclasses #2

bogeeee opened this issue Mar 10, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed 💰 Reward

Comments

@bogeeee
Copy link
Owner

bogeeee commented Mar 10, 2024

Occurs for all files with a @remote decorator (those are modified in the restfuncs-transformer stage).
I think, there won't be an easy fix for this soon, or we need someone who's really familiar with the tsc compiler internals.
See this discussion.

@bogeeee
Copy link
Owner Author

bogeeee commented Apr 12, 2024

I think, the precise problem is in: transformer/index.ts:
compilerHost.fileCache.set(sourceFile.fileName, updatedSourceFile);

from there on, the compiler takes this as the original file and i think, there's no way, you could provide a (let's say:) originalSourceFile.ts -> updatedSourceFile.ts source map there. So you'd kind of have the grab the generated code (either from the generated AST, during visiting, or by a diff afterwards) and squeeze all that code into one line inside the original file content at the correct position. Not quiet easy...

@bogeeee
Copy link
Owner Author

bogeeee commented Apr 12, 2024

/reward 200

How to earn this $200.00 reward?
💪 Comment /try and start working on solving the issue!
🙌 And when you open the PR, comment /claim #2 either in the PR description or in a PR's comment

@opirebot opirebot bot added the 💰 Reward label Apr 12, 2024
@bogeeee bogeeee added bug Something isn't working help wanted Extra attention is needed labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed 💰 Reward
Projects
None yet
Development

No branches or pull requests

1 participant