Skip to content

Commit 6d26de0

Browse files
Automatic update of vendored dependencies (#266)
Co-authored-by: MichaelHatherly <[email protected]>
1 parent c316f3a commit 6d26de0

File tree

5 files changed

+135
-131
lines changed

5 files changed

+135
-131
lines changed

src/QuartoNotebookWorker/src/vendor/Manifest.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ version = "1.11.0"
3535

3636
[[deps.Requires]]
3737
deps = ["UUIDs"]
38-
git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7"
38+
git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64"
3939
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
40-
version = "1.3.0"
40+
version = "1.3.1"
4141

4242
[[deps.SHA]]
4343
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

src/QuartoNotebookWorker/src/vendor/Requires/.github/workflows/CI.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
version:
2121
- '1.0'
2222
- '1.6'
23+
- 'lts'
2324
- '1'
2425
- 'nightly'
2526
os:
@@ -28,7 +29,7 @@ jobs:
2829
- x64
2930
steps:
3031
- uses: actions/checkout@v2
31-
- uses: julia-actions/setup-julia@v1
32+
- uses: julia-actions/setup-julia@v2
3233
with:
3334
version: ${{ matrix.version }}
3435
arch: ${{ matrix.arch }}
@@ -48,3 +49,4 @@ jobs:
4849
- uses: codecov/codecov-action@v2
4950
with:
5051
files: lcov.info
52+

src/QuartoNotebookWorker/src/vendor/Requires/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Requires"
22
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
3-
version = "1.3.0"
3+
version = "1.3.1"
44

55
[deps]
66
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

src/QuartoNotebookWorker/src/vendor/Requires/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
For older versions of Julia, see https://github.com/MikeInnes/Requires.jl/blob/5683745f03cbea41f6f053182461173e236fdd94/README.md
44

5+
For Julia 1.9 and higher, Package Extensions is preferable;
6+
see
7+
[the Julia manual](https://docs.julialang.org/en/v1/manual/code-loading/#man-extensions).
8+
59
# Requires.jl
610

711
[![Build Status](https://travis-ci.org/MikeInnes/Requires.jl.svg?branch=master)](https://travis-ci.org/MikeInnes/Requires.jl)
@@ -58,6 +62,8 @@ if you wish to exploit precompilation for the new code.
5862

5963
In the `@require` block, or any included files, you can use or import the package, but note that you must use the syntax `using .Gadfly` or `import .Gadfly`, rather than the usual syntax. Otherwise you will get a warning about Gadfly not being in dependencies.
6064

65+
`@require`d packages can be added to the `test` environment of a Julia project for integration tests, or directly to the project to document compatible versions in the `[compat]` section of `Project.toml`.
66+
6167
## Demo
6268

6369
For a complete demo, consider the following file named `"Reqs.jl"`:

src/QuartoNotebookWorker/src/vendor/Requires/test/runtests.jl

Lines changed: 123 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -42,144 +42,140 @@ end
4242
end
4343
end
4444

45-
@testset "Requires" begin
46-
mktempdir() do pkgsdir
47-
local rm_CachedIncludeTest_submod_file
48-
cd(pkgsdir) do
49-
npcdir = joinpath("FooNPC", "src")
50-
mkpath(npcdir)
51-
cd(npcdir) do
52-
writepkg("FooNPC", false, false)
53-
end
54-
npcdir = joinpath("FooPC", "src")
55-
mkpath(npcdir)
56-
cd(npcdir) do
57-
writepkg("FooPC", true, false)
58-
end
59-
npcdir = joinpath("FooSubNPC", "src")
60-
mkpath(npcdir)
61-
cd(npcdir) do
62-
writepkg("FooSubNPC", false, true)
63-
end
64-
npcdir = joinpath("FooSubPC", "src")
65-
mkpath(npcdir)
66-
cd(npcdir) do
67-
writepkg("FooSubPC", true, true)
68-
end
69-
npcdir = joinpath("CachedIncludeTest", "src")
70-
mkpath(npcdir)
71-
cd(npcdir) do
72-
writepkg("CachedIncludeTest", true, true)
73-
submod_file = abspath("CachedIncludeTest_submod.jl")
74-
@test isfile(submod_file)
75-
rm_CachedIncludeTest_submod_file = ()->rm(submod_file)
76-
end
77-
end
78-
push!(LOAD_PATH, pkgsdir)
79-
80-
@eval using FooNPC
81-
@test !FooNPC.flag
82-
@eval using FooPC
83-
@test !FooPC.flag
84-
@eval using FooSubNPC
85-
@test !(:SubModule in names(FooSubNPC))
86-
@eval using FooSubPC
87-
@test !(:SubModule in names(FooSubPC))
88-
@eval using CachedIncludeTest
89-
# Test that the content of the file which defines
90-
# CachedIncludeTest.SubModule is cached by `@require` so it can be used
91-
# even when the file itself is removed.
92-
rm_CachedIncludeTest_submod_file()
93-
@test !(:SubModule in names(CachedIncludeTest))
94-
95-
@eval using Colors
96-
97-
@test FooNPC.flag
98-
@test FooPC.flag
99-
@test :SubModule in names(FooSubNPC)
100-
@test FooSubNPC.SubModule.flag
101-
@test :SubModule in names(FooSubPC)
102-
@test FooSubPC.SubModule.flag
103-
@test :SubModule in names(CachedIncludeTest)
104-
105-
cd(pkgsdir) do
106-
npcdir = joinpath("FooAfterNPC", "src")
107-
mkpath(npcdir)
108-
cd(npcdir) do
109-
writepkg("FooAfterNPC", false, false)
110-
end
111-
pcidr = joinpath("FooAfterPC", "src")
112-
mkpath(pcidr)
113-
cd(pcidr) do
114-
writepkg("FooAfterPC", true, false)
115-
end
116-
sanpcdir = joinpath("FooSubAfterNPC", "src")
117-
mkpath(sanpcdir)
118-
cd(sanpcdir) do
119-
writepkg("FooSubAfterNPC", false, true)
120-
end
121-
sapcdir = joinpath("FooSubAfterPC", "src")
122-
mkpath(sapcdir)
123-
cd(sapcdir) do
124-
writepkg("FooSubAfterPC", true, true)
125-
end
126-
end
45+
pkgsdir = mktempdir()
46+
cd(pkgsdir) do
47+
npcdir = joinpath("FooNPC", "src")
48+
mkpath(npcdir)
49+
cd(npcdir) do
50+
writepkg("FooNPC", false, false)
51+
end
52+
npcdir = joinpath("FooPC", "src")
53+
mkpath(npcdir)
54+
cd(npcdir) do
55+
writepkg("FooPC", true, false)
56+
end
57+
npcdir = joinpath("FooSubNPC", "src")
58+
mkpath(npcdir)
59+
cd(npcdir) do
60+
writepkg("FooSubNPC", false, true)
61+
end
62+
npcdir = joinpath("FooSubPC", "src")
63+
mkpath(npcdir)
64+
cd(npcdir) do
65+
writepkg("FooSubPC", true, true)
66+
end
67+
npcdir = joinpath("CachedIncludeTest", "src")
68+
mkpath(npcdir)
69+
cd(npcdir) do
70+
writepkg("CachedIncludeTest", true, true)
71+
submod_file = abspath("CachedIncludeTest_submod.jl")
72+
@test isfile(submod_file)
73+
global rm_CachedIncludeTest_submod_file = ()->rm(submod_file)
74+
end
75+
end
76+
push!(LOAD_PATH, pkgsdir)
77+
78+
using FooNPC
79+
@test !FooNPC.flag
80+
using FooPC
81+
@test !FooPC.flag
82+
using FooSubNPC
83+
@test !(:SubModule in names(FooSubNPC))
84+
using FooSubPC
85+
@test !(:SubModule in names(FooSubPC))
86+
using CachedIncludeTest
87+
# Test that the content of the file which defines
88+
# CachedIncludeTest.SubModule is cached by `@require` so it can be used
89+
# even when the file itself is removed.
90+
rm_CachedIncludeTest_submod_file()
91+
@test !(:SubModule in names(CachedIncludeTest))
92+
93+
using Colors
94+
95+
@test FooNPC.flag
96+
@test FooPC.flag
97+
@test :SubModule in names(FooSubNPC)
98+
@test FooSubNPC.SubModule.flag
99+
@test :SubModule in names(FooSubPC)
100+
@test FooSubPC.SubModule.flag
101+
@test :SubModule in names(CachedIncludeTest)
102+
103+
cd(pkgsdir) do
104+
npcdir = joinpath("FooAfterNPC", "src")
105+
mkpath(npcdir)
106+
cd(npcdir) do
107+
writepkg("FooAfterNPC", false, false)
108+
end
109+
pcidr = joinpath("FooAfterPC", "src")
110+
mkpath(pcidr)
111+
cd(pcidr) do
112+
writepkg("FooAfterPC", true, false)
113+
end
114+
sanpcdir = joinpath("FooSubAfterNPC", "src")
115+
mkpath(sanpcdir)
116+
cd(sanpcdir) do
117+
writepkg("FooSubAfterNPC", false, true)
118+
end
119+
sapcdir = joinpath("FooSubAfterPC", "src")
120+
mkpath(sapcdir)
121+
cd(sapcdir) do
122+
writepkg("FooSubAfterPC", true, true)
123+
end
124+
end
127125

128-
@eval using FooAfterNPC
129-
@eval using FooAfterPC
130-
@eval using FooSubAfterNPC
131-
@eval using FooSubAfterPC
126+
using FooAfterNPC
127+
using FooAfterPC
128+
using FooSubAfterNPC
129+
using FooSubAfterPC
132130

133-
pop!(LOAD_PATH)
131+
pop!(LOAD_PATH)
134132

135-
@test FooAfterNPC.flag
136-
@test FooAfterPC.flag
137-
@test :SubModule in names(FooSubAfterNPC)
138-
@test FooSubAfterNPC.SubModule.flag
139-
@test :SubModule in names(FooSubAfterPC)
140-
@test FooSubAfterPC.SubModule.flag
141-
end
142-
end
133+
@test FooAfterNPC.flag
134+
@test FooAfterPC.flag
135+
@test :SubModule in names(FooSubAfterNPC)
136+
@test FooSubAfterNPC.SubModule.flag
137+
@test :SubModule in names(FooSubAfterPC)
138+
@test FooSubAfterPC.SubModule.flag
143139

144140
module EvalModule end
145141

146142
@testset "Notifications" begin
147-
push!(LOAD_PATH, joinpath(@__DIR__, "pkgs"))
148-
@eval using NotifyMe
149-
150-
mktempdir() do pkgsdir
151-
ndir = joinpath("NotifyTarget", "src")
152-
cd(pkgsdir) do
153-
mkpath(ndir)
154-
cd(ndir) do
155-
open("NotifyTarget.jl", "w") do io
156-
println(io, """
157-
module NotifyTarget
158-
using Requires
159-
function __init__()
160-
@require Example="7876af07-990d-54b4-ab0e-23690620f79a" begin
161-
f(x) = 2x
162-
end
163-
end
143+
push!(LOAD_PATH, joinpath(@__DIR__, "pkgs"))
144+
using NotifyMe
145+
146+
pkgdir = mktempdir()
147+
ndir = joinpath("NotifyTarget", "src")
148+
cd(pkgsdir) do
149+
mkpath(ndir)
150+
cd(ndir) do
151+
open("NotifyTarget.jl", "w") do io
152+
println(io, """
153+
module NotifyTarget
154+
using Requires
155+
function __init__()
156+
@require Example="7876af07-990d-54b4-ab0e-23690620f79a" begin
157+
f(x) = 2x
164158
end
165-
""")
166159
end
167160
end
161+
""")
168162
end
169-
push!(LOAD_PATH, pkgsdir)
170-
@test isempty(NotifyMe.notified_args)
171-
@eval using NotifyTarget
172-
@test isempty(NotifyMe.notified_args)
173-
@eval using Example
174-
@test length(NotifyMe.notified_args) == 1
175-
nargs = NotifyMe.notified_args[1]
176-
@test nargs[1] == joinpath(pkgsdir, ndir, "NotifyTarget.jl")
177-
@test nargs[2] == NotifyTarget
178-
@test nargs[3] == "7876af07-990d-54b4-ab0e-23690620f79a"
179-
@test nargs[4] == "Example"
180-
Core.eval(EvalModule, nargs[5])
181-
@test Base.invokelatest(EvalModule.f, 3) == 6
182163
end
164+
end
165+
push!(LOAD_PATH, pkgsdir)
166+
@test isempty(NotifyMe.notified_args)
167+
using NotifyTarget
168+
@test isempty(NotifyMe.notified_args)
169+
using Example
170+
@test length(NotifyMe.notified_args) == 1
171+
nargs = NotifyMe.notified_args[1]
172+
@test nargs[1] == joinpath(pkgsdir, ndir, "NotifyTarget.jl")
173+
@test nargs[2] == NotifyTarget
174+
@test nargs[3] == "7876af07-990d-54b4-ab0e-23690620f79a"
175+
@test nargs[4] == "Example"
176+
Core.eval(EvalModule, nargs[5])
177+
@test Base.invokelatest(EvalModule.f, 3) == 6
183178

184-
pop!(LOAD_PATH)
185179
end
180+
181+
pop!(LOAD_PATH)

0 commit comments

Comments
 (0)