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

Elixir 1.17 #760

Merged
merged 16 commits into from
Jul 3, 2024
Merged

Elixir 1.17 #760

merged 16 commits into from
Jul 3, 2024

Conversation

scohen
Copy link
Collaborator

@scohen scohen commented May 30, 2024

Changed single quoted charlists to use the ~c sigil

@zachallaun
Copy link
Collaborator

zachallaun commented Jun 1, 2024

I see some errors from ElixirSense. If ElixirSense is using :elixir_tokenizer, we may not be able to complete this upgrade unless we update to the latest version of ElixirSense. I believe this commit changed the return value of :elixir_tokenizer.tokenize/4 to both return an extra value in the :ok tuple (rev_terminators) and to return tokens in reverse order. (Edit: I actually don't think token order changed, just the extra item in the tuple.)

@zachallaun
Copy link
Collaborator

Yep, here's the commit in elixir_sense that adds support for the 1.17 tokenizer: elixir-lsp/elixir_sense@a41777a

@kirillrogovoy
Copy link
Contributor

Just wanted to say that, except for all the deprecation warnings, the latest main version (as of right now) of Lexical runs well on 1.17.0

I had to locally "allow" it though through editing boot.ex.

Maybe allow it for everyone today? Or is it actually buggy and I'm failing to see it?

@scohen
Copy link
Collaborator Author

scohen commented Jun 13, 2024

@kirillrogovoy are you using this branch?

@kirillrogovoy
Copy link
Contributor

@scohen I was referring to the latest main where I locally added "1.17.0" => ">= 1.17.0" to boot.ex (not -rc anymore)

Haven't tried using this branch. My point was that, since 1.17.0 release is out now, a bunch of people are upgrading their setup (e.g. I now run 1.17.0 both locally and in production), and Lexical refuses to start due to that version check although technically it works well if you bypass the check. Or at least if feels like it to me.

So my suggestion was that maybe we could add that "1.17.0" => ">= 1.17.0" line to main already while fixing the compiler warnings here in this branch. Otherwise, many people might get caught off guard with no straightforward remedy. At, least, this way they can just git pull, start the LSP, and continue on with their work.

@scohen
Copy link
Collaborator Author

scohen commented Jun 14, 2024

The problem getting those changes merged is that we have a bunch of test failures under 1.17 that need to be addressed before we merge. They look legitimate to me, and will affect how errors are shown in the UI.

@miguno
Copy link

miguno commented Jun 14, 2024

I, too, am looking forward to Elixir 1.17 support. Thanks in advance for making it happen, even if it should take some time. Your work on lexical is much appreciated!

@scottming scottming force-pushed the elixir-1-17 branch 6 times, most recently from 318a7dd to 3a2e44c Compare June 27, 2024 00:05
@scottming
Copy link
Collaborator

scottming commented Jun 27, 2024

@miguno @kirillrogovoy @bigardone I have fixed all the test errors for the 5 versions. Please pull the latest code from this branch and test it when you have a chance. If there are no further issues, we will merge it ASAP after the review.

cc @scohen @zachallaun @Moosieus

@kirillrogovoy
Copy link
Contributor

kirillrogovoy commented Jun 27, 2024

Thanks a lot @scottming!

I've just pulled, checked out the branch, and ran mix deps.get, mix package.

As far as I can tell, Lexical has compiled successfully, and all basic LSP functions work in my Neovim.

Will post any issues here.

@bigardone
Copy link

👋🏼 @scottming, thanks for the update! Same as @kirillrogovoy here. I just pulled the branch, and everything seems to be working fine. 🙌🏼

Elixir 1.17's AST includes `end_of_expression`, which allows `Sourceror`
to return a more precise range.
Therefore, we no longer need to add 2 in `insert_position`.
…o_quoted_with_comments/2`

And Copied the latest future erlang code
Because the latest `tokenize` is more accurate, some of our previous
tests were written incorrectly, but they still passed at that time.
In situations like this, ` @type a|`, the column of surround_context
should not be 7 (` @type| a`), but rather 8 (` @type |a`). Therefore, we
should not subtract 1."
Sourceror has already fixed the errors related to anonymous functions,
so we no longer need to handle such functions specially.
In version 1.17, the position of the error returned for incomplete
symbols like `%{` is placed before the `%`.
Update all of `elixir_interpolation` call to
`future_elixir_interpolation`
@Moosieus Moosieus merged commit ef171d2 into main Jul 3, 2024
12 checks passed
@dvic dvic mentioned this pull request Jul 8, 2024
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.

7 participants