Skip to content

Commit 1b97c6e

Browse files
Propagate downstream resolver failures
Co-Authored-By: Chris Rackauckas <[email protected]>
1 parent 66e472e commit 1b97c6e

2 files changed

Lines changed: 10 additions & 14 deletions

File tree

‎.github/workflows/downstream.yml‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,9 @@ jobs:
107107
error("No downstream Project.toml at $downstream_project")
108108
Pkg.activate(downstream_project)
109109
@info "Selected downstream project" downstream_project
110-
try
111-
# force it to use this PR's version of the package
112-
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
113-
Pkg.update()
114-
Pkg.test(coverage=${{ inputs.coverage }}) # resolver may fail with test time deps
115-
catch err
116-
err isa Pkg.Resolve.ResolverError || rethrow()
117-
118-
# If we can't resolve that means this is incompatible by SemVer and this is fine
119-
# It means we marked this as a breaking change, so we don't need to worry about
120-
# Mistakenly introducing a breaking change, as we have intentionally made one
121-
@info "Not compatible with this release. No problem." exception=err
122-
exit(0) # Exit immediately, as a success
123-
end
110+
Pkg.develop(PackageSpec(path="."))
111+
Pkg.update()
112+
Pkg.test(coverage=${{ inputs.coverage }})
124113
125114
- uses: julia-actions/julia-processcoverage@v1
126115

‎test/runtests.jl‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,13 @@ end
490490
@test first(activate_at) < first(develop_at) < first(test_at)
491491
end
492492

493+
@testset "downstream.yml propagates resolver failures" begin
494+
txt = read(joinpath(@__DIR__, "..", ".github", "workflows", "downstream.yml"), String)
495+
@test !occursin("Pkg.Resolve.ResolverError", txt)
496+
@test !occursin("Not compatible with this release", txt)
497+
@test !occursin("exit(0)", txt)
498+
end
499+
493500
# A 32-bit (x86/i686) Julia leg needs the i386 loader + C/C++ runtime installed
494501
# BEFORE setup-julia runs julia, or the run dies with `spawn .../x86/bin/julia
495502
# ENOENT`. Assert tests.yml has that install step, gates it on a 32-bit arch on

0 commit comments

Comments
 (0)