Report the message when versions cannot be compared - #1
Merged
ingydotnet merged 1 commit intoAug 2, 2026
Merged
Conversation
The :versions-not-comparable warning carried (str error). Hosts render warnings with pr-str, so that inlined the exception class and its ex-data on the JVM, and on Glojure it came out as #object[*lang.ExceptionInfo] with the message gone entirely. Carry (ex-message error) instead. The catch clause was also dead on Glojure, which resolves neither Exception nor Throwable: an incomparable pair panicked with an interface conversion error rather than warning and keeping the selected coordinate. Split it the way grenadine.test-support/throws? already does. Nothing covered that path, which is why it went unnoticed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
expand-depswarns and keeps the selected coordinate when:compare-versionsthrows, but the warning carried(str error). Callers render warnings as data withpr-str(cli.cljdoes), so on the JVM that inlined the exception class and its whole ex-data:On Glojure it was worse —
(str error)there is#object[*lang.ExceptionInfo], so the message was lost outright. Now it carries(ex-message error).While adding coverage for that path I found the
catchclause was dead on Glojure, which resolves neitherExceptionnorThrowable:So an incomparable pair panicked instead of warning.
grenadine.test-support/throws?already makes this split, sonewer?now makes it the same way withgo/any. Nothing exercised the incomparable path before, which is why it went unnoticed.Verified on all five runtimes — clj, bb, glj, jolt, lg — 130 assertions, 0 failures each, plus
make test-cli(53 checks) to confirm the reader conditional survivesstage-sourcesrenaming.cljcto.cljfor the Go build.One related thing I did not fix here:
repo.cljc'slatest-versionhas the same unresolvable(catch Exception ...), so on Glojure malformed metadata escapes as a raw host panic rather than:grenadine.repo/invalid-metadata.rejects-missing-and-invalid-metadatapasses there only becausethrows?cannot tell a panic from a throw. Adding thego/anybranch fixes the panic, but the wrapper's ex-data still does not survive on Glojure for reasons I could not pin down in that call shape, so I left it out rather than ship a half-diagnosed change. Happy to open it separately.