Skip to content

Commit 5a7b958

Browse files
mtfishmanclaude
andauthored
IntegrationTest: catch ResolverError for URL-based downstreams (#80)
## Summary The `try/catch Pkg.Resolve.ResolverError` wrapper was only around the registered-package branch of `IntegrationTest.yml`. URL-based downstreams (unregistered / private packages specified as `https://...` or `git@...`) ran `Pkg.add(url=pkg)` / `Pkg.develop(".")` / `Pkg.update()` with no error handling, so a breaking change in the PR that the downstream's compat didn't allow failed the job instead of being reported as an intentional SemVer-breaking change. This PR hoists the existing `try/catch` up to cover the full `if/else`, so both branches share one resolver-error exit (the "not compatible with this release — no problem" path). No other behavior changes. Surfaced by [ITensor/ITensorNetworks.jl#327](ITensor/ITensorNetworks.jl#327), where the Tennis.jl downstream (passed as a URL) failed with `ResolverError` after the PR bumped ITensorNetworks to 0.16.0. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e9999c6 commit 5a7b958

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/IntegrationTest.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ jobs:
7979
end
8080
end
8181
pkg = "${{ inputs.pkg }}"
82-
if startswith(pkg, "https://") || startswith(pkg, "git@")
83-
# URL: unregistered or private package, skip version-pinning.
84-
pkg_name = replace(basename(pkg), r"\.jl$" => "")
85-
Pkg.add(PackageSpec(; url=pkg))
86-
Pkg.develop(PackageSpec(; path="."))
87-
Pkg.update()
88-
Pkg.test(PackageSpec(; name=pkg_name))
89-
else
90-
try
82+
try
83+
if startswith(pkg, "https://") || startswith(pkg, "git@")
84+
# URL: unregistered or private package, skip version-pinning.
85+
pkg_name = replace(basename(pkg), r"\.jl$" => "")
86+
Pkg.add(PackageSpec(; url=pkg)) # resolver may fail with main deps
87+
Pkg.develop(PackageSpec(; path=".")) # resolver may fail with main deps
88+
Pkg.update()
89+
Pkg.test(PackageSpec(; name=pkg_name)) # resolver may fail with test time deps
90+
else
9191
Pkg.add(PackageSpec(; name=pkg))
9292
# Determine the version that gets installed in order to detect
9393
# if the package is forced to downgrade.
@@ -100,12 +100,12 @@ jobs:
100100
# to see if there is a compatibility issue.
101101
Pkg.add(PackageSpec(; name=pkg, version=version))
102102
Pkg.test(PackageSpec(; name=pkg)) # resolver may fail with test time deps
103-
catch err
104-
err isa Pkg.Resolve.ResolverError || rethrow()
105-
# If we can't resolve that means this is incompatible by SemVer and this is fine
106-
# It means we marked this as a breaking change, so we don't need to worry about
107-
# Mistakenly introducing a breaking change, as we have intentionally made one
108-
@info "Not compatible with this release. No problem." exception=err
109-
exit(0) # Exit immediately, as a success
110103
end
104+
catch err
105+
err isa Pkg.Resolve.ResolverError || rethrow()
106+
# If we can't resolve that means this is incompatible by SemVer and this is fine
107+
# It means we marked this as a breaking change, so we don't need to worry about
108+
# Mistakenly introducing a breaking change, as we have intentionally made one
109+
@info "Not compatible with this release. No problem." exception=err
110+
exit(0) # Exit immediately, as a success
111111
end

0 commit comments

Comments
 (0)