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

CompatHelper: bump compat for JuliaSyntax to 1, (keep existing compat) #287

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

This pull request changes the compat entry for the JuliaSyntax package from 0.4 to 0.4, 1.
This keeps the compat entries for earlier versions.

Note: I have not tested your package with this new compat entry.
It is your responsibility to make sure that your package tests pass before you merge this pull request.

@sunxd3 sunxd3 force-pushed the compathelper/new_version/2025-03-29-00-06-39-104-02116669264 branch from 90c4f61 to 34c7f00 Compare March 29, 2025 00:06
@sunxd3
Copy link
Member

sunxd3 commented Apr 4, 2025

This is not a trivial fix, for now, I'll write down some potential changes required, and come back when I have time.

  • true, false are no longer tokenized as two separate kinds of tokens, but the same token K"Bool" (Replace K"true" and K"false" with K"Bool" JuliaLang/JuliaSyntax.jl#488)
  • <- is parsed differently
    • v0.4.10
      julia> tokenize("p <- dnorm(0, 1)")
      12-element Vector{Token}:
       Token(JuliaSyntax.SyntaxHead(K"Identifier", 0x0000), 0x00000001:0x00000001)
       Token(JuliaSyntax.SyntaxHead(K"Whitespace", 0x0001), 0x00000002:0x00000002)
       Token(JuliaSyntax.SyntaxHead(K"<", 0x0000), 0x00000003:0x00000003)
       Token(JuliaSyntax.SyntaxHead(K"-", 0x0000), 0x00000004:0x00000004)
       Token(JuliaSyntax.SyntaxHead(K"Whitespace", 0x0001), 0x00000005:0x00000005)
       Token(JuliaSyntax.SyntaxHead(K"Identifier", 0x0000), 0x00000006:0x0000000a)
       Token(JuliaSyntax.SyntaxHead(K"(", 0x0001), 0x0000000b:0x0000000b)
       Token(JuliaSyntax.SyntaxHead(K"Integer", 0x0000), 0x0000000c:0x0000000c)
       Token(JuliaSyntax.SyntaxHead(K",", 0x0001), 0x0000000d:0x0000000d)
       Token(JuliaSyntax.SyntaxHead(K"Whitespace", 0x0001), 0x0000000e:0x0000000e)
       Token(JuliaSyntax.SyntaxHead(K"Integer", 0x0000), 0x0000000f:0x0000000f)
       Token(JuliaSyntax.SyntaxHead(K")", 0x0001), 0x00000010:0x00000010)
    • 1.0.2
      julia> tokenize("p <- dnorm(0, 1)")
      12-element Vector{Token}:
       Token(JuliaSyntax.SyntaxHead(K"Identifier", 0x0000), 0x00000001:0x00000001)
       Token(JuliaSyntax.SyntaxHead(K"Whitespace", 0x0001), 0x00000002:0x00000002)
       Token(JuliaSyntax.SyntaxHead(K"Identifier", 0x0000), 0x00000003:0x00000003)
       Token(JuliaSyntax.SyntaxHead(K"Identifier", 0x0000), 0x00000004:0x00000004)
       Token(JuliaSyntax.SyntaxHead(K"Whitespace", 0x0001), 0x00000005:0x00000005)
       Token(JuliaSyntax.SyntaxHead(K"Identifier", 0x0000), 0x00000006:0x0000000a)
       Token(JuliaSyntax.SyntaxHead(K"(", 0x0001), 0x0000000b:0x0000000b)
       Token(JuliaSyntax.SyntaxHead(K"Integer", 0x0000), 0x0000000c:0x0000000c)
       Token(JuliaSyntax.SyntaxHead(K",", 0x0001), 0x0000000d:0x0000000d)
       Token(JuliaSyntax.SyntaxHead(K"Whitespace", 0x0001), 0x0000000e:0x0000000e)
       Token(JuliaSyntax.SyntaxHead(K"Integer", 0x0000), 0x0000000f:0x0000000f)
       Token(JuliaSyntax.SyntaxHead(K")", 0x0001), 0x00000010:0x00000010)
    i.e., <- is now parsed as two K"Identifier" instead of K"<" and K"-", but this is something I relied on in the
    parser

Figure out:

  • What version of JuliaSyntax is Julia 1.10 using? How about Julia 1.2? (This is potentially related to when I must fix this)
  • Even if in a future version of Julia when JuliaSyntax 1.0 is used, must I update from JuliaSyntax 0.4, or both version can be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant