Skip to content

Commit

Permalink
Prep for 0.7.2 release (#842)
Browse files Browse the repository at this point in the history
* Prep for 0.7.2 release

* Updated credo to fix spurious error

* Update Nix hash of Mix deps

* Fixed dialyzer error

* Downgraded elixir_sense because _of course_

* Update Nix hash of Mix deps

---------

Co-authored-by: scohen <[email protected]>
  • Loading branch information
scohen and scohen authored Dec 27, 2024
1 parent a9a806c commit d0f3d1c
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 18 deletions.
32 changes: 29 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
## Unreleased
No changes yet
No changes yet

## v0.7.2
We've identified several long-standing performance bottlenecks in Lexical. Among them:

1. A bottleneck that affects Lexical when it receives a large number of document updates. The bottleneck would cause the server process's Task Queue (the thing that delegates incoming LS requests to the process that handles them) to crash, and the server would become unusable after. Additionally, Lexical would build your code while the document updates were occurring, which would further slow things down. Both issues are now fixed, and Lexical waits until you stop making changes before it tries to compile your project.
2. We calculated the completion context once per completion item returned, which would be slow when a large number of completions were returned (like when you type `Enum.`). Since the context is static to your cursor, we only need to calculate it once.
3. Only call `mix deps.compile` for older versions of elixir that change the directory when compiling.
4. Incorporated Jose's new mix format task that doesn't require us to be inside of the given mix project. This means that formatting no longer uses the build lock. Formatting times have gone down from 400ms in the worst case to 10ms.

In addition, we've improved diagnostic reporting in config files.

## What's Changed
* Update the Nix hash on PR, not on the main branch by @akirak in https://github.com/lexical-lsp/lexical/pull/817
* Convert all exceptions in config files into diagnostics by @zachallaun in https://github.com/lexical-lsp/lexical/pull/824
* Server bottlenecks by @scohen in https://github.com/lexical-lsp/lexical/pull/825
* Update the Nix hash by @akirak in https://github.com/lexical-lsp/lexical/pull/818
* Improve performance under batch operations by @scohen in https://github.com/lexical-lsp/lexical/pull/826
* simplify default config by @filipmnowak in https://github.com/lexical-lsp/lexical/pull/814
* add Mix.ensure_application!(:observer) to .iex.exs by @lukad in https://github.com/lexical-lsp/lexical/pull/829
* updated dialyxir by @scohen in https://github.com/lexical-lsp/lexical/pull/835
* [chore] Allow compression for erlang >= 27.1 by @scohen in https://github.com/lexical-lsp/lexical/pull/836
* [feat] Loosen find_references by @scohen in https://github.com/lexical-lsp/lexical/pull/831
* [feat] Group functions by name + type + arity in document symbols by @scohen in https://github.com/lexical-lsp/lexical/pull/833
* Show syntax macro completions when `Kernel.` is prefixed to the cursor. by @Moosieus in https://github.com/lexical-lsp/lexical/pull/840
* Performance oriented fixes. by @scohen in https://github.com/lexical-lsp/lexical/pull/841

## v0.7
We're releasing 0.7 so we can support Elixir 1.17 and Erlang 27. However, those users on Erlang 27 will experience large increases in the amount of memory Lexical takes up [due to this bug](https://github.com/erlang/otp/pull/8683). When that bug is fixed, we'll push out another release that will detect the newer version of Erlang and things should go back to normal.
We're releasing 0.7 so we can support Elixir 1.17 and Erlang 27. However, those users on Erlang 27 will experience large increases in the amount of memory Lexical takes up [due to this bug](https://github.com/erlang/otp/pull/8683). When that bug is fixed, we'll push out another release that will detect the newer version of Erlang and things should go back to normal.

Other than supporting the newer versions of Erlang and Elixir, we've added the following features:

Expand All @@ -10,7 +36,7 @@ Other than supporting the newer versions of Erlang and Elixir, we've added the f
* Remove unused alias code action
* Add alias code action: Type a module, invoke the code action and see a list of modules to alias, select one, and it's added to your module's other aliases.
* Improved script handling: Now lexical won't execute scripts when editing them. Thanks, @zachallaun!
* We now show typespecs for struct field completions. Thanks @kirillrogovoy
* We now show typespecs for struct field completions. Thanks @kirillrogovoy

## What's Changed

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Lexical is a next-generation language server for the Elixir programming language

<br><br><br>

### Note: Development on Lexical will slow while we transition to the new combined effort, Expert.

## Features

* Context aware code completion
Expand Down Expand Up @@ -105,7 +107,7 @@ After this, you're ready to put together a pull request for Lexical!

#### Benchmarks

The `remote_control` project has a set of benchmarks that measure the speed of various internal functions and data structures. In order to use them, you first need to install [git large file storage](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage), and then run `git pull`. Benchmarks are stored in the `benchmarks` subdirectory, and can be run via
The `remote_control` project has a set of benchmarks that measure the speed of various internal functions and data structures. In order to use them, you first need to install [git large file storage](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage), and then run `git pull`. Benchmarks are stored in the `benchmarks` subdirectory, and can be run via

```
mix benchmark /benchmarks/<benchmark_file>.exs
Expand Down
2 changes: 1 addition & 1 deletion apps/common/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Common.MixProject do
def project do
[
app: :common,
version: "0.5.0",
version: "0.7.2",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
2 changes: 1 addition & 1 deletion apps/proto/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Proto.MixProject do
def project do
[
app: :proto,
version: "0.5.0",
version: "0.7.2",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
2 changes: 1 addition & 1 deletion apps/protocol/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Lexical.Protocol.MixProject do
def project do
[
app: :protocol,
version: "0.5.0",
version: "0.7.2",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down
5 changes: 3 additions & 2 deletions apps/remote_control/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Lexical.RemoteControl.MixProject do
def project do
[
app: :remote_control,
version: "0.5.0",
version: "0.7.2",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down Expand Up @@ -44,7 +44,8 @@ defmodule Lexical.RemoteControl.MixProject do
[
{:benchee, "~> 1.1", only: :test},
{:common, in_umbrella: true},
{:elixir_sense, github: "elixir-lsp/elixir_sense"},
{:elixir_sense,
github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"},
{:lexical_plugin, path: "../../projects/lexical_plugin"},
{:lexical_shared, path: "../../projects/lexical_shared"},
{:lexical_test, path: "../../projects/lexical_test", only: :test},
Expand Down
5 changes: 3 additions & 2 deletions apps/server/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Lexical.Server.MixProject do
def project do
[
app: :server,
version: "0.5.0",
version: "0.7.2",
build_path: "../../_build",
config_path: "../../config/config.exs",
deps_path: "../../deps",
Expand Down Expand Up @@ -43,7 +43,8 @@ defmodule Lexical.Server.MixProject do
{:lexical_shared, path: "../../projects/lexical_shared", override: true},
{:lexical_test, path: "../../projects/lexical_test", only: [:dev, :test]},
{:common, in_umbrella: true},
{:elixir_sense, github: "elixir-lsp/elixir_sense"},
{:elixir_sense,
github: "elixir-lsp/elixir_sense", ref: "0c98e656cf60d4b693376a2013a312039560b95d"},
{:jason, "~> 1.4"},
{:logger_file_backend, "~> 0.0.13", only: [:dev, :prod]},
{:patch, "~> 0.12", runtime: false, only: [:dev, :test]},
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Lexical.LanguageServer.MixProject do
def project do
[
apps_path: "apps",
version: "0.7.0",
version: "0.7.2",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
Expand Down
8 changes: 4 additions & 4 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"benchee": {:hex, :benchee, "1.1.0", "f3a43817209a92a1fade36ef36b86e1052627fd8934a8b937ac9ab3a76c43062", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}, {:statistex, "~> 1.0", [hex: :statistex, repo: "hexpm", optional: false]}], "hexpm", "7da57d545003165a012b587077f6ba90b89210fd88074ce3c60ce239eb5e6d93"},
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"castore": {:hex, :castore, "1.0.3", "7130ba6d24c8424014194676d608cb989f62ef8039efd50ff4b3f33286d06db8", [:mix], [], "hexpm", "680ab01ef5d15b161ed6a95449fac5c6b8f60055677a8e79acf01b27baa4390b"},
"credo": {:hex, :credo, "1.7.5", "643213503b1c766ec0496d828c90c424471ea54da77c8a168c725686377b9545", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "f799e9b5cd1891577d8c773d245668aa74a2fcd15eb277f51a0131690ebfb3fd"},
"credo": {:hex, :credo, "1.7.10", "6e64fe59be8da5e30a1b96273b247b5cf1cc9e336b5fd66302a64b25749ad44d", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "71fbc9a6b8be21d993deca85bf151df023a3097b01e09a2809d460348561d8cd"},
"deep_merge": {:hex, :deep_merge, "1.0.0", "b4aa1a0d1acac393bdf38b2291af38cb1d4a52806cf7a4906f718e1feb5ee961", [:mix], [], "hexpm", "ce708e5f094b9cd4e8f2be4f00d2f4250c4095be93f8cd6d018c753894885430"},
"dialyxir": {:hex, :dialyxir, "1.4.4", "fb3ce8741edeaea59c9ae84d5cec75da00fa89fe401c72d6e047d11a61f65f70", [:mix], [{:erlex, ">= 0.2.7", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "cd6111e8017ccd563e65621a4d9a4a1c5cd333df30cebc7face8029cacb4eff6"},
"earmark_parser": {:hex, :earmark_parser, "1.4.32", "fa739a0ecfa34493de19426681b23f6814573faee95dfd4b4aafe15a7b5b32c6", [:mix], [], "hexpm", "b8b0dd77d60373e77a3d7e8afa598f325e49e8663a51bcc2b88ef41838cca755"},
"elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "67f6974dedb33846a060031d5afd5430a3f583f0", []},
"elixir_sense": {:git, "https://github.com/elixir-lsp/elixir_sense.git", "0c98e656cf60d4b693376a2013a312039560b95d", [ref: "0c98e656cf60d4b693376a2013a312039560b95d"]},
"erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"},
"ex_doc": {:hex, :ex_doc, "0.29.4", "6257ecbb20c7396b1fe5accd55b7b0d23f44b6aa18017b415cb4c2b91d997729", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "2c6699a737ae46cb61e4ed012af931b57b699643b24dabe2400a8168414bc4f5"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"file_system": {:hex, :file_system, "1.0.1", "79e8ceaddb0416f8b8cd02a0127bdbababe7bf4a23d2a395b983c1f8b3f73edd", [:mix], [], "hexpm", "4414d1f38863ddf9120720cd976fce5bdde8e91d8283353f0e31850fa89feb9e"},
"jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"},
"logger_file_backend": {:hex, :logger_file_backend, "0.0.13", "df07b14970e9ac1f57362985d76e6f24e3e1ab05c248055b7d223976881977c2", [:mix], [], "hexpm", "71a453a7e6e899ae4549fb147b1c6621f4233f8f48f58ca10a64ec67b6c50018"},
"makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
Expand Down
2 changes: 1 addition & 1 deletion nix/hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sha256-c9n+lbUwwf4NPIbcUr2sTldHvPDVJrS/4LOhIDWT0/U=
sha256-/FHuLKlY9nposkulvMuIQ0NvvRI3q24Ionq/22jalOA=
4 changes: 3 additions & 1 deletion projects/lexical_shared/lib/lexical/debug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ defmodule Lexical.Logging do
end
end

@debug_enabled? not is_nil(System.get_env("TIMINGS_ENABLED"))

defp enabled? do
true
@debug_enabled?
end
end

0 comments on commit d0f3d1c

Please sign in to comment.