Skip to content

Conversation

hayes
Copy link

@hayes hayes commented Oct 5, 2013

This adds 2 sourcemaps features that will allow Sentry to work with the source maps generated by browserify:

  1. Loading data URI source maps. The allows you to include your source map as a base64 data uri inside you generated source to avoid having to have a publicly available source map in a seperate file: mdn.io/data-URIs
  2. Parsing inlined source content. The v3 spec for source maps adds the sourcesContent field, which can contain an array of strings which contain the contents of the original source files in the sources field. see line 6 of https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#heading=h.qz3o9nc69um5

I have not been able to run the test on my machine, so this PR is still a work in progress, and I am submitting it more to start the feedback process than as a final product.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) when pulling 9daf188bf54a2bffeb8b611b17ab728d50a26eb3 on mghayes:master into 4ec18e6 on getsentry:master.

@justinabrahms
Copy link

🎉📣👍

This is a vote of encouragement as this fix would make my sentry experience much better.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"file-like object" has meaning in the python community. It means it adheres to some subset of the python File API and can be treated like a file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that makes sense, the reason I changed the doc string was cecause the function now takes the source map after it has already been parsed to json instead of taking the raw source map which is what I thought file-like object was referring to

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation and terminology are not my strong suite, if you have a suggestion for a better doc string I'd be happy to use it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes total sense. I didn't realize the api was actually changing. :)
On Oct 7, 2013 11:07 PM, "Michael Hayes" notifications@github.com wrote:

In src/sentry/utils/sourcemaps.py:

 """
  • Given a file-like object, yield SourceMap objects as they are read from it.
  • Given a sourcemap json object, yield SourceMap objects as they are read from it.

Documentation and terminology are not my strong suite, if you have a
suggestion for a better doc string I'd be happy to use it.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1023/files#r6817679
.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.33%) when pulling c85983d8db61e11ead15a7dad930bcc459cde800 on mghayes:master into 4ec18e6 on getsentry:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.43%) when pulling 83efed566951bb8aa5af84e143cec298700c678d on mghayes:master into 4ec18e6 on getsentry:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) when pulling 5c7e5af0847ca344b5a577b52b9cad32341c2d09 on mghayes:master into 4ec18e6 on getsentry:master.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how this got in here... I have never used sub modules before

@hayes
Copy link
Author

hayes commented Oct 9, 2013

I'm going to close this PR and create it as a new one.

@hayes hayes closed this Oct 9, 2013
@github-actions github-actions bot locked and limited conversation to collaborators Dec 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants