REPL history gets overwritten when opening multiple sessions #1172

Open
opened 2026-04-01 10:32:41 +00:00 by blokyk · 0 comments

Describe the bug

When using multiple REPL sessions in parallel, the last closed session will overwrite the history from the other ones.

Steps To Reproduce

  1. Open REPL session 1, type "hello"
  2. Open REPL session 2 in another terminal, type "hi"
  3. Close session 1
  4. Close session 2
  5. Open new REPL: the command history will contain "hi" but not "hello"

Closing session 2 before 1 will cause the same thing but with "hello" being the only thing on the history, while "hi" is overwritten

Expected behavior

Both "hello" and "hi" are present in the command history after closing both sessions.

nix --version output

nix (Lix, like Nix) 2.95.1
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/courvoie/.config/nix/nix.conf:/etc/xdg/xdg-ubuntu-xorg/nix/nix.conf:/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/slkbw0cg08jhfsax6kc0bf6rvw7rkl26-lix-2.95.1/share

(Note that this has been a bug for a while and still happens in latest cppnix)

## Describe the bug When using multiple REPL sessions in parallel, the last closed session will overwrite the history from the other ones. ## Steps To Reproduce 1. Open REPL session 1, type "hello" 2. Open REPL session 2 in another terminal, type "hi" 3. Close session 1 4. Close session 2 5. Open new REPL: the command history will contain "hi" but not "hello" Closing session 2 before 1 will cause the same thing but with "hello" being the only thing on the history, while "hi" is overwritten ## Expected behavior Both "hello" and "hi" are present in the command history after closing both sessions. ## `nix --version` output ``` nix (Lix, like Nix) 2.95.1 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/courvoie/.config/nix/nix.conf:/etc/xdg/xdg-ubuntu-xorg/nix/nix.conf:/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/slkbw0cg08jhfsax6kc0bf6rvw7rkl26-lix-2.95.1/share ``` (Note that this has been a bug for a while and still happens in latest cppnix)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1172
No description provided.