8000 `elba build` stale if project open in repl · Issue #74 · elba/elba · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
elba build stale if project open in repl #74
Open
@ratherforky

Description

@ratherforky

Problem

When a file is opened in the repl and is subsequently changed but not rebuilt in the repl, elba build does not use the file's current state for the output binary, but instead uses the old code still in use by the repl.

Minimal example

In the first terminal:

$ mkdir rebuild
$ cd rebuild
$ elba init
$ elba repl

You could also replace elba repl with idris src/Main.idr, both cause the problem.

Now change the "Hello, world!" to anything else, save the file, and open another terminal in the rebuild folder:

$ elba build
$ ./target/bin/rebuild
"Hello, world!"

You should see the "Hello, world!" from the old file that's still open in the repl.

Additional info

Seemingly there's still a lot of work going on in this situation (it takes 5s instead of 0.7s to build), so presumably some compilation is actually happening, but is then not being used.

idris src/Main.idr -o rebuild does not suffer from the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0