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

Excessive memory consumption for processing simple file. #5321

Closed
3 tasks done
gruhn opened this issue Sep 12, 2024 · 3 comments
Closed
3 tasks done

Excessive memory consumption for processing simple file. #5321

gruhn opened this issue Sep 12, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@gruhn
Copy link

gruhn commented Sep 12, 2024

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

If I pass the following simple file to Lean, it seems to allocate unbounded amount of memory. I have to kill the process before my system freezes:

def digitsOf (num: Nat): List Nat :=
  let digit := num.mod 10
  let num_rest := num / 10 
  if num_rest == 0 then
    [digit]
  else
    have : num_rest < num := sorry
    digit :: digitsOf num_rest

example : digitsOf 1234 = [4,3,2,1] := by rfl

The function digitsOf is supposed to return a list of digits given some number. The problem seems to be the example. In particular, the by rfl proof. Without it, memory use stays below 300MB on my machine.

Screencast.from.2024-09-12.14-58-59.webm

If I use the CLI flag to limit memory use, I get the following output:

➜  lean-bug-demo lean --memory=300 digits.lean 
digits.lean:2:4: warning: declaration uses 'sorry'
digits.lean:2:4: warning: declaration uses 'sorry'
digits.lean:2:4: warning: declaration uses 'sorry'
digits.lean:11:42: error: The rfl tactic failed. Possible reasons:
- The goal is not a reflexive relation (neither `=` nor a relation with a @[refl] lemma).
- The arguments of the relation are not equal.
Try using the reflexivitiy lemma for your relation explicitly, e.g. `exact Eq.rfl`.
⊢ digitsOf 1234 = [4, 3, 2, 1]

But there is nothing wrong with the proof, right? I get the same output on live.lean-lang.org.

Steps to Reproduce

Create the lean file mentioned above and run lean the-file.lean.

Here is also a Dockerfile. With that, I can also reproduce the problem on Debian:

# Debian Bookworm base image
FROM buildpack-deps:bookworm

# download Lean 4.11.0 binary
RUN wget https://github.com/leanprover/lean4/releases/download/v4.11.0/lean-4.11.0-linux.zip 
RUN unzip lean-4.11.0-linux

# add the offending Lean file
COPY digits.lean /

To build the Docker image, make sure the digits.lean file is in the same directory. Then run:

docker build --tag demo .

To run lean inside Docker:

docker run --rm -it demo /lean-4.11.0-linux/bin/lean /digits.lean

On my machine memory use exploded. With or without Docker.

Versions

Tested both Lean 4.9.0 and Lean 4.11.0.

Tested on both NixOS 24.11 (Vicuna) and Debian Bookworm 12.7.

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@gruhn gruhn added the bug Something isn't working label Sep 12, 2024
@nomeata
Copy link
Collaborator

nomeata commented Sep 12, 2024

Thanks for the report, and going through the lengths of making it reproducible, even with a docker image.

It looks like you are trying to reduce a function defined by well-founded recursion. This usually fails, even for small examples like this one, so this is probably a duplicate of #2171.

Note that since from Lean 4.12 on (#3772) rfl will reliably adhere to the irreducible flag on this definition, and fail properly.

@gruhn
Copy link
Author

gruhn commented Sep 12, 2024

Thanks for the quick response. Not sure what that means. I'm quite a Lean beginner. So do you mean 4.12.0 would also resolve the memory issue?

For more context: I was just typing in my editor and then my system would totally freeze suddenly. Turns out the lean process spawned by the language server was consuming so much memory. I froze my system 2 or 3 more times before I manged to figure out where the problem was coming from.

Can you recommend some reasonable default memory limit?

@nomeata
Copy link
Collaborator

nomeata commented Sep 12, 2024

So do you mean 4.12.0 would also resolve the memory issue?

Yes, with it you shouldn’t be able to trigger the freeze here.

That said, presumably there might be other ways to freeze it up like this, and that’s certainly an issue. I don’t know if it’s a known one. Leaving open for the triage team to look at it in due course.

And with 4.12 the above proof won’t go by rfl anymore (because digitsOf will not reduce in the kernel; it’s not “definitionally equal”), but for example by simp [digitsOf] works.

gruhn added a commit to gruhn/helix that referenced this issue Sep 12, 2024
The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
archseer pushed a commit to helix-editor/helix that referenced this issue Sep 15, 2024
The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
diucicd pushed a commit to diucicd/helix that referenced this issue Sep 20, 2024
)

The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
@Kha Kha closed this as completed Sep 20, 2024
plul pushed a commit to plul/helix that referenced this issue Oct 13, 2024
)

The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
salman-farooq-sh added a commit to salman-farooq-sh/helix that referenced this issue Dec 21, 2024
build(deps): bump gix-path from 0.10.10 to 0.10.11 (helix-editor#11648)

Bumps [gix-path](https://github.com/Byron/gitoxide) from 0.10.10 to 0.10.11.
- [Release notes](https://github.com/Byron/gitoxide/releases)
- [Changelog](https://github.com/Byron/gitoxide/blob/main/CHANGELOG.md)
- [Commits](GitoxideLabs/gitoxide@gix-path-v0.10.10...gix-path-v0.10.11)

---
updated-dependencies:
- dependency-name: gix-path
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

fix(clippy): `doc_lazy_continuation` (helix-editor#11642)

cargo update (helix-editor#11651)

build(deps): bump the rust-dependencies group with 4 updates (helix-editor#11669)

Bumps the rust-dependencies group with 4 updates: [globset](https://github.com/BurntSushi/ripgrep), [ignore](https://github.com/BurntSushi/ripgrep), [grep-regex](https://github.com/BurntSushi/ripgrep) and [grep-searcher](https://github.com/BurntSushi/ripgrep).

Updates `globset` from 0.4.14 to 0.4.15
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](BurntSushi/ripgrep@globset-0.4.14...ignore-0.4.15)

Updates `ignore` from 0.4.22 to 0.4.23
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/ripgrep/commits)

Updates `grep-regex` from 0.1.12 to 0.1.13
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](BurntSushi/ripgrep@grep-regex-0.1.12...0.1.13)

Updates `grep-searcher` from 0.1.13 to 0.1.14
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](BurntSushi/ripgrep@grep-searcher-0.1.13...0.1.14)

---
updated-dependencies:
- dependency-name: globset
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: ignore
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: grep-regex
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: grep-searcher
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

fix: Lean language server consuming excessive memory (helix-editor#11683)

The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.

build(deps): bump cachix/install-nix-action from V27 to 28 (helix-editor#11713)

Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from V27 to 28. This release includes the previously tagged commit.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](cachix/install-nix-action@V27...V28)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

build(deps): bump the rust-dependencies group with 4 updates (helix-editor#11712)

Bumps the rust-dependencies group with 4 updates: [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation), [anyhow](https://github.com/dtolnay/anyhow), [rustix](https://github.com/bytecodealliance/rustix) and [cc](https://github.com/rust-lang/cc-rs).

Updates `unicode-segmentation` from 1.11.0 to 1.12.0
- [Commits](unicode-rs/unicode-segmentation@v1.11.0...v1.12.0)

Updates `anyhow` from 1.0.87 to 1.0.89
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.87...1.0.89)

Updates `rustix` from 0.38.36 to 0.38.37
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Changelog](https://github.com/bytecodealliance/rustix/blob/main/CHANGELOG.md)
- [Commits](bytecodealliance/rustix@v0.38.36...v0.38.37)

Updates `cc` from 1.1.18 to 1.1.19
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/cc-rs@cc-v1.1.18...cc-v1.1.19)

---
updated-dependencies:
- dependency-name: unicode-segmentation
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: rustix
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Stylize horizon-dark picker v2 columns (helix-editor#11649)

Update picker headers styling in Darcula themes (helix-editor#11620)

* Apply styling to picker headers in Darcula themes

* Add background to active picker column in Darcula.

chore: add ruff and jedi lsp servers (helix-editor#11630)

* chore: add ruff lsp server

Ruff provide a `server` command that starts a LSP server:
https://docs.astral.sh/ruff/editors/#language-server-protocol

* chore: add jedi lsp server

[jedi-language-server](https://github.com/pappasam/jedi-language-server) is a Python LSP server based the popular [jedi](https://jedi.readthedocs.io/en/latest/) library.

* docs: add ruff and jedi as python lsp servers

Handle window/showMessage and display it bellow status line (helix-editor#5535)

* Handle window/showMessage and display it bellow status line

* Enable `editor.lsp.display_messages` by default

---------

Co-authored-by: Michael Davis <[email protected]>

fix(themes): fix diagnostics in snazzy (helix-editor#11731)

* fix(themes): fix diagnostics in snazzy

Before this change, the color scheme makes most diagnostics difficult
to read. This fix makes diagnostic much less obtrusive when using
snazzy.

* chore(fmt): nicely format snazzy theme file

Fix Rope.starts_with. (helix-editor#11739)

Co-authored-by: Rose Hogenson <[email protected]>

small fix syntax highlighting in vue.js files (helix-editor#11706)

* small fix syntax highlighting in vue.js files

* changes after review by mikedavis

add circom tree-sitter, syntax-highlighting, and lsp support (helix-editor#11676)

* add circom tree-sitter and lsp support

* add circom syntax highlighting queries

* cargo xtask docgen

* updated highlights to reflect helix themes typing

* bugfix: ~= operator causing issues

* minor adjustment: add = and ; operator and delimiter

adding support for jujutsu VCS inside find_workspace resolution (helix-editor#11685)

Update README.md (helix-editor#11665)

Readability Clarification

Join single-line comments with J. (helix-editor#11742)

Fixes helix-editor#8565.

Co-authored-by: Rose Hogenson <[email protected]>

Fix panic when drawing at the edge of the screen. (helix-editor#11737)

When pressing tab at the edge of the screen, Helix panics in debug mode
subtracting position.col - self.offset.col.

To correctly account for graphemes that are partially visible,
column_in_bounds takes a width and returns whether the whole range is
in bounds.

Co-authored-by: Rose Hogenson <[email protected]>

build(deps): bump the rust-dependencies group with 2 updates (helix-editor#11761)

Bumps the rust-dependencies group with 2 updates: [thiserror](https://github.com/dtolnay/thiserror) and [cc](https://github.com/rust-lang/cc-rs).

Updates `thiserror` from 1.0.63 to 1.0.64
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.63...1.0.64)

Updates `cc` from 1.1.19 to 1.1.21
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/cc-rs@cc-v1.1.19...cc-v1.1.21)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Update HCL grammar (helix-editor#11749)

* Point HCL grammer to newest

This adds support for provider-defined function calls in Terraform.

* Update HCL grammar repo

The repository was moved from the original authors personal GitHub to the `tree-sitter-grammars` organization.

Co-authored-by: Michael Davis <[email protected]>

---------

Co-authored-by: Michael Davis <[email protected]>

chore: Update slint tree-sitter grammar to version 1.8 (helix-editor#11757)

Bump the commit to the tree-sitter corresponding to the
latest Slint release.

Remove "true" from odinfmt line (helix-editor#11759)

The `-stdin` in `odinfmt` does not take any arguments, the `true` part here just confuses the formatter, and makes it ignore `odinfmt.json` file.

Removing it fixes the issue.

Add .rbs files to ruby language (helix-editor#11786)

Add: validation of bundled themes in build workflow (helix-editor#11627)

* Add: xtask to check themes for validation warnings

* Update: tidied up runtime paths

* Update: test build workflow

* Update: address clippy lints

* Revert: only trigger workflow on push to master branch

* Add: Theme::from_keys factory method to construct theme from Toml keys

* Update: returning validation failures in Loader.load method

* Update: commented out invalid keys from affected themes

* Update: correct invalid keys so that valid styles still applied

* Update: include default and base16_default themes in check

* Update: renamed validation_failures to load_errors

* Update: introduce load_with_warnings helper function and centralise logging of theme warnings

* Update: use consistent naming throughout

Bump tree-sitter-nickel (helix-editor#11771)

Fix typo in tutor ch 13.5 (helix-editor#11765)

It said "split" instead of "swap"

languages.toml: recognize ldtk files (helix-editor#11793)

fix: fish builtin functions are highlighted as such (helix-editor#11792)

* fix: fish builtin functions are highlighted as such

* fix: single-character commands recognized as builtins

???? how did that query even happen

* fix: update builtins to fish 3.7.1

* fix: add back `alias` and `isatty`

they are builtins, but aren't reported by builtin -n for some reason

Improve tree-sitter-subtree (helix-editor#11663)

* Make unnamed nodes visible in subtree view

* Refine command description

* Update generated docs

* Update unit test expected output

Add undocumented keybindings to book (helix-editor#11662)

feat(languages): add `superhtml` as lsp for `html` (helix-editor#11609)

Add vale language server (helix-editor#11636)

Co-authored-by: Blaž Hrastnik <[email protected]>

chore: add "ui.virtual.jump-label" to gruber-darker theme (helix-editor#11547)

add key concepts to usage.md (helix-editor#11485)

Small bogster theme improvements (helix-editor#11353)

* Add a distinct jump-label to bogster theme

* Make the primary label visible in the bogster theme

Add Erlang Language Platform (ELP) support to Erlang (helix-editor#11499)

* Add ELP LSP to Erlang

* generate docs

---------

Co-authored-by: Blaž Hrastnik <[email protected]>

build(deps): bump cachix/install-nix-action from V28 to 29 (helix-editor#11806)

Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from V28 to 29. This release includes the previously tagged commit.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](cachix/install-nix-action@V28...v29)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

build(deps): bump the rust-dependencies group with 5 updates (helix-editor#11805)

Bumps the rust-dependencies group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [once_cell](https://github.com/matklad/once_cell) | `1.19.0` | `1.20.1` |
| [regex](https://github.com/rust-lang/regex) | `1.10.6` | `1.11.0` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.12.0` | `3.13.0` |
| [libc](https://github.com/rust-lang/libc) | `0.2.158` | `0.2.159` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.21` | `1.1.23` |

Updates `once_cell` from 1.19.0 to 1.20.1
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](matklad/once_cell@v1.19.0...v1.20.1)

Updates `regex` from 1.10.6 to 1.11.0
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](rust-lang/regex@1.10.6...1.11.0)

Updates `tempfile` from 3.12.0 to 3.13.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](Stebalien/tempfile@v3.12.0...v3.13.0)

Updates `libc` from 0.2.158 to 0.2.159
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.159/CHANGELOG.md)
- [Commits](rust-lang/libc@0.2.158...0.2.159)

Updates `cc` from 1.1.21 to 1.1.23
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/cc-rs@cc-v1.1.21...cc-v1.1.23)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: rust-dependencies
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Fix some odin highlights (helix-editor#11804)

Some of the odin highlights seemed wrong or lacking, like the import names were not being matched:

```odin

// color both "rl" here to same value
import rl "vendor:raylib"

...

rl.Vector3
```

Import color was also not being used correctly

Add a highlight for the keyword.storage scope to the onedark theme (helix-editor#11802)

Rust highlight queries make use of keyword.storage for keywords like
`struct`, `enum`, and also for modifiers like `mut` and `ref`.

Using a color that's different to the one used for
`"variable.parameter"` (red) improves differentiation for mutable
function arguments.

fix git repo detection on symlinks (helix-editor#11732)

Replace uses of lsp::Location with a custom Location type

The lsp location type has the lsp's URI type and a range. We can replace
that with a custom type private to the lsp commands module that uses the
core URI type instead.

We can't entirely replace the type with a new Location type in core.
That type might look like:

    pub struct Location {
        uri: crate::Uri,
        range: crate::Range,
    }

But we can't convert every `lsp::Location` to this type because for
definitions, references and diagnostics language servers send documents
which we haven't opened yet, so we don't have the information to convert
an `lsp::Range` (line+col) to a `helix_core::Range` (char indexing).

This cleans up the picker definitions in this file so that they can all
use helpers like `jump_to_location` and `location_to_file_location` for
the picker preview. It also removes the only use of the deprecated
`PathOrId::from_path_buf` function, allowing us to drop the owned
variant of that type in the child commit.

picker: Removed owned variant of PathOrId

The only caller of `from_path_buf` was removed in the parent commit
allowing us to drop owned variant of path's `Cow`. With this change we
never need to allocate in the picker preview callback.

Make helix_core::Uri cheap to clone

We clone this type very often in LSP pickers, for example diagnostics
and symbols. We can use a single Arc in many cases to avoid the
unnecessary clones.

refactor(lsp): handle out-of-range `active_signature` (helix-editor#11825)

Add support for dune project language (helix-editor#11829)

Remove auto-pair for single quote in SML. (helix-editor#11838)

Similar to OCaml and other ML languages, single quote is a normal
character that can appear in identifiers and is also used in type
parameters. It is not used for strings or character literals, which both
use double quote.

Co-authored-by: Rose Hogenson <[email protected]>

build(deps): bump cachix/install-nix-action from 29 to 30 (helix-editor#11852)

Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 29 to 30.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](cachix/install-nix-action@v29...v30)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

build(deps): bump the rust-dependencies group with 4 updates (helix-editor#11850)

Bumps the rust-dependencies group with 4 updates: [once_cell](https://github.com/matklad/once_cell), [futures-util](https://github.com/rust-lang/futures-rs), [futures-executor](https://github.com/rust-lang/futures-rs) and [cc](https://github.com/rust-lang/cc-rs).

Updates `once_cell` from 1.20.1 to 1.20.2
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](matklad/once_cell@v1.20.1...v1.20.2)

Updates `futures-util` from 0.3.30 to 0.3.31
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/futures-rs@0.3.30...0.3.31)

Updates `futures-executor` from 0.3.30 to 0.3.31
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/futures-rs@0.3.30...0.3.31)

Updates `cc` from 1.1.23 to 1.1.28
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/cc-rs@cc-v1.1.23...cc-v1.1.28)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: futures-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: futures-executor
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Fix repology badge (helix-editor#11895)

Update repology URL after change from helix to helix-editor (helix-editor#11877)

* Update repology URL after change from helix to helix-editor

* Update book/src/package-managers.md

Co-authored-by: Michael Davis <[email protected]>

---------

Co-authored-by: Michael Davis <[email protected]>

build(deps): bump cc in the rust-dependencies group (helix-editor#11890)

Bumps the rust-dependencies group with 1 update: [cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.1.28 to 1.1.30
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/cc-rs@cc-v1.1.28...cc-v1.1.30)

---
updated-dependencies:
- dependency-name: cc
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Add glsl_analyzer as default language server for GLSL (helix-editor#11891)

* Add glsl_analyzer as default language server for GLSL

* Generate docs

docs(themes): place `ui.highlight.frameline` and `ui.highlight` together (helix-editor#11896)

* docs(themes): place `ui.highlight.frameline` and `ui.highlight` together

* docs(themes): small fix

Bump `jjdescription` grammar revision (helix-editor#11857)

Adding snakemake to language (helix-editor#11858)

* feat: snakemake language

* feat: snakemake syntax highlighting

* doc: xtask docgen - snakemake

* Addressed feedback: removed redundant grammar

* fixed indentation

* removed has-ancestor predicate

---------

Co-authored-by: “SebastianDall” <“[email protected]”>
rmburg pushed a commit to rmburg/helix that referenced this issue Jan 20, 2025
)

The Lean process, spawned by the language server, might use excessive
memory in certain situation, causing the entire system to freeze. See:

   leanprover/lean4#5321

The language server accepts a CLI flag for limiting memory use. I set
it to 1024MB, which might be a bit arbitrary, but definitly prevents
the system from crashing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants