Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This test fails with
The offending node is the URL
Identifier
, and I'm not able to see where it's getting invoked, I'm guessing due to some async nature of the code.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.
Is this a regression from PR #429 ?
It added url to global, although this test doesn't have
require('url')
so may not be related.Or maybe it was from the URL global here?
nft/src/analyze.ts
Line 187 in b3d2da0
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.
More info on this:
0.27.4
, but0.27.4
seems to trace more files which causes our test to hit this URL core problem nowDebugging this is tricky since the stack trace is very unhelpful. For example, replacing
URL: URL
withURL: () => console.trace('Called URL')
and running this reproduction test gives the very unhelpful stack trace:I can't figure out where URL is getting called from. Seems like from the
then
of some promise, but which one?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.
@styfle Do you know how URL is getting invoked here? Happy to make a PR fixing this, but stuck on finding where exactly URL is getting invoked.
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.
Its probably from
computePureStaticValue()
which is basically a static analysis form ofeval()
so it sets globals vars and local vars to try to compute a value.nft/src/analyze.ts
Line 459 in b3d2da0