Skip to content

StackFrame Code Support #14

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

Closed
pbrisbin opened this issue Feb 4, 2018 · 5 comments
Closed

StackFrame Code Support #14

pbrisbin opened this issue Feb 4, 2018 · 5 comments
Labels
enhancement New feature or request

Comments

@pbrisbin
Copy link
Owner

pbrisbin commented Feb 4, 2018

Here's a probably-terrible idea...

We could supply a TH function that reads your project directory into an index at compile time, which you then set on settings:

, bsCodeIndex = $(whateverDoTheThing "./src")

We could then have a function like BugsnagStackFrame -> BugsnagCodeIndex -> Maybe BugsnagCode which grabs the 6 lines of source by line number, which we'd then attach to the stack frame.

@pbrisbin pbrisbin added the enhancement New feature or request label Feb 4, 2018
@jezen
Copy link

jezen commented Apr 1, 2018

Why would this be terrible?

@pbrisbin
Copy link
Owner Author

pbrisbin commented Apr 2, 2018

I have no idea, just seems a little unusual, doesn't it? Feels like something that'll have security or performance problems.

@jezen
Copy link

jezen commented Apr 4, 2018

I could envision security problems if both of the following are true:

  1. Stack traces are leaked to user
  2. Secrets are stored in code

Aside from that, I can't say. In any case, this experimental project may be useful, I'm not sure: https://hackage.haskell.org/package/error-context

@pbrisbin
Copy link
Owner Author

pbrisbin commented Aug 6, 2018

I'm now thinking this isn't too terrible an idea. It'll be fun to build, an isolated thing within the library, and 100% opt-in anyway. 👍

pbrisbin added a commit that referenced this issue Aug 22, 2018
Related to #14.
pbrisbin added a commit that referenced this issue Sep 3, 2018
pbrisbin added a commit that referenced this issue Sep 3, 2018
@pbrisbin
Copy link
Owner Author

pbrisbin commented Sep 3, 2018

Merged. Will be in v0.0.2.0.

@pbrisbin pbrisbin closed this as completed Sep 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants