-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Support query!
for cargo-free systems
#2927
Conversation
To provide additional context, I am attempting to get the following code to work. # BUILD.bazel
rust_binary(
name = "app",
srcs = glob(["src/**/*.rs"]),
aliases = aliases(),
compile_data = [
"@//:.sqlx",
],
proc_macro_deps = all_crate_deps(
proc_macro = True,
),
rustc_env = {
"SQLX_OFFLINE_DIR": ".sqlx",
},
visibility = ["//visibility:public"],
deps = all_crate_deps(),
) |
I can confirm that this fixes our build issue with the 0.7.3 as well (we're also working with Bazel). BTW, how did you troubleshoot this one @kshramt ? |
Thank you for confirming the resolution. As for your question about troubleshooting, I think I didn't do anything out of the ordinary. However, I did come across the error message "help: message: |
@grim7reaper Did you consider the patch I put up in #2922 ? I think they will be ~functionally equivalent, and I expect this patch would work for us too. |
Believe it or not, I patched sqlx to be able to build it in Nix and ended up independently with a 100% identical patch 😅 Just found this PR before opening my own. |
Thank you for merging this! I just realised that 2 years ago I did the first implementation in #1415 - do we need some sort of test to prevent this reverting again in future? |
Co-authored-by: kshramt <kshramt@example.com>
Sorry if this is not the appropriate place to ask but I don't think there's many issues/threads with this many bazel and sqlx users so I'll shoot my shot. What workflow do you use to update the offline dir? By default it only updates inside of the bazel sandbox so what I've done is just set |
Does your PR solve an issue?
Eagerly calling
sqlx/sqlx-macros-core/src/query/mod.rs
Line 80 in 929af41
Delete this text and add "fixes #(issue number)"