• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37610
77%

Build:
DEFAULT BRANCH: master
Ran 04 Sep 2023 01:27PM UTC
Jobs 1
Files 345
Run time 12s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Sep 2023 03:55PM UTC coverage: 86.433% (-0.8%) from 87.218%
#37610

push

local

web-flow
Standardize the entry-point for Julia execution (#50974)

This is a bit of a straw-man proposal (though I think mergable if people
agree) to standardize the execution entrypoint for Julia scripts. I
think there's at least four different ways that people might run a
script:

- As `julia main.jl`
- As a PkgCompiler sysimage, then calling the main entry point
- As a PkgCompiler "app", with the magic `julia_main` function
- As a StaticCompiler product with an explicit entrypoint specified on
the API.

The main problem I have with all of these variants is that they're all
different and it's kind of a pain to move between them. Here I propose
that we standardize on `Main.main(ARGS)` as the entrypoint for all
scripts. Downstream from that proposal, this PR then makes the following
changes:

1. If a system image has an existing `Main.main`, that is the entry
point for `julia -Jsysimage.so`.
2. If not, and the sysimage has a REPL, we call REPL.main (we could
handle this by defaulting `Main.main` to a weak import of `REPL.main`,
but for the purpose of this PR, it's an explicit fallback. That said, I
do want to emhpasize the direction of moving the REPL to be "just
another app".
3. If the REPL code is called and passed a script file, the REPL
executes any newly defined Main.main after loading the script file. As a
result, `julia` behaves the same as if we had generated a new system
image after loading `main.jl` and then running julia with that system
image.

The further downstream implication of this is that I'd like to get rid
of the distinction between PkgCompiler apps and system images. An app is
simply a system image with a `Main.main` function defined (note that
currently PkgCompiler uses `julia_main` instead).

---------

Co-authored-by: Martijn Visser <mgvisser@gmail.com>

25 of 25 new or added lines in 2 files covered. (100.0%)

73492 of 85028 relevant lines covered (86.43%)

13617619.45 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
5
74.51
-1.73% base/client.jl

Uncovered Existing Lines

Lines Coverage ∆ File
1
61.72
-0.78% base/Base.jl
1
74.51
-1.73% base/client.jl
1
86.35
-0.37% base/compiler/utilities.jl
1
79.84
-0.21% stdlib/FileWatching/src/FileWatching.jl
1
95.92
-0.31% stdlib/LinearAlgebra/src/abstractq.jl
1
91.85
-0.43% stdlib/Random/src/generation.jl
2
91.58
-0.67% base/iobuffer.jl
2
48.39
-2.15% base/multimedia.jl
3
89.47
-3.08% stdlib/LinearAlgebra/src/factorization.jl
3
84.31
-5.88% stdlib/Markdown/src/parse/parse.jl
4
86.89
-0.2% base/compiler/abstractinterpretation.jl
4
66.67
-26.67% stdlib/Markdown/src/IPython/IPython.jl
4
90.48
-9.52% stdlib/Markdown/src/render/terminal/formatting.jl
6
88.32
-1.8% base/process.jl
6
91.09
-5.94% base/secretbuffer.jl
6
83.93
-1.97% stdlib/LibGit2/src/LibGit2.jl
8
63.64
-24.24% stdlib/Markdown/src/Julia/interp.jl
11
84.74
-5.79% stdlib/Markdown/src/Common/block.jl
15
78.11
-5.66% stdlib/LibGit2/src/types.jl
19
46.23
1.58% base/util.jl
31
60.61
-31.31% stdlib/Markdown/src/render/html.jl
32
52.75
-35.16% stdlib/Logging/src/ConsoleLogger.jl
37
53.04
-32.17% stdlib/Markdown/src/GitHub/table.jl
38
38.3
-40.43% base/libdl.jl
40
48.86
-45.45% stdlib/Markdown/src/render/plain.jl
44
23.08
-17.81% stdlib/LibGit2/src/callbacks.jl
44
3.7
-81.48% stdlib/Profile/src/Allocs.jl
45
38.74
-40.54% stdlib/Markdown/src/render/terminal/render.jl
599
3.13
-85.39% stdlib/Profile/src/Profile.jl
Jobs
ID Job ID Ran Files Coverage
1 #37610.1 04 Sep 2023 01:28PM UTC 345
86.43
Source Files on build #37610
  • Tree
  • List 345
  • Changed 280
  • Source Changed 0
  • Coverage Changed 50
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 8e14322b on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc