All work
- Add missing :added metadata to 1.12 functionsCLJ-2906
- Extend deref to Optional and default behaviorCLJ-2905
- deftypes with mutable fields cannot be compiled to constantsCLJ-2904
- gen-class breaks after requiring clojure.core at runtimeCLJ-2903Resolved issue: CLJ-2903
- pprint prints arbitary objects in unreadable formCLJ-2902
- bytes, shorts, chars functions have docstring typosCLJ-2901
- `for` and `doseq` expand body twiceCLJ-2900
- Clojure 1.12.0 changed behavior of qualified symbol in invocation position for shadowed nameCLJ-2899
- Objects that are both IFn and FI unnecessarily get converted to FICLJ-2898
- When using remote prepl server, *repl* is false, preventing use of add-lib etcCLJ-2897
- clojure.zip/next calls zip/up 3 times instead of onceCLJ-2896
- Reader tag for PersistentQueueCLJ-2895
- Remote connections to a prepl server have *repl* bound to false.CLJ-2894
- future-io, future-computeCLJ-2893
- Remove uses of Java's security manager, which is going awayCLJ-2892Jarrod Taylor
- clojure bytecode is not verifiable past Java 8CLJ-2891Alex Miller
- Update link to edn-format.orgCLJ-2890
- Fix formatting of exception on clojure.mainCLJ-2889
- gen-class doesn't support new array class symbol syntaxCLJ-2888
- Speed up count by accounting for ChunkedSeqCLJ-2887
- add-libs is not properly removing non-procurer keys from the procurer map in the tool invocationCLJ-2886
- seque forces n+2 items ahead of consumer instead of nCLJ-2885
- Mismatch recur arg message prints file name, not file pathCLJ-2884
- Reflector.getMethods() incorrectly returns bridge method with covariant return type, making calls reflectiveCLJ-2883
- Rebinding clojure.test/report function loses reporter multimethod extensionsCLJ-2882
- asm-type function doesn't properly handle array class symbolsCLJ-2881Resolved issue: CLJ-2881
- FI-adapted Clojure functions are not serializableCLJ-2880
- dedupe docstring does not state that it returns a stateful transducer (like others)CLJ-2879
- [spec] `(s/explain-data (s/coll-of any? :count 1) (range))` hangsCLJ-2878
- Comparison operator docstrings say "Returns non-nil" instead of just "Returns true"CLJ-2877
- `newline` does not respect `*flush-on-newline*`CLJ-2876
- clojure.pprint/pprint converts unquote+deref to unquote-splicingCLJ-2875
- Can't create function with the specific arglist [&form]CLJ-2874
- add-lib doesn't reload *data-readers*CLJ-2873Resolved issue: CLJ-2873
- Moving to newer JVM base version (from 8)CLJ-2872
- Static methods cannot be used as method values if there is a static field of the same nameCLJ-2871
- Exception phase during top-level eval is miscategorizedCLJ-2870
- Improve docstring of 'for' and 'doseq' about :whileCLJ-2869
- Can't specify integer elements in Java annotations on deftypeCLJ-2868
- QMEs do not convey tag hintsCLJ-2867Resolved issue: CLJ-2867
- Error while reading process output can cause blocking of process completionCLJ-2866
- clojure.java.process/start return implements IBlockingDeref incorrectlyCLJ-2865Resolved issue: CLJ-2865
- Should not use truthy return logic in FI adaptersCLJ-2864Resolved issue: CLJ-2864
- Reflective FI dynamic adapter uses Compiler.LOADER which may not be boundCLJ-2863Resolved issue: CLJ-2863
- Clojure 1.12 changelog updateCLJ-2862Resolved issue: CLJ-2862Alex Miller
- Locals clearing + forcing a delay recursively results in NPECLJ-2861
- Directly adapt qualified method expression passed as SAM interfaceCLJ-2860Alex Miller
- Expand scope of FI adapting to include Supplier (and other 0 arg FI)CLJ-2859Resolved issue: CLJ-2859Michael Fogus
- FnInvokers return type encoding should not include prim return types for arity>2CLJ-2858Resolved issue: CLJ-2858
- Instance objects could be FI adapted, like we adapt method parametersCLJ-2857
50 of
contains? broken for transient collections
Completed
Description
Environment
None
Attachments
13
Details
Assignee
Rich HickeyRich HickeyReporter
Herwig HochleitnerHerwig HochleitnerLabels
Approval
OkPatch
Code and TestPriority
CriticalAffects versions
Fix versions
Details
Details
Assignee
Rich Hickey
Rich HickeyReporter
Herwig Hochleitner
Herwig HochleitnerLabels
Approval
Ok
Patch
Code and Test
Priority
Affects versions
Fix versions
Created January 2, 2011 at 1:58 AM
Updated October 6, 2017 at 9:40 PM
Resolved October 6, 2017 at 9:40 PM
Activity
Show:
Alex MillerOctober 4, 2017 at 2:37 PM
Erik, re - no, that's a separate issue.
Alex MillerOctober 4, 2017 at 2:36 PM
Re -11 additions, by adding a method to ITransientAssociative, you have broken all external implementers (which includes several contrib library data structures and from glancing at github, many others). Maybe should make ITransientAssociative2 with the added method instead?
Erik AssumSeptember 28, 2017 at 7:48 PM
Does this solve as well?
Alex MillerSeptember 26, 2017 at 10:21 PM
Added -10 which sorts transient cases to the end of the checks.
Stuart HallowaySeptember 25, 2017 at 6:27 PM
If we are not going to get to the type hierarchy change any time soon, and if perf is acceptable (looks like it should be), I think we should consider applying the "RT knows about transients" approach in the current patch.
Behavior with Clojure 1.6.0:
Cause: This is caused by expectations in clojure.lang.RT regarding the type of collections for some methods, e.g. contains() and getFrom(). Checking for contains looks to see if the instance passed in is Associative (a subinterface of PersistentCollection), or IPersistentSet.
Approach: Expand the types that RT.getFrom(), RT.contains(), and RT.find() can handle to cover the additional transient interfaces.
Alternative: Other older patches (prob best exemplified by clj-700-8.diff) restructure the collections type hierarchy. That is a much bigger change than the one taken here but is perhaps a better long-term path. That patch refactors several of the Clojure interfaces so that logic abstract from the issue of immutability is pulled out to a general interface (e.g. ISet, IAssociative), but preserves the contract specified (e.g. Associatives only return Associatives when calling assoc()). With more general interfaces in place the contains() and getFrom() methods were then altered to conditionally use the general interfaces which are agnostic of persistence vs. transience.
Screening Notes re -10 patch
the extra conditions in RT add branches to some key functions.
get
already has agetFrom
optimization, but there is no similarcontainsFrom
orfindFrom
. Is it worth measuring the possible impact of these?I believe the interface refactoring approach (not taken here) is worth separate consideration as an enhancement. If this is done, I think leveraging
valAt
would be simpler, e.g. allowingHashMap
andArrayMap
to share codeit is not evident (to me anyway) why some API fns consume
ILookup
and others do not, among e.g.contains?
,get
, andfind
. Possible doc enhancement?there is test code already in place (data_structures.clj) that could easily be expanded to cover transients. It would be nice to do this, or better yet get some test.check tests in place
Patch: clj-700-14.patch is based on clj-700-10, plus implements Rich's suggestion that entryAt and containsKey should live in ITransientAssociative2 and the existing concrete impls (ATransientMap, TransientVector) now implement it.