Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upProblems with `infer_schema` and relative paths, when running `cargo build` in non-root dir. #1199
Comments
This comment has been minimized.
|
It seems like this is more of a problem of using a relative path for your database URL, rather than a bug in Diesel. We don't really have any behavior here other than passing what you give us unmodified to SQLite. |
sgrif
closed this
Sep 25, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dpc commentedSep 25, 2017
When specifying the db as a relative path (sqlite),
infer_schemamacro will use a different location, depending on which directory thecargo buildis started in.Expected behavior
Typically
cargo buildworks correctly no matter where invoked, so I would expectinfra_schemto use a relative directory against the root of the project, and not CWD wherecargo buildwas invoked. Because it's not the case eg. building in Neomake fails. (This is a followup of #1142 .)Steps to reproduce