Skip to content

Figure out how to support concurrent runs of elm-review without corrupting the cache #324

Open
@lishaduck

Description

@lishaduck

Disappointing, but I guess I just means I need to find the time to do that refactor of options parsing that'll let us quit spawning processes. (And I guess the caching issues was probably actually this too)

At some point, it'd probably also be good to do some form of file locking or something to handle concurrent modifications better, but on the other hand, I suppose we sorta do, with the --namespace option, but I don't see how we could get that set in tests.

Originally posted by @lishaduck in #322 (comment)

Yeah, the namespace option was meant for that. Though it's also a shame to need that, as that means that a cache for the CLI would not get used by an editor and vice versa. If we could get rid of it that would actually be nice I think.

@lishaduck opening an issue would be great 👍

Originally posted by @jfmengels in #322 (comment)


I see three four ways to go about this:

  1. PR elm/compiler to fix it corrupting concurrent builds (I don't know Haskell, so I couldn't do this; otherwise, this sounds like the best plan)
  2. Automatically namespacing (Doesn't allow sharing caches between concurrent runs, but would at least stop the bleed and suppress the issue 😉) [I figure I'll probably take this route when I try to fix it.]
  3. Use file-locking (would probably get unduly slow and doesn't really fix the problem)
  4. Use a daemon to memoize it (best perf, lots of work, probably couldn't be done in JSLand) [The Lamdera compiler is looking into this, perhaps some collaboration would be done?].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions