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

JuliaLang / julia / #37725
77%

Build:
DEFAULT BRANCH: master
Ran 23 Mar 2024 11:23AM UTC
Jobs 1
Files 360
Run time 1min
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

23 Mar 2024 05:18AM UTC coverage: 79.721% (-1.0%) from 80.671%
#37725

push

local

web-flow
REPL: Expand macros before looking for `using` statements (#53821)

Currently, in order to give the nice prompt for missing packages, we
look for any `using`/`import` statements in the AST before evaluation.
However, this misses any `using` statements introduced by macros:

```
julia> using Pkg

julia> using BenchmarkTools
 │ Package BenchmarkTools not found, but a package named BenchmarkTools is
 │ available from a registry.
 │ Install package?
 │   (@v1.11) pkg> add BenchmarkTools
 └ (y/n/o) [y]: n
ERROR: ArgumentError: Package BenchmarkTools not found in current path.
- Run `import Pkg; Pkg.add("BenchmarkTools")` to install the BenchmarkTools package.
Stacktrace:
 [1] macro expansion
   @ Base ./loading.jl:1781 [inlined]
 [2] macro expansion
   @ Base ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1762
 [4] #invoke_in_world#3
   @ Base ./essentials.jl:963 [inlined]
 [5] invoke_in_world
   @ Base ./essentials.jl:960 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1755

julia> macro foo()
       :(using BenchmarkTools)
       end
@foo (macro with 1 method)

julia> @foo
ERROR: ArgumentError: Package BenchmarkTools not found in current path.
- Run `import Pkg; Pkg.add("BenchmarkTools")` to install the BenchmarkTools package.
Stacktrace:
 [1] macro expansion
   @ Base ./loading.jl:1781 [inlined]
 [2] macro expansion
   @ Base ./lock.jl:267 [inlined]
 [3] __require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1762
 [4] #invoke_in_world#3
   @ Base ./essentials.jl:963 [inlined]
 [5] invoke_in_world
   @ Base ./essentials.jl:960 [inlined]
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:1755
 [7] top-level scope
   @ REPL[4]:1
```

Generally, it doesn't matter, but embedded DSLs may want to do this kind
of thing, so we might as well try to support it.

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

1478 existing lines in 49 files now uncovered.

69033 of 86593 relevant lines covered (79.72%)

14949992.6 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
74.81
-0.74% base/stat.jl
1
67.68
-0.8% base/Base.jl
1
87.38
-0.47% base/indices.jl
1
87.23
-1.19% base/error.jl
1
68.54
-1.12% stdlib/Test/src/logging.jl
1
84.97
-0.57% base/expr.jl
1
87.95
-0.33% base/tuple.jl
1
73.24
-1.41% base/libuv.jl
1
80.86
0.22% base/float.jl
1
90.0
-5.45% base/docs/bindings.jl
1
72.22
-2.78% stdlib/p7zip_jll/src/p7zip_jll.jl
1
85.94
-0.27% base/boot.jl
1
95.97
-0.37% base/strings/string.jl
2
77.54
-1.45% base/stacktraces.jl
2
71.02
0.13% base/show.jl
2
74.26
-1.98% base/experimental.jl
2
90.85
4.61% base/floatfuncs.jl
3
78.26
-13.04% base/locks-mt.jl
3
97.84
-1.3% base/bitset.jl
3
89.01
-3.21% stdlib/LinearAlgebra/src/factorization.jl
3
58.33
-8.33% base/some.jl
4
67.48
-1.23% base/client.jl
5
92.2
-1.03% base/dict.jl
6
44.99
-0.08% stdlib/Printf/src/Printf.jl
6
71.83
-4.23% base/terminfo.jl
6
40.23
-1.89% base/util.jl
7
90.24
-8.54% stdlib/Random/src/normal.jl
7
21.43
-50.0% base/docs/core.jl
7
62.24
-7.14% base/deprecated.jl
8
64.0
-32.0% base/docs/utils.jl
9
85.14
-12.36% stdlib/Random/src/Random.jl
12
65.53
-0.35% base/loading.jl
14
94.1
-2.35% stdlib/LinearAlgebra/src/diagonal.jl
14
84.92
-1.62% base/gmp.jl
16
82.41
-14.81% stdlib/Random/src/misc.jl
19
55.56
-17.34% base/c.jl
29
57.29
-5.95% base/task.jl
36
34.96
-26.43% base/threadingconstructs.jl
40
54.17
-41.79% stdlib/Random/src/Xoshiro.jl
56
81.26
-9.56% stdlib/REPL/src/docview.jl
59
34.06
-43.41% stdlib/FileWatching/src/pidfile.jl
77
50.19
-29.74% base/docs/Docs.jl
78
25.66
-0.09% base/precompilation.jl
101
9.92
-83.42% stdlib/Random/src/DSFMT.jl
106
47.3
-43.64% stdlib/Random/src/generation.jl
113
77.88
-13.59% stdlib/Test/src/Test.jl
159
48.93
-23.55% base/errorshow.jl
185
44.53
-46.97% stdlib/Random/src/RNGs.jl
266
25.82
-54.3% stdlib/FileWatching/src/FileWatching.jl
Jobs
ID Job ID Ran Files Coverage
1 #37725.1 23 Mar 2024 11:23AM UTC 360
79.72
Source Files on build #37725
  • Tree
  • List 360
  • Changed 283
  • Source Changed 0
  • Coverage Changed 81
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 63e365fe 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

© 2026 Coveralls, Inc