Pluto.jl icon indicating copy to clipboard operation
Pluto.jl copied to clipboard

Stack trace URL improvements

Open fonsp opened this issue 1 year ago • 6 comments

New features:

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

Example

image

Example

image

fonsp avatar Oct 02 '24 12:10 fonsp

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

github-actions[bot] avatar Oct 02 '24 12:10 github-actions[bot]

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

fonsp avatar Oct 02 '24 14:10 fonsp

It might be worth trying this code https://github.com/JuliaLang/julia/issues/47709#issuecomment-2388629772 ? RegistryInstances might be okay to add as a dep

fonsp avatar Oct 02 '24 14:10 fonsp

The clickable URL feature is what I'm talking about in https://github.com/fonsp/Pluto.jl/issues/2737#issuecomment-2450879776. 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!

cstjean avatar Nov 01 '24 00:11 cstjean

I think launching an editor doesnt fit our target audience

fonsp avatar Nov 01 '24 09:11 fonsp

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.

cstjean avatar Nov 05 '24 02:11 cstjean