Skip to content
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

local_reproducible_context() is active when the snapshot advice is printed #1606

Closed
gaborcsardi opened this issue Apr 21, 2022 · 3 comments · Fixed by #1608
Closed

local_reproducible_context() is active when the snapshot advice is printed #1606

gaborcsardi opened this issue Apr 21, 2022 · 3 comments · Fixed by #1608
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

Which means that the advice will have no hyperlinks.

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Apr 21, 2022
@hadley
Copy link
Member

hadley commented Apr 21, 2022

Ndd self$local_user_output() in the appropriate place in the reporter.

@hadley
Copy link
Member

hadley commented Apr 21, 2022

Hmmm, the challenge is that the hint is emitted by expect_snapshot_helper() which doesn't currently have any way to access the active ProgressReporter.

@hadley
Copy link
Member

hadley commented Apr 21, 2022

Oh but we can copy what waldo_compare() does:

  reporter <- get_reporter()
  if (!is.null(reporter)) {
    # Need to very carefully isolate this change to this function - can not set
    # in expectation functions because part of expectation handling bubbles
    # up through calling handlers, which are run before on.exit()
    reporter$local_user_output()
  }

hadley added a commit that referenced this issue Apr 21, 2022
hadley added a commit that referenced this issue Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants