-
Notifications
You must be signed in to change notification settings - Fork 53
Inject breakpoints in Positron #323
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
Conversation
| uri <- paste0("file://", file) | ||
|
|
||
| lines <- ark_annotate_source(uri, paste_line(lines)) %||% lines | ||
| } |
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 somewhat inclined to want this whole thing to be in a tryCatch(), is it just me?
Like, what if normalizePath() fails?
What if we want to change ark_annotate_source() in some breaking way?
Since this feature is just about debugging, I'd hate for some kind of issue there to mean I can't load my package. That would be extremely frustrating as a devtools::load_all() user.
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.
and silently ignore errors? Or warn? hmm I don't know about either.
Basically we've exported ark_annotate_source from Ark and treat it like any other dependency.
If there is a problem and you can't debug anymore, it's frustrating for users too.
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.
A warning feels like the most useful compromise:
- you get to learn something has gone very wrong with annotations
- you still get to use your package, because nothing is actually wrong with it
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.

No description provided.