-
-
Notifications
You must be signed in to change notification settings - Fork 432
Conversation
@Conduitry has the issue been fixed in some other PR? Should I close this one? If not, I can add the code from |
No, I don't believe this issue has been fixed yet |
So, is there an issue with this PR? Do you guys want the code in sapper? |
I think mostly everyone's just been busy. Also, errors weren't showing up at all due to #719, which made this one hard to review. Now that that's been fixed I think it's time to revisit this one.
You said your package was based on node-source-map-support, but exposes the needed functionality. Would you be able to file an issue with node-source-map-support to ask them to expose that functionality? Then we could consider using that package instead of having to add the code directly into Sapper Also, I would suggest splitting out the linting fixes into a separate PR. We've been working on linting and you can see some of our progress in #1198, but unfortunately that doesn't fix the linting issues you found and we should investigate why. Perhaps we should setup prettier on the codebase |
I rechecked I can remove the formatting changes and move the src of |
How did this pass me by? This would be incredibly useful. I would agree that replicating the source of that module here is probably desirable rather than bringing the whole thing in. Can we include a note so that it's clear that this is the case, and if the source module improves we can incorporate at a later date. Also as @benmccann says, we don't accept linting fixes in PRs, unless that is the sole purpose of the PR, so they should be removed for this one. Thanks! |
V8 is the Javascript engine inside of node.js that parses and runs your Javascript. The same V8 engine is used inside of Chrome to run javascript in the Chrome browser. Google open-sourced the V8 engine and the builders of node.js used it to run Javascript in node.js. The current node.js binary cannot work without V8. So I'm not sure why it'd be an issue to have v8 specifics in the code? If you're talking about Node 8.x instead, I'm also not sure it harms us at all if it supports Node 8.x
I'm not sure I'd call Anyway, we don't have to block on getting the functionality implemented upstream. I wouldn't want to block this feature if we can't get the support we need. But we should at least ask for it before forking the project and copying the source here that way there's at least a possibility that we don't have to maintain a fork of the project long-term. |
I am aware of the v8/node relationship. What I meant to say is that I'm not sure why you refer to The relevant part to us is 1/6th of |
It has been a year since I worked on this - so, I don't actually remember why it didn't work. |
Ok. I'm fine with this PR if you're able to move the linting fixes to a new PR and rebase it |
5333ab2
to
2e5a510
Compare
Rebased, removed formatting/linting fixes and moved the src of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! do you think it'd be possible to add a test for the new sourcemapStacktrace
functionality?
I can't seem to get the test suite running in WSL and I currently don't have the time to debug it and also add tests. |
ok. thanks for all your work on this already |
This needs tests before it can be merged. |
I was just thinking about this some more... Does anyone know why we bundle the server? I wonder if it's necessary. If we didn't bundle it then I don't think we'd need source maps for the stack traces Update: |
Bundling, even for the server, generally makes things a bit faster and smaller. It also makes things like building a docker image simpler as the server bundle contains all of the necessary code so you don't need to ship any dependencies. |
please merge & release asap |
@sdwvit you can help it get merged. the main thing this needs is some tests. if you'd like to contribute we'd be happy to see this get merged much sooner |
} | ||
|
||
const consumer = new SourceMapConsumer(rawSourceMap); | ||
const pos = consumer.originalPositionFor({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, with the latest version of source-map
used here (0.7.3), consumer
returns promise, therefore call to originalPositionFor
will fail 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, it should be version 0.6.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm planing to continue the works that you've done if you don't mind, especially adding tests for this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all, I mentioned in one of my previous comments that I've been quite busy lately.
closes #117
sourcemap-stacktrace
takes in a stacktrace and uses sourcemaps (if it finds any) to map the paths to the sources