Skip to content

make an ijulia "app" entrypoint - #1211

Open
KristofferC wants to merge 2 commits into
JuliaLang:masterfrom
KristofferC:kc/app
Open

make an ijulia "app" entrypoint#1211
KristofferC wants to merge 2 commits into
JuliaLang:masterfrom
KristofferC:kc/app

Conversation

@KristofferC

Copy link
Copy Markdown
Member

this makes ijulia installable via the Pkg app interface: https://pkgdocs.julialang.org/v1/apps/ and allows one to do e.g.

pkg> app add IJulia

and then run e.g.

ijulia lab

in the terminal to start an ijulia jupyterlab notebook without having to launch julia itself and load IJulia explicitly.

To test this PR you can do Pkg.Apps.develop(path=abspath(".")) (the relative path is currently bugged), make sure .julia/bin is in the PATH and then run ijulia.

@codecov

codecov Bot commented Nov 3, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.08%. Comparing base (656ed86) to head (f0c5341).
⚠️ Report is 54 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1211      +/-   ##
==========================================
+ Coverage   70.21%   71.08%   +0.86%     
==========================================
  Files          17       17              
  Lines        1276     1314      +38     
==========================================
+ Hits          896      934      +38     
  Misses        380      380              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JamesWrigley JamesWrigley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this will need to be gated behind a @static if VERSION >= v"1.11" to support 1.10.

Comment thread src/IJulia.jl Outdated
Comment thread src/IJulia.jl Outdated
Comment thread src/IJulia.jl Outdated
Comment thread test/main.jl Outdated
Comment thread docs/src/manual/running.md Outdated
Starting with Julia 1.12, you can launch IJulia directly from the command line using the `ijulia` command. First, you need to install the app entry point by running in the Julia REPL:

```julia
pkg> app add IJulia

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think IJulia is one of the few packages that still has a build step 😅 Shall we just install the app automatically when building? My only concern is that from reading the docs it seems that an app is somehow hardcoded to a specific Julia binary? That's a bit unfortunate because we recently added a juliaup integration that reduced the need for rebuilding IJulia to once per minor release (#1201). And perhaps if it's that experimental we should leave it out by default, can always enable it later.

@KristofferC KristofferC Nov 4, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think IJulia is one of the few packages that still has a build step 😅

I thought about this and I even have a started branch that removes the build step.
Moves the kernel installation into the package and auto-installs on first kernel launch and uses a scratch space to keep the preference (https://github.com/JuliaPackaging/Scratch.jl).

What do you think about that? Build scripts are not that great...

But anyway, once I've fixed a bug, app installation should run the build step like normally.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds ok, as long as it still installs the same kernels as now. @stevengj, what do you think?

@KristofferC

Copy link
Copy Markdown
Member Author

Update from comments.

Since (from making this PR) I noticed that build support is kind of broken (will require a small fix) it is probably best to wait to merge this until a julia 1.12 has come out with that fix (or that the build step has been migrated away from).

@KristofferC
KristofferC force-pushed the kc/app branch 2 times, most recently from e7d1c1c to 5487958 Compare November 4, 2025 16:07
@JamesWrigley

Copy link
Copy Markdown
Member

The windows test failure can be ignored, there's something still wrong with the kernel shutdown logic that causes it to hang on windows.

Since (from making this PR) I noticed that build support is kind of broken (will require a small fix) it is probably best to wait to merge this until a julia 1.12 has come out with that fix (or that the build step has been migrated away from).

How is build support broken? 👀

KristofferC and others added 2 commits November 4, 2025 17:23
this makes ijulia installable via the Pkg app interface: https://pkgdocs.julialang.org/v1/apps/ and allows one to do e.g.

```
pkg> app add IJulia
```

and then run e.g.

```
ijulia lab
```

in the terminal to start an ijulia jupyterlab notebook without having to launch julia itself and load IJulia explicitly.
@KristofferC

Copy link
Copy Markdown
Member Author

How is build support broken? 👀

app add just doesn't run build... 😆

@KristofferC

Copy link
Copy Markdown
Member Author

JuliaLang/Pkg.jl#4491 should fix the app build issue.

But really, this whole build thing is kind of user hostile 😆. Like, there is code in here to just do what the user want but instead they get an error and have to do some Pkg.build etc.

Anyway, I'll work on my no-build branch.

@fingolfin

Copy link
Copy Markdown
Member

Off-topic rant, but: Honestly, I think Pkg.build is so broken and useless, it should be deprecated in the manual and alternatives be suggested. We stopped using it a long time ago in all our packages; there are far too many situations were it is not called reliably. Instead we usually use some code that is executed during precompilation and/or in __init__ to set up things like those Jupyter kernel in an idempotent way.

@JamesWrigley

Copy link
Copy Markdown
Member

You're in luck 😉 #1215

@JamesWrigley JamesWrigley linked an issue Dec 15, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should IJulia be an app?

3 participants