test(phel): mark lenient core-fn divergences (suite green under Phel)#20
Merged
Conversation
Phel is intentionally lenient where Clojure throws on bad-type input (nil-punning DX): predicates/arith/collection fns return a value (nil/false/0/identity) or coerce instead of throwing. Add :phel reader conditional branches asserting Phel's actual behavior, mirroring the existing :cljs/:lpy/:cljr stance and the parse-*/string divergence commits. Other dialects' branches are untouched. Also drop a stale :phel marker in repeatedly (Phel now matches :default for mid-failure side effects). Brings the phel run of the suite to 0 failures.
Follow-up to the lenient-divergence batch, paired with phel-lang's transient/persistent! fix: - assoc!/conj!/dissoc!/disj!/pop! after persistent!, and persistent! twice, now throw in Phel, so drop the lenient :phel markers in the *_bang tests and let the :default (throws) assertions run. - conj_bang: drop the stale :phel [] skip for 'cannot conj! after persistent!'. case stays lenient (returns nil on no-match without default) because Phel's own test runner and core rely on it; that :phel marker is kept.
phel-lang#2228 (merged to main after this batch was triaged) makes the ordered comparisons and the predicates/fns built on them reject nil: - <, <=, >, >=: drop the lenient :phel markers; phel now matches :default (throws) - neg?, pos?: nil throws (matches :lpy); false/true still coerce - min, max: nil throws (matches :lpy); strings still compare lexicographically
Chemaclass
added a commit
to phel-lang/phel-lang
that referenced
this pull request
May 29, 2026
The suite now runs 0 failures against main (#2229 fixed the real bugs; phel-lang/clojure-test-suite#20 marked the intentional :phel divergences), so drop the soft-gate: - add a pull_request trigger so the job reports on PRs - remove continue-on-error (failures now fail the job) - pin the suite checkout to the merged suite SHA (7d3db18b) for reproducible PR/push runs; the nightly cron keeps tracking main to surface upstream drift Relates to #2223.
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.
What
Adds
:phelreader-conditional branches across 71 core-test namespaces so the suite runs 0 failures under Phel (was 209).Phel is intentionally lenient where Clojure throws on bad-type input (nil-punning DX): predicates, arithmetic, and collection fns return a value (
nil/false/0/identity) or coerce the argument instead of throwing. Each:phelbranch asserts Phel's actual behavior, with a;;comment documenting the divergence, mirroring the existing:cljs/:lpy/:cljrstance and the priorparse-*/ string-strict divergence commits (#16, #18).Other dialects' branches (
:default/:clj/:cljs/:lpy/:cljr) are untouched — every restructured assertion keeps its original form under:default.Categories marked
key/val/keys/vals/peek/empty?/not-empty/realized?/min-key/select-keys/descendants/contains?returnnil/falseinstead of throwing.even?/odd?/zero?/pos?/neg?/</<=/>/>=/quot/rem/mod/min/maxcoercenil->0 or follow PHP/IEEE float semantics.+/-/*///int/long/bytesilently promote on overflow (no BigInt throw).\ais a 1-char string, somap/count/reverse/fnext/ffirst/set/lasttreat it as seqable.*!afterpersistent!don't throw.repeatedlymid-failure now matches:default.Phel-side follow-up (flagged, non-blocking)
Marked
:phelto keep the suite green, but worth deciding whether Phel should tighten:casewith no matching clause and no default returnsnilinstead of erroring.SequenceGenerator::toIterable(),is_nan()deprecation) rather than clean Phel errors.Result