Update dependency org.clojure:clojure to v1.11.1 #22
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.
This PR contains the following updates:
1.9.0
->1.11.1
Release Notes
clojure/clojure
v1.11.1
Pin serialVersionUID for Keyword and ArraySeq back to 1.10.3 values to retain binary serialization
v1.11.0
1 Compatibility
1.1 Security
Because XML external entity (XXE) attacks can be used to disclose local files using file schemes or relative paths in the system identifier,
clojure.xml/parse
now disables external entity processing by default.See: https://owasp.org/www-community/vulnerabilities/XML_External_Entity\_(XXE)\_Processing
This change disables the following SAX parser features:
http://apache.org/xml/features/nonvalidating/load-external-dtd
http://xml.org/sax/features/external-general-entities
http://xml.org/sax/features/external-parameter-entities
If you rely on these features, modify your calls to
clojure.xml/parse
to explicitlysupply
startparse-sax
function as the final argument:(clojure.xml/parse the-string clojure.xml/startparse-sax)
This modification also works on prior Clojure versions.
1.2 Dependencies
Updated dependencies:
2 Features
2.1 Keyword argument functions take a trailing map
Keyword arguments are optional trailing variadic arguments of the form akey aval bkey bval....
In Clojure 1.11, functions taking keyword arguments can now be passed a map instead of or in addition
to and following the key/value pairs. When a lone map is passed, it is used for destructuring, else
a trailing map is added to the key/value pair map by
conj
.Also see: https://clojure.org/news/2021/03/18/apis-serving-people-and-programs
2.2
:as-alias
inrequire
Spec (and other libs) rely on qualified keywords as spec names.
Namespace aliasing in
ns
makes long names shorter but required namespaces to be loadable.This change adds
:as-alias
torequire
, which is like:as
but does not require the namespace to load.3 New functions and namespaces
3.1 clojure.math and numeric helper functions
Added a new clojure.math namespace which provides wrappers for the functions available in java.lang.Math.
These functions are narrowed to only
long
anddouble
overloads and provide primitive support without reflection.In addition, the following functions were added to clojure.core:
abs
- absolute value in optimized form for all Clojure numeric types (long, double, ratio, bigint, bigdecimal)NaN?
- predicate for doubles to check whether "not a number"infinite?
- predicate for doubles to check whether positive or negative infinityCLJ-2668 Add NaN? and infinite? predicates
CLJ-2664 Add clojure.java.math namespace, wrappers for java.lang.Math
CLJ-2673 Add
abs
, and updatemin
andmax
to use Math impls when possibleCLJ-2677 clojure.math - fix method reflection in bodies and inlines, fix docstrings, renamed
CLJ-2689 Fix clojure.math tests to be more tolerant of floating point comparisons
3.2 Parser functions
Added the following parsing functions to clojure.core:
parse-double
- parses floating point number, including scientific notationparse-long
- parses integer in long rangeparse-boolean
- parses"true"
or"false"
to the canonical boolean valuesparse-uuid
- parses a UUID string to java.util.UUIDAll of these functions expect a string argument and return either the parsed value or
nil
if the valueis in invalid format.
3.2
random-uuid
Added
random-uuid
, a function to construct a random java.util.UUID.3.3
update-keys
andupdate-vals
Added:
update-keys
- applies a function to every key in a map,m f => {(f k) v ...}
update-vals
- applies a function to every value in a map,m f => {k (f v) ...}
CLJ-1959 Add implementation of update-keys
CLJ-2651 Add implementation of update-vals
3.4
iteration
Added
iteration
, to repeatedly apply a (possibly impure) step function with continuation state.This can be used e.g. to consume APIs that return paginated or batched data.
iteration
generator functioniteration
docstring and arg namesiteration
generative test failure4 Fixes
4.1 Compiler
defprotocol
4.2 Core
=
not terminating when called with infinite sequencecase
expressions on symbolsrealized?
ofdelay
on pending resultsome-fn
andevery-pred
for 3 predicate case to match other unrollingsinto
completion sohalt-when
works4.3 Performance
map-invert
should usereduce-kv
and transient*clojure-version*
4.4 Error messages
Compiler.load()
4.5 Docstrings
get
docstring regarding sets, strings, arrays, ILookupreify
docstringclojure.string/split
docstring regarding trailing empty partstest-vars
docstring4.6 Other enhancements
browse-url
hanging on call to xdg-openrun-test
andrun-test-var
to run single test with fixtures and report:actual
form in:pass
maps:exception
:val
s inprepl
v1.10.3
1 Changes reverted
Improve error message for case
2 Fixes
Enable reader conditionals in Clojure prepl
v1.10.2
1 Dependencies
Updated dependencies:
2 Fixes
2.1 Interop / JVM
Ensure monitor object is on stack, for verifiers
More fixes for invocation of static interface methods with primitive args
Remove uses of deprecated Class.newInstance()
Fix javadoc urls for JDK 11+
Add Throwable return type hint to ex-cause
Avoid reflection in clojure.data
Fix reflection warnings in clojure.stacktrace/print-stack-trace
proxy should emit Java 1.8 bytecode
2.2 Core
Fix case expression branch analysis that resulted in compilation error
Improve error message for case
nth with not-found on regex matcher returns not-found on last group index
vector-of does not implement equals or hashing methods
vector-of does not implement IObj for metadata
quoted metadata on empty literal colls is lost
ExceptionInInitializerError if jars executed with java -jar
2.3 Printing
Fix errors in printing some maps with namespace syntax
pprint doesn't print collection metadata when
*print-meta*
is true2.4 Docstrings
Eliminate duplicate doc string printing for special forms
prepl docstring is incorrect
conj has out-of-date :arglists
3 Performance
Use transient map in zipmap
v1.10.1
1 Features and Major Changes
1.1 Workaround Java Performance Regression When Loading user.clj
Recent builds of Java 8 (u202), 11 (11.0.2), 12, and 13 included
some changes that drastically affect
optimization performance of calls from static initializers to static fields.
Clojure provides support for loading code on startup from a user.clj file and this
occurred in the static initializer of the Clojure runtime (RT) class and was thus
affected.
This issue may eventually be resolved in Java, but in Clojure we have
modified runtime initialization to avoid loading user.clj in a static
initializer, which mitigates the case where this caused a performance
degradation.
Significant performance regression of code loaded in user.clj in Java 8u202/11.0.
1.2 clojure.main Error Reporting
clojure.main is frequently used as a Clojure program launcher by external tools.
Previously, uncaught exceptions would be automatically printed by the JVM, which
would also print the stack trace.
This release will now catch exceptions and use the same error triage and printing
functionality as the Clojure repl. The full stack trace, ex-info, and other
information will be printed to a target specified by the configuration.
The three available error targets are:
These error targets can be specified either as options to clojure.main, or as
Java system properties (flags take precedence). When invoking clojure.main
(or using the clj tool), use
--report <target>
. For Java system property,use
-Dclojure.main.report=<target>
.Improve error printing in clojure.main with -m, -e, etc
Put error report location on its own line
Provide more options for error reporting in clojure.main
2 Fixes
Some compiler expr evals report as wrong error phase
Updated fragile tests so Clojure test suite runs on Java 12
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.