test(phel): mark intentional Phel divergences with :phel branches#19
Open
Chemaclass wants to merge 1 commit into
Open
test(phel): mark intentional Phel divergences with :phel branches#19Chemaclass wants to merge 1 commit into
Chemaclass wants to merge 1 commit into
Conversation
Phel's reader resolves :phel (else :default). Add :phel reader-conditional branches documenting where Phel deliberately diverges from JVM Clojure on bad-shape / edge input, so the suite is green under Phel without masking behavior. Builds on #16 (parse-*) and #18 (string_test); covers the remaining core_test divergences: - nil-safe / structural returns where Clojure throws (key/val, realized?, < <= > >=, min-key/min/max, compare collections, peek/last/ffirst/fnext, empty?/not-empty, shuffle/sort-by/case/merge/update/remove/take-nth/map/ conj/set/select-keys/reverse/keys/vals, nth/nthnext/take/drop/count/ contains?/partial, keyword/symbol/intern); transients unguarded. - odd?/even? operate on any number (no integer check) -> kept lenient. - numeric tower (Bucket B): no auto bigint-promote/overflow in * + - and int/long/float/double/byte/rem/quot/mod; numerator/denominator int->n/1. Suite green under Phel: 5477/5477. Related to phel-lang#2223.
c8ec936 to
5dab45d
Compare
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.
Summary
Adds
:phelreader-conditional branches documenting where Phel deliberately diverges from JVM Clojure on bad-shape / edge input, so the suite runs green under Phel (5487/5487) without masking behavior or weakening other dialects. Phel's reader resolves:pheland otherwise falls back to:default, so these branches are additive —:clj/:cljs/:lpy/:bb/:defaultare untouched.Triaged for phel-lang#2223. Per-bucket judgment (not blanket-fix): real bugs are fixed in phel-lang core (#2224 coercion/keys, #2226 string-fn null handling); the cases here are intentional divergences kept lenient by design.
What changed (
:phelbranches assert Phel's actual behavior)Lenient / nil-safe / structural returns where Clojure throws:
parse-long/-double/-boolean/-uuid(nil),key/val,realized?,< <= > >=,min-key/min/max,compareon collections,peek/last/ffirst/fnext,empty?/not-empty,shuffle/sort-by/case/merge/update/remove/take-nth/map/conj/set/select-keys/reverse/keys/vals,nth/nthnext/take/drop/count/contains?/partial,keyword/symbol/intern. Transients are unguarded (no use-after-persistent!check; non-bang ops permitted) → skipped like:lpy.Kept lenient by maintainer decision:
odd?/even?operate on any number (no integer check);compareon collections.Numeric tower (Bucket B): no automatic bigint promotion / overflow throw in
* + -,int/long/float/double/byte/rem/quot/mod;numerator/denominatortreat ints asn/1. Asserted values are arithmetically correct — Phel just doesn't raise the JVM overflow exception.phel.string throws on non-string (phel-lang#2226):
starts-with?/ends-with?/upper-case/lower-case/capitalize/blank?assert the throw under:phel.Verification
composer testunder Phel (local phel checkout): Passed 5487 / Failed 0 / Error 0.Related to phel-lang#2223.