Skip to content

Releases: JuliaEditorSupport/JuliaFormatter.jl

v2.8.3

Choose a tag to compare

@github-actions github-actions released this 15 Jun 19:36
88ba91b

JuliaFormatter v2.8.3

Diff since v2.8.2

Fixed a bug where formatting of ranges (e.g. a:b) was not idempotent when either side was being parenthesised. (#1118, #1119)

Extended the v2.8.2 bugfix for parenthesised callers to include function definitions with where clauses. (#1114, #1119)

Closed issues:

  • callable struct idempotence (#1114)
  • range indexing idempotence (#1118)

v2.8.2

Choose a tag to compare

@github-actions github-actions released this 15 Jun 17:34
d31301b

JuliaFormatter v2.8.2

Diff since v2.8.1

Fixed a bug where JuliaFormatter would insert newlines around a parenthesised caller in a function definition, causing the function to be parsed differently on Julia 1.12.
This is probably a Julia bug and not really JuliaFormatter's fault, but this patch works around it. (#1114, #1117)

Merged pull requests:

Closed issues:

  • callable struct idempotence (#1114)

v2.8.1

Choose a tag to compare

@github-actions github-actions released this 15 Jun 16:06
322a3fb

JuliaFormatter v2.8.1

Diff since v2.8.0

Fixed a bug causing line comments inside array literals to be dropped or otherwise cause non-idempotent formatting. (#1113, #1115, #1116)

Merged pull requests:

Closed issues:

  • comments in array literals are utterly messed up (#1113)
  • hcat idempotence (#1116)

v2.8.0

Choose a tag to compare

@github-actions github-actions released this 14 Jun 22:06
3199b2e

JuliaFormatter v2.8.0

Diff since v2.7.0

Fixed a bug causing lack of idempotence in typed comprehension expressions (i.e., things like T[expr for x in y]). (#1105, #1106)

Fixed a bug causing lack of idempotence when using surround_whereop_typeparameters=true (when the { and } were inserted, line breaks were not initially being allowed next to them, but would be allowed on the second parse). (#1107, #1106)

Fixed a bug causing lack of idempotence when in / = / were being converted inside a for-expression (the change in character length was not being accounted for in nesting decisions). (#1108, #1106)

Added a new formatting option, v2_stable_multiline_strings, which aims to guarantee formatting idempotence with multiline strings.
By default this option is not enabled as it will lead to some changes in the formatting of expressions containing multiline strings: you must opt into it.
Please see the documentation for more information. (#1109, #1110)

Merged pull requests:

Closed issues:

  • JuliaLang/julia@v1.12.6 Idempotence 1 (#1105)
  • julia@v1.12.6 idempotence bug 2 (#1107)
  • julia@v1.12.6 idempotence 3 (#1108)
  • julia@1.12.6 idempotence 4 (#1109)

v2.7.0

Choose a tag to compare

@github-actions github-actions released this 13 Jun 20:45
9bcce68

JuliaFormatter v2.7.0

Diff since v2.6.15

Improved usage messages for the jlfmt command-line tool. (#1098)

Added the ability to format only specific lines of a file, either via the --lines option to jlfmt, or the lines keyword argument to format_text(). (#191, #1099, #1100)

Merged pull requests:

  • app: Clarify jlfmt check guidance for multiple inputs (#1098) (@aviatesk)
  • Support line-range formatting (lines kwarg and jlfmt --lines) (#1100) (@aviatesk)
  • Declare docs and test as Pkg workspace projects (#1101) (@aviatesk)

Closed issues:

  • Partial code formatting (#191)
  • Support line-range formatting (jlfmt --lines, multiple ranges) for partial / diff-based formatting (#1099)

v2.6.15

Choose a tag to compare

@github-actions github-actions released this 13 Jun 00:50
8c20af4

JuliaFormatter v2.6.15

Diff since v2.6.14

Fixed a bug where the combination of always_use_return and short_circuit_to_if would silently change the meaning of a programme. (#887, #1096)

Fixed a bug where short_circuit_to_if would fire inside the condition of a while loop, leading to invalid code. (#940, #1096)

Fixed a bug where if an entire file was sandwiched in #! format: off and #! format: on comments but contained additional whitespace/comments after the final #! format: on, the file's contents would be deleted. (#949, #1097)

Merged pull requests:

Closed issues:

  • always_use_return and `short_circuit_to_if`` bug (#887)
  • short_circuit_to_if=true behaves oddly when chaining conditions with && inside while condition (#940)
  • format: off deletes marked source code if a trailing whitespace is present (#949)

v2.6.14

Choose a tag to compare

@github-actions github-actions released this 12 Jun 18:30
c4e6e49

JuliaFormatter v2.6.14

Diff since v2.6.13

Fixed a bug where placing a comment after a do keyword would cause non-idempotent formatting. (#1088, #1090)

Fixed lack of idempotence on generator expressions that contained block elements. (#897, #941, #1048, #1092)

Fixed a bug where formatting generator expressions that contained block elements with SciMLStyle would cause the for ... in ... to be glued to the end of the block, leading to unparseable code. (#1092)

Merged pull requests:

Closed issues:

  • Running format twice produces different output (#897)
  • not idempotent on long generator expression (#941)
  • Fails to format julia@1.12.6 (#1024)
  • Generator expression not idempotent (#1048)
  • Make a 'known issues' or FAQ page (#1059)
  • Do-block lack of idempotence (#1088)

v2.6.13

Choose a tag to compare

@github-actions github-actions released this 11 Jun 15:27
a8f0ced

JuliaFormatter v2.6.13

Diff since v2.6.12

Fixed a bug where JuliaFormatter would insert trailing commas after expressions that had macros or global keywords, leading to syntactically invalid Julia code. (#1017, #1086)

Merged pull requests:

Closed issues:

  • Incorrect formatting of using EllipsisNotation: :.. (#866)
  • Formatting fails for anon function with @. (#1017)

v2.6.12

Choose a tag to compare

@github-actions github-actions released this 11 Jun 12:39
7897abe

JuliaFormatter v2.6.12

Diff since v2.6.11

Fixed a bug where ;;\n separators in rows of array literals were being converted to ;;, leading to invalid Julia code. (#1080, #1083)

Fixed a bug where comments inside array literals caused non-idempotent formatting with SciML and YAS styles. (#1082, #1083)

Merged pull requests:

Closed issues:

  • HTML inside Markdown not formatted correctly, leads to errors. (#666)
  • Enhancement: Allow selective longer lines (#697)
  • remove_extra_newlines=true sometimes removes newlines that are not extra (#705)
  • Inconsistent line breaks with binary operators (#739)
  • Make default nesting in SciML style more readable (#741)
  • Type assertion error when formatting a file (#742)
  • Feature request: maintain absent whitespace around binary operations (#780)
  • Long and cumbersome unfolding of arrays (#787)
  • Parameter to disable margin constraints? (#836)
  • Yet another ncat/hcat bug (#1080)
  • SciMLStyle fails with comments in array literal (#1082)

v2.6.11

Choose a tag to compare

@github-actions github-actions released this 09 Jun 22:56
440db8e

JuliaFormatter v2.6.11

Diff since v2.6.10

Fixed a bug where linebreaks were not preserved in the middle of a chain of binary operators when a comment was present (e.g. a + # comment\n b + c), causing any part of the chain after the comment to be lost. (#1076, #1077)

Fixed a bug where formatting <:(X, Y), <:(args...), or the equivalent with >: would fail. (#1078, #1079, #1077)

Merged pull requests:

Closed issues:

  • Fails to format comment in the middle of a chain (#1076)
  • Fails to format <:(A, B) (#1078)
  • Fails to format <:(args...) (#1079)