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

JuliaLang / julia / #37801
77%

Build:
DEFAULT BRANCH: master
Ran 08 Jun 2024 10:33AM 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

08 Jun 2024 05:10AM UTC coverage: 87.504% (+0.03%) from 87.474%
#37801

push

local

web-flow
Don't let setglobal! implicitly create bindings (#54678)

PR #44231 (part of Julia 1.9) introduced the ability to modify globals
with `Mod.sym = val` syntax. However, the intention of this syntax was
always to modify *existing* globals in other modules. Unfortunately, as
implemented, it also implicitly creates new bindings in the other
module, even if the binding was not previously declared. This was not
intended, but it's a bit of a syntax corner case, so nobody caught it at
the time.

After some extensive discussions and taking into account the near future
direction we want to go with bindings (#54654 for both), the consensus
was reached that we should try to undo the implicit creation of bindings
(but not the ability to assign the *value* of globals in other modules).
Note that this was always an error until Julia 1.9, so hopefully it
hasn't crept into too many packages yet. We'll see what pkgeval says. If
use is extensive, we may want to consider a softer removal strategy.

Across base and stdlib, there's two cases affected by this change:
1. A left over debug statement in `precompile` that wanted to assign a
new variable in Base for debugging. Removed in this PR.
2. Distributed wanting to create new bindings. This is a legimitate use
case for wanting to create bindings in other modules. This is fixed in
https://github.com/JuliaLang/Distributed.jl/pull/102.

As noted in that PR, the recommended replacement where implicit binding
creation is desired is:
```
Core.eval(mod, Expr(:global, sym))
invokelatest(setglobal!, mod, sym, val)
```

The `invokelatest` is not presently required, but may be needed by
#54654, so it's included in the recommendation now.

Fixes #54607

77035 of 88036 relevant lines covered (87.5%)

16049112.75 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
90.91
-0.41% stdlib/Random/src/generation.jl
1
91.21
-0.07% base/abstractarray.jl
1
76.49
-0.05% base/loading.jl
3
75.0
-2.21% base/stat.jl
3
78.26
-13.04% base/locks-mt.jl
3
79.5
-0.62% stdlib/FileWatching/src/FileWatching.jl
13
93.89
0.0% base/array.jl
20
81.11
-0.03% base/compiler/inferencestate.jl
24
94.95
0.0% base/reinterpretarray.jl
41
88.63
-0.04% base/compiler/typeinfer.jl
Jobs
ID Job ID Ran Files Coverage
1 #37801.1 08 Jun 2024 10:33AM UTC 360
87.5
Source Files on build #37801
  • Tree
  • List 360
  • Changed 264
  • Source Changed 0
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b7e72322 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