Skip to content

Stack trace URL improvements#3038

Draft
fonsp wants to merge 5 commits into
mainfrom
stack-frame-url-imrpvoements
Draft

Stack trace URL improvements#3038
fonsp wants to merge 5 commits into
mainfrom
stack-frame-url-imrpvoements

Conversation

@fonsp

@fonsp fonsp commented Oct 2, 2024

Copy link
Copy Markdown
Member

New features:

  • Clickable URLs for functions from packages (thanks to @adrhill !!)
  • Show package name for external functions implemented in another PR
  • Icon to show that the link will open in a new tab
  • Some CSS tweaks

Example

image

Example

image

fonsp and others added 3 commits October 2, 2024 14:12
@fonsp fonsp added the frontend Concerning the HTML editor label Oct 2, 2024
@github-actions

github-actions Bot commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="stack-frame-url-imrpvoements")
julia> using Pluto

@fonsp

fonsp commented Oct 2, 2024

Copy link
Copy Markdown
Member Author

The new URL code does not work on Julia 1.6, and I don't see an easy way to make it work :(

@fonsp

fonsp commented Oct 2, 2024

Copy link
Copy Markdown
Member Author

It might be worth trying this code JuliaLang/julia#47709 (comment) ? RegistryInstances might be okay to add as a dep

@fonsp fonsp mentioned this pull request Oct 2, 2024
@fonsp fonsp added the error display How errors and stack traces are presented label Oct 3, 2024
@cstjean

cstjean commented Nov 1, 2024

Copy link
Copy Markdown

The clickable URL feature is what I'm talking about in #2737 (comment). I would selfishly prefer JULIA_EDITOR over an URL because

  • It works even if offline
  • It works for local packages
  • It's always pointing to the right line, even for old versions.
  • My editor is comfier than github.

I know you favor simplicity and what's-best-for-students, so I'm not going to get my hopes up. This PR as is looks great!

@fonsp

fonsp commented Nov 1, 2024

Copy link
Copy Markdown
Member Author

I think launching an editor doesnt fit our target audience

@cstjean

cstjean commented Nov 5, 2024

Copy link
Copy Markdown

I think launching an editor doesnt fit our target audience

Yes, that's what I thought you would say 🙂. Oh well! I agree that for students the URL works out better.

You could in theory favor JULIA_EDITOR if it's defined (since it's undefined by default) and fallback to the URL, but it's ugly logic and complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

error display How errors and stack traces are presented frontend Concerning the HTML editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants