New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SQLite] Our tests are compiling against a PG database, even when run against SQLite #155

Closed
sgrif opened this Issue Jan 31, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@sgrif
Member

sgrif commented Jan 31, 2016

Note: PRs addressing this issue should target the diesel-sqlite-support branch, not master.

The short version for this is because codegen is tightly coupled to PG. We either need to decouple it, or stop using infer_schema! when our tests are used w/ SQLite.

@sgrif sgrif added this to the 0.5 milestone Jan 31, 2016

sgrif added a commit that referenced this issue Feb 2, 2016

Run significantly more of our test suite against SQLite
This removes the usage of the `infer_schema!` macro, which was
previously compiling against PG. We may eventually be able to use it
again on SQLite, but I think making that macro backend agnostic is out
of scope for 0.5. The `Post` struct on SQLite also does not contain the
`tags` field, which would make no sense on SQLite.

I've opted to leave the `annotations` module out of SQLite, as it'll be
a pain to stop using batch insert and returning there, and really it's
only testing that codegen generates valid Rust in various edge cases,
which isn't something that would change for SQLite.

Fixes #155 (more or less)
@sgrif

This comment has been minimized.

Member

sgrif commented Feb 2, 2016

Fixed by #172 (more or less)

@sgrif sgrif closed this Feb 2, 2016

sgrif added a commit that referenced this issue Feb 3, 2016

Run significantly more of our test suite against SQLite
This removes the usage of the `infer_schema!` macro, which was
previously compiling against PG. We may eventually be able to use it
again on SQLite, but I think making that macro backend agnostic is out
of scope for 0.5. The `Post` struct on SQLite also does not contain the
`tags` field, which would make no sense on SQLite.

I've opted to leave the `annotations` module out of SQLite, as it'll be
a pain to stop using batch insert and returning there, and really it's
only testing that codegen generates valid Rust in various edge cases,
which isn't something that would change for SQLite.

Fixes #155 (more or less)

sgrif added a commit that referenced this issue Feb 3, 2016

Run significantly more of our test suite against SQLite
This removes the usage of the `infer_schema!` macro, which was
previously compiling against PG. We may eventually be able to use it
again on SQLite, but I think making that macro backend agnostic is out
of scope for 0.5. The `Post` struct on SQLite also does not contain the
`tags` field, which would make no sense on SQLite.

I've opted to leave the `annotations` module out of SQLite, as it'll be
a pain to stop using batch insert and returning there, and really it's
only testing that codegen generates valid Rust in various edge cases,
which isn't something that would change for SQLite.

Fixes #155 (more or less)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment