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

JuliaLang / julia / 1503
78%

Build:
DEFAULT BRANCH: master
Ran 13 Apr 2026 11:53AM UTC
Jobs 3
Files 351
Run time 2min
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

12 Apr 2026 10:07PM UTC coverage: 77.837% (-0.09%) from 77.924%
1503

push

buildkite

web-flow
Port `StringView` to Base (#60526)

This PR ports
[StringViews.jl](https://github.com/JuliaStrings/StringViews.jl) to
Base, as discussed in #60037. Closes #60037.

_Tests have been written by a chat-bot and reviewed by me_

## Decisions for reviewers before reviewing
* Can we use `@inbounds` with a `StringView` wrapping an unknown array
type? The code currently does, but I'm not against removing it. If we do
remove it, we may need to re-jigger a bunch of string related code,
since shared code paths of strings and string views would mean that
`String` performance could be degraded by removing inbounds annotations.

## Motivation
We generally want to avoid adding more types to Base when it can live in
a package, so this PR requires some justification:

### StringViews are the more fundamental string
`String` and `SubString` are an abstraction over an underlying byte
array, and almost all its operations are defined in terms of loading
bytes from that array. This abstraction of strings as "arrays in a
trench coat" is made explicit by string views.
Hence, `String` and `SubString` can be implemented in terms of string
views, but not the other way around. And it is better if Base contains
the foundations and packages provide implementations on top of those,
instead of the other way around.

One hint that the relationship is inverted is to look at the
implementation of `StringViews.jl`: It re-implements tonnes of internal
Base string functions, instead of calling into generic, foundational
methods in Base.
We also have comments like this in Base: `# duck-type s so that external
UTF-8 string packages like StringViews can hook in`, where the sensible
thing would be to _define_ getindex for UTF8-encoded strings in terms of
this method, instead of encouraging use of Base internals.

Due to the strong intersection of strings as an abstraction and string
views, this PR only has ~100 LOC in `base/strings/stringview.jl`,
whereas `src/` in `StringViews.jl` has ~800 LO... (continued)

75 of 93 new or added lines in 8 files covered. (80.65%)

132 existing lines in 11 files now uncovered.

65347 of 83954 relevant lines covered (77.84%)

24288390.47 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
88.81
-3.27% base/strings/string.jl
5
80.6
0.85% base/strings/search.jl
2
78.26
-0.76% base/strings/annotated_io.jl

Coverage Regressions

Lines Coverage ∆ File
75
69.03
-21.31% base/shell.jl
15
71.28
-0.73% base/show.jl
11
77.78
-4.37% base/experimental.jl
9
77.68
-0.36% base/loading.jl
8
24.53
-5.03% base/special/log.jl
7
76.45
-1.15% base/regex.jl
3
85.99
-0.96% stdlib/LibGit2/src/LibGit2.jl
1
85.28
-0.25% base/essentials.jl
1
78.26
-0.76% base/strings/annotated_io.jl
1
73.64
-0.05% Compiler/src/tfuncs.jl
1
92.51
-0.44% stdlib/Random/src/generation.jl
Jobs
ID Job ID Ran Files Coverage
1503 linux-coverage - 1503 13 Apr 2026 03:19PM UTC 350
76.0
1503 macos-coverage - 1503 13 Apr 2026 11:53AM UTC 351
76.05
1503 windows-coverage - 1503 13 Apr 2026 03:41PM UTC 318
75.77
Source Files on build 1503
  • Tree
  • List 351
  • Changed 61
  • Source Changed 9
  • Coverage Changed 60
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 66351eb6 on github
  • Prev Build on master (#1502)
  • Next Build on master (#1504)
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