Skip to content

repl remembers non-loadable :l for :r #10106

Open
@roberth

Description

Describe the bug

A mistake I made when :log didn't work.

nix-repl> :l /nix/store/fiip84zv229vagk4i290f74jj383m2pf-vm-test-run-nixops-legacy-network.drv   
error: syntax error, unexpected ',', expecting ')'

nix-repl> :r
Loading '/nix/store/fiip84zv229vagk4i290f74jj383m2pf-vm-test-run-nixops-legacy-network.drv'...
error: syntax error, unexpected ',', expecting ')'

And now I've lost my symbols.

Steps To Reproduce

As above.

Expected behavior

The original :l specification is preserved, unless it did not exist, or unless loading it again can be expected to succeed.
The latter probably means

  • not a store path
  • not an immutable flakeref
  • missing or bad files may be ok when user has write access

nix-env --version output

Additional context

Add any other context about the problem here.

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    bugreplThe Read Eval Print Loop, "nix repl" command and debugger

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions