Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump JuliaSyntax to 0.4.6 #50928

Merged
merged 1 commit into from
Aug 18, 2023
Merged

Bump JuliaSyntax to 0.4.6 #50928

merged 1 commit into from
Aug 18, 2023

Conversation

c42f
Copy link
Member

@c42f c42f commented Aug 15, 2023

This is just a minor update fixing several small but annoying bugs people have noticed since JuliaSyntax was integrated.

@oscardssmith oscardssmith added the parser Language parsing and surface syntax label Aug 15, 2023
@JeffBezanson JeffBezanson added the backport 1.10 Change should be backported to the 1.10 release label Aug 15, 2023
@JeffBezanson
Copy link
Member

fixes #50703

@c42f
Copy link
Member Author

c42f commented Aug 15, 2023

Yes, that's one of the more annoying ones which people have encountered several times now. There's a couple of other bugs I haven't got to yet so there may be a bump to 0.4.7 at some point soon. But I figured I'd better put this out there!

Interesting to note that most of the bugs people have been finding are in JuliaSyntax's implementation of the hook for Meta.parse(), not in JuliaSyntax's "primary" API parsestmt() etc. So more fuzz testing of the hook implementation would be worthwhile.

@Seelengrab
Copy link
Contributor

Seelengrab commented Aug 15, 2023

This already includes JuliaLang/JuliaSyntax.jl#320 (see here), which (as far as I can tell) is for supporting the public keyword, which has not yet been merged into the Julia repo. A backport to 1.10 seems unwise, as the feature freeze is long over.

@lgoettgens
Copy link
Contributor

fixes #50703

How does that affect #50703, while the initial issue JuliaLang/JuliaSyntax.jl#332 isn't resolved yet?

@JeffBezanson
Copy link
Member

The example in that issue is also fixed; I don't know why the issue was not closed. Maybe it can be.

@Seelengrab Seelengrab removed the backport 1.10 Change should be backported to the 1.10 release label Aug 18, 2023
@Seelengrab
Copy link
Contributor

As this PR includes new syntax support and we're long past the feature freeze, I've removed the backport 1.10 label.

@nickrobinson251
Copy link
Contributor

nickrobinson251 commented Aug 18, 2023

Is there a smaller set of changes we can backport to fix #50703 / JuliaLang/JuliaSyntax.jl#332?

@lgoettgens
Copy link
Contributor

lgoettgens commented Aug 18, 2023

Is there a smaller set of changes we can backport to fix #50703 / JuliaLang/JuliaSyntax.jl#332?

If I am not mistaken, 0.4.6 should be fine. When looking at the diff JuliaLang/JuliaSyntax.jl@v0.4.5...v0.4.6, I do not see JuliaLang/JuliaSyntax.jl#320 in the list of commits. Moreover, it is not even contained in the https://github.com/JuliaLang/JuliaSyntax.jl/commits/release-0.4 branch, only on master.

The release notes are probably just wrong due to JuliaRegistries/TagBot#181

@KristofferC
Copy link
Member

As this PR includes new syntax support and we're long past the feature freeze, I've removed the backport 1.10 label.

Adding back the labels since this is not true.

@KristofferC KristofferC added the backport 1.10 Change should be backported to the 1.10 release label Aug 18, 2023
@KristofferC KristofferC merged commit 43164cf into master Aug 18, 2023
@KristofferC KristofferC deleted the caf/bump-juliasyntax-0.4.6 branch August 18, 2023 08:51
@Seelengrab
Copy link
Contributor

Seelengrab commented Aug 18, 2023

Whoops, good catch, my bad - I only checked the release notes and thought they were accurate! That's quite a serious bug in TagBot - I'm surprised that issue has been open for almost 2 years. I'm surprised this has been hit by JuliaSyntax.

vtjnash pushed a commit to vtjnash/julia that referenced this pull request Aug 18, 2023
This is just a minor update fixing several small but annoying bugs
people have noticed since JuliaSyntax was integrated.
@c42f
Copy link
Member Author

c42f commented Aug 18, 2023

Yes, 0.4.6 is a bugfix release as stated (somewhat vaguely sorry) in the issue notes.

It would be nice to release 1.0.0 soon and we can have proper bugfix version numbers...

vtjnash pushed a commit to vtjnash/julia that referenced this pull request Aug 18, 2023
This is just a minor update fixing several small but annoying bugs
people have noticed since JuliaSyntax was integrated.
@c42f
Copy link
Member Author

c42f commented Aug 19, 2023

checked the release notes and thought they were accurate! That's quite a serious bug in TagBot

Ah yeah this good old TagBot issue :( I've fixed the release notes for 0.4.6 now.

Ok, so just for the record, I'm pretty careful about release branches and trying to not make breaking changes. Occasionally they do slip in despite best efforts but I do my best.

There's another thing which would have meant the public keyword doesn't intrude on the 1.10 release even if the parser supported it: JuliaSyntax is multi-version aware. Given a version number which is provided at runtime, it can compatibly parse versions of Julia's syntax back to 1.6, respecting features which weren't present in that version. So for example, in the same Julia session we have:

julia> parsestmt(SyntaxNode, "[a ;; b ;;; c ;; d]", version=v"1.8")
line:col│ tree                                   │ file_name
   1:1  │[ncat-3]
   1:2  │  [nrow-2]
   1:2  │    a
   1:7  │    b
   1:13 │  [nrow-2]
   1:13 │    c
   1:18 │    d

julia> parsestmt(SyntaxNode, "[a ;; b ;;; c ;; d]", version=v"1.6")
ERROR: ParseError:
# Error @ line 1:1
[a ;; b ;;; c ;; d]
└─────────────────┘ ── multidimensional array syntax not supported in Julia version 1.6 < 1.7

@c42f
Copy link
Member Author

c42f commented Aug 19, 2023

The above means that for the purposes of Meta.parse() compatibility it's always safe to bump JuliaSyntax to a new version. In other words, its semver version number doesn't apply to parsing to Expr which is always expected to be compatible. Except for the most minor of changes and bugfixes of the type we've also allowed in Julia's flisp parser.

Parsing to SyntaxNode is another matter, but that doesn't affect Base.

IanButterworth pushed a commit that referenced this pull request Aug 19, 2023
This is just a minor update fixing several small but annoying bugs
people have noticed since JuliaSyntax was integrated.

(cherry picked from commit 43164cf)
KristofferC added a commit that referenced this pull request Oct 2, 2023
Backported PRs:
- [x] #48625 <!-- add replace(io, str, patterns...) -->
- [x] #48387 <!-- Improve documentation of sort-related functions -->
- [x] #48363 <!-- Revise sort.md and docstrings in sort.jl -->
- [x] #48977 <!-- Update SparseArrays.jl stdlib for SuiteSparse 7 -->
- [x] #50719 <!-- fix `CyclePadding(::DataType)` -->
- [x] #50694 <!-- inference: permit recursive type traits -->
- [x] #50860 <!-- Add `Base.get_extension` to docs/API -->
- [x] #50594 <!-- Disallow non-index Integer types in isassigned -->
- [x] #50802 <!-- Makes IntrusiveLinkedListSynchronized mutable to avoid
allocation on poptask -->
- [x] #50858 <!-- Add a `threadpool` parameter to `Channel` constructor
-->
- [x] #50874 <!-- Restrict COFF to a single thread when symbol count is
high -->
- [x] #50822 <!-- Add default method for setmodifiers! -->
- [x] #50730 <!-- Fix integer overflow in `isapprox` -->
- [x] #50850 <!-- Remove weird Rational dispatch and add pi functions to
list -->
- [x] #50809 <!-- Limit type-printing in MethodError -->
- [x] #50915 <!-- Add note the `Task` about sticky bit -->
- [x] #50929 <!-- when widening tuple types in tmerge, only widen the
complex parts -->
- [x] #50928 <!-- Bump JuliaSyntax to 0.4.6 -->
- [x] #50959 <!-- Update libssh2 patches -->
- [x] #50823 <!-- Make ranges more robust with unsigned indexes. -->
- [x] #48542 <!-- Add docs on task-specific buffering using
multithreading -->
- [x] #50912 <!-- Separate foreign threads into a :foreign threadpool
-->
- [x] #51010 <!-- Add ORIGIN to SuiteSparse rpath on Linux/FreeBSD -->
- [x] #50753 <!-- cat: remove unused promote_eltype methods that confuse
inference -->
- [x] #51027 <!-- Implement realloc accounting correctly -->
- [x] #51019 <!-- fix a case of potentially use of undefined variable
when handling error in distributed message processing -->
- [x] #51039 <!-- Revert "Optimize findall(f, ::AbstractArray{Bool})
(#42202)" -->
- [x] #51036 <!-- add missing invoke edge for nospecialize targets -->
- [x] #51042 <!-- inference: fix return_type_tfunc modeling of concrete
functions -->
- [x] #51114 <!-- Workaround upstream FreeBSD issue #272992 -->
- [x] #50892 <!-- Add `JL_DLLIMPORT` to `small_typeof` declaration -->
- [x] #51154 <!-- broadcast: use recursion rather than ntuple to map
over a tuple -->
- [x] #51153 <!-- fix debug typo in "add missing invoke edge for
nospecialize targets (#51036)" -->
- [x] #51222 <!-- Check again if the tty is open inside the IO lock -->
- [x] #51236 <!-- Add lock around uv_unref during init -->
- [x] #51243 <!-- GMP: Gracefully handle more overflows. -->
- [x] #51254 <!-- Ryu: make sure adding zeros does not overwrite
trailing dot -->
- [x] #51175 <!-- shorten stale_age for cachefile lock -->
- [x] #51300 <!-- fix method definition error for bad vararg -->
- [x] #51307 <!-- fix force-throw ctrl-C on Windows -->
- [x] #51303 <!-- ensure revising structs is safe -->
- [x] #51393 
- [x] #51403 

Need manual backport:
- [x] #51009 <!-- fix #50562, regression in `in` of tuple of Symbols -->
- [x] #51053 <!-- Bump Statistics stdlib -->
- [x] #51013 <!-- fix #50709, type bound error due to free typevar in
sparam env -->
- [x] #51305 <!-- reduce test time for rounding and floatfuncs -->

Contains multiple commits, manual intervention needed:
- [ ] #50663 <!-- Fix Expr(:loopinfo) codegen -->
- [ ] #51035 <!-- refactor GC scanning code to reflect jl_binding_t are
now first class -->
- [ ] #51092 <!-- inference: fix bad effects for recursion -->
- [x] #51247 <!-- Check if malloc has succeeded before incrementing gc
stats -->
- [x] #51294 <!-- use LibGit2_jll for LibGit2 library -->

Non-merged PRs with backport label:
- [ ] #51132 <!-- Handle `AbstractQ` in concatenation -->
- [x] #51029 <!-- testdefs: make sure that if a test set changes the
active project, they change it back when they're done -->
- [ ] #50919 <!-- Code loading: do the "skipping mtime check for stdlib"
check regardless of the value of `ispath(f)` -->
- [ ] #50824 <!-- Add some aliasing warnings to docstrings for mutating
functions -->
- [x] #50385 <!-- Precompile pidlocks: add to NEWS and docs -->
- [ ] #49805 <!-- Limit TimeType subtraction to AbstractDateTime -->
@KristofferC KristofferC removed the backport 1.10 Change should be backported to the 1.10 release label Oct 2, 2023
nalimilan pushed a commit that referenced this pull request Nov 5, 2023
This is just a minor update fixing several small but annoying bugs
people have noticed since JuliaSyntax was integrated.

(cherry picked from commit 43164cf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants