Skip to content
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

Documentation for sqlx prepare for --all-targets is seemingly incorrect #1898

Closed
wimax-grapl opened this issue Jun 8, 2022 · 1 comment
Closed

Comments

@wimax-grapl
Copy link

wimax-grapl commented Jun 8, 2022

Related:
#1665 which purported to close #1593
#637 which seems like, same symptoms, different root problem trying to be solved


Hi. I have a codebase that has some sqlx queries in its lib, and some additional queries that are in its lib but hidden behind a cfg(test).

If I were to call:

DATABASE_URL="${DB_URL}" cargo sqlx prepare -- --all-targets --all-features

as suggested in this documentation
it results in

error: extra arguments to `rustc` can only be passed to one target, consider filtering
the package by passing, e.g., `--lib` or `--bin NAME` to specify a single target
error: `cargo check` failed with status: exit status: 101

This error is documented in #637; I'm opening a new ticket here because the documentation explicitly states that this case (multiple targets) should work, but it does not.


My request:

  • (if possible, just fix this feature)
  • if it is indeed working as intended, could we add some sort of integration test proving that?
  • if it is not working, could we remove that documentation saying it does?
@wimax-grapl wimax-grapl closed this as not planned Won't fix, can't repro, duplicate, stale Jun 8, 2022
@wimax-grapl
Copy link
Author

i just put it behind a feature flag instead of cfg test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant