Skip to content

Macro support for cargo-free build systems #2922

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

Closed

Conversation

rbtcollins
Copy link
Contributor

@rbtcollins rbtcollins commented Dec 8, 2023

sqlx is great and being able to use the macros under a non-cargo build system brings it to more people. Bazel, buck2, and soong are just some examples of these build systems.

There are conceptually two places where cargo is run by sqlx: the prepare step and the build step.

This patch addresses the build step by optionally replacing the workspace lookup with an environment variable. For our case at least this is sufficient, as cargo can still be executed interactively, just not from with a build system action.

I'm happy to structure this differently (e.g. make the workspace lookup lazy) - just let me know.

Does your PR solve an issue?

Delete this text and add "fixes #(issue number)"

sqlx is great and being able to use the macros under a non-cargo
build system brings it to more people. Bazel, buck2, and soong are
just some examples of these build systems.

There are conceptually two places where cargo is run by sqlx: the
prepare step and the build step.

This patch addresses the build step by optionally replacing the
workspace lookup with an envionment variable. For our case at least this
is sufficient, as cargo can still be executed interactively, just not
from with a build system action.

I'm happy to structure this differently (e.g. make the workspace lookup
lazy) - just let me know.
@abonander
Copy link
Collaborator

Closing in favor of #2927.

@abonander abonander closed this Jan 18, 2024
@rbtcollins rbtcollins deleted the rbt/no-implicit-cargo branch January 21, 2024 08:30
@rbtcollins rbtcollins restored the rbt/no-implicit-cargo branch January 21, 2024 08:42
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

Successfully merging this pull request may close these issues.

2 participants