Skip to content

Error when database not available #5

@taig

Description

@taig

After creating #4 and switching to 1.1.1 I'm realizing that this is still not ideal. It annoys me that the task aborts when I try to compile without the database running, even though I didn't change the schema since the last generation.

I therefore have a couple proposals how to make this better, if you agree to one of them I'll gladly create a new PR:

  1. Raise a warning instead of throwing an exception and continue without generating the file (which will probably result in compile errors later on)
  2. Add a sbt setting that gives the user the freedom to decide between 1. or the current exception approach
  3. Check if a generated file is still around from a previous run, show a warning that the file can't be re-generated, but continue anyways. If the file does not exist throw an exception and abort.

To me number 3 sounds best.

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