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

Please don't print banner #548

Closed
musm opened this issue Oct 8, 2020 · 10 comments · Fixed by #2628
Closed

Please don't print banner #548

musm opened this issue Oct 8, 2020 · 10 comments · Fixed by #2628

Comments

@musm
Copy link

musm commented Oct 8, 2020

Please don't print the Pluto banner, it's obtrusive during Pkg operations and is the only Pkg that decides to print such messages during load time
image

@fonsp
Copy link
Owner

fonsp commented Oct 8, 2020

@fonsp fonsp closed this as completed Oct 8, 2020
@musm
Copy link
Author

musm commented Oct 8, 2020

My suggestion is that it shouldn't be enabled on by default.

@musm
Copy link
Author

musm commented Oct 8, 2020

Or rather it should only be printed in a REPL session or something similar, but as it is it just ends up polluting the printing of precompilation.

@KristofferC
Copy link

As a heads up, Pkg will soon automatically precompile packages when adding and updating packages and pretty print the progress. That will completely hide this message. I suggest moving it to __init__.

@fonsp
Copy link
Owner

fonsp commented Oct 8, 2020

We don't do it in __init__ because we only want it to print once: #389 (comment)

Thanks for the notice

@KristofferC
Copy link

You can use https://github.com/JuliaPackaging/Scratch.jl to store that you have printed it.

@fonsp
Copy link
Owner

fonsp commented Oct 9, 2020

Yeah that's nice! But we still support Julia v1.0 🙃

@Seelengrab
Copy link

How about only printing that on VERSION <= 1.5?

@mgkuhn
Copy link
Contributor

mgkuhn commented Aug 12, 2023

Printing the banner at compile time has become a somewhat distracting first user experience since Pkg now routinely presents it during pre-compilation as “1 dependency had warnings”, as if something had gone wrong, possibly scaring new users:

  1 dependency had warnings during precompilation:
┌ Pluto [c3e4b0f8-55cb-11ea-2926-15256bba5781]
│  ┌ Info: 
│  │ 
│  │     Welcome to Pluto v0.19.27 🎈
│  │     Start a notebook server using:
│  │ 
│  │   julia> Pluto.run()
│  │ 
│  │     Have a look at the FAQ:
│  │     https://github.com/fonsp/Pluto.jl/wiki
│  └ 
└  

If we really need that banner at all, how about printing it from within new_notebooks_directory() called by __init__(), but only when $JULIA_DEPOT_PATH/pluto_notebooks/ is created, and not printing it when that folder already exists? In other words, use the absence of that folder as a status indicator for whether this is a first-time module load.

That would preserve the once-only display that @fonsp wants, but also moves the banner out of precompilation.

mgkuhn added a commit to mgkuhn/Pluto.jl that referenced this issue Aug 12, 2023
Use the Scratch package to record if the banner has already been shown.

fixes fonsp#548
mgkuhn added a commit to mgkuhn/Pluto.jl that referenced this issue Aug 12, 2023
Display banner only when `$JULIA_DEPOT_PATH/pluto_notebooks/` is
created, and create that folder when the module initializes.

This preserves the fact that the banner is only displayed once, while
it now no longer displays it when the package is compiled.
Compile-time display became problematic as that is counted by `Pkg` as
a warning, and users might therefore think something went wrong.

Note that this now creates `$JULIA_DEPOT_PATH/pluto_notebooks/` much
earlier, whereas previously that folder was only created when the user
saved a notebook there.

fixes fonsp#548
@mgkuhn
Copy link
Contributor

mgkuhn commented Aug 12, 2023

I've now implemented two alternative solutions for printing the Pluto banner only once, during module initialization, to make sure the banner no longer shows up during pre-compilation, where it is currently presented as a warning, which can scare new users.

Having tried both, I now like Method 2 significantly better:

  • It doesn't unnecessarily create $JULIA_DEPOT_PATH/pluto_notebooks/
  • It records for which versions the banner has been shown already, thereby creating the possibility to show in future "What’s new" type messages below the banner as well.

Using Scratch.jl was previously dismissed because Pluto then still supported Julia 1.0, but this is now no longer the case, so I hope we can do this now.

Please have a look at PR #2628

mgkuhn added a commit to mgkuhn/Pluto.jl that referenced this issue Sep 6, 2023
Use the Scratch package to record if the banner has already been shown.

fixes fonsp#548
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants