Skip to content

Commit e95b748

Browse files
barucdennhz2
andauthored
Remove inappropriate @boundscheck (#311)
* Fix CI * Remove inappropriate `@boundscheck` When running julia with `--check-bounds=no`, the package fails to precompile. The reason is that compiler elides `@boundscheck`s, which in this case removes buffer reallocation. I believe that's unwanted. Issue was [reported on Discourse](https://discourse.julialang.org/t/json3-fails-to-precompile-due-to-embedded-nuls-in-c-strings/128482) by 0samuraiE. --------- Co-authored-by: nhz2 <nhz2@cornell.edu>
1 parent fb220e5 commit e95b748

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,13 @@ jobs:
2727
version: '1'
2828
arch: x86
2929
steps:
30-
- uses: actions/checkout@v2
31-
- uses: julia-actions/setup-julia@v1
30+
- uses: actions/checkout@v4
31+
- uses: julia-actions/setup-julia@v2
3232
with:
3333
version: ${{ matrix.version }}
3434
arch: ${{ matrix.arch }}
35-
- uses: actions/cache@v1
36-
env:
37-
cache-name: cache-artifacts
38-
with:
39-
path: ~/.julia/artifacts
40-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
41-
restore-keys: |
42-
${{ runner.os }}-test-${{ env.cache-name }}-
43-
${{ runner.os }}-test-
44-
${{ runner.os }}-
35+
show-versioninfo: true
36+
- uses: julia-actions/cache@v2
4537
- uses: julia-actions/julia-buildpkg@v1
4638
- uses: julia-actions/julia-runtest@v1
4739
- uses: julia-actions/julia-processcoverage@v1
@@ -52,8 +44,8 @@ jobs:
5244
name: Documentation
5345
runs-on: ubuntu-latest
5446
steps:
55-
- uses: actions/checkout@v2
56-
- uses: julia-actions/setup-julia@v1
47+
- uses: actions/checkout@v4
48+
- uses: julia-actions/setup-julia@v2
5749
with:
5850
version: '1'
5951
- run: |

docs/make.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ makedocs(;
66
pages=[
77
"Home" => "index.md",
88
],
9-
repo="https://github.com/quinnj/JSON3.jl/blob/{commit}{path}#L{line}",
9+
repo=Remotes.GitHub("quinnj", "JSON3.jl"),
1010
sitename="JSON3.jl",
1111
authors="Jacob Quinn",
12-
strict=true,
1312
)
1413

1514
deploydocs(;

src/write.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ end
6565

6666
macro writechar(chars...)
6767
block = quote
68-
@boundscheck @check($(length(chars)))
68+
@check($(length(chars)))
6969
end
7070
for c in chars
7171
push!(block.args, quote

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,8 @@ y = Vector{UndefGuy}(undef, 2)
11071107
y[1] = x
11081108
@test JSON3.write(y) == "[{\"id\":10},null]"
11091109

1110-
@static if isdefined(Base, :get_extension)
1110+
# Arrow tests require a 64 bit system
1111+
@static if isdefined(Base, :get_extension) && Sys.WORD_SIZE == 64
11111112
@testset "Arrow" include("arrow.jl")
11121113
end
11131114

0 commit comments

Comments
 (0)