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

fix(sqlx-cli): fix the build #1969

Merged
merged 1 commit into from Jul 14, 2022
Merged

fix(sqlx-cli): fix the build #1969

merged 1 commit into from Jul 14, 2022

Conversation

ivan
Copy link
Contributor

@ivan ivan commented Jul 13, 2022

This fixes the build after 7d8ded9:

error[E0616]: field `target_directory` of struct `metadata::Metadata` is private
   --> sqlx-cli/src/prepare.rs:175:47
    |
175 |             .env("CARGO_TARGET_DIR", metadata.target_directory.clone())
    |                                               ^^^^^^^^^^^^^^^^ private field
    |
help: a method `target_directory` also exists, call it with parentheses
    |
175 |             .env("CARGO_TARGET_DIR", metadata.target_directory().clone())
    |                                                               ++

This fixes:

```
error[E0616]: field `target_directory` of struct `metadata::Metadata` is private
   --> sqlx-cli/src/prepare.rs:175:47
    |
175 |             .env("CARGO_TARGET_DIR", metadata.target_directory.clone())
    |                                               ^^^^^^^^^^^^^^^^ private field
    |
help: a method `target_directory` also exists, call it with parentheses
    |
175 |             .env("CARGO_TARGET_DIR", metadata.target_directory().clone())
    |                                                               ++
```
ivan referenced this pull request Jul 14, 2022
* Move compiled query data

I did try to set rustc's --out-dir but encountered a strange error
stating that it can not be set more than once (even though I am unable
to deduce what else is setting it).

This enabled me to set a custom CARGO_TARGET_DIR and still be able to
prepare queries.

* Set CARGO_TARGET_DIR in the rustc invocation
@abonander abonander merged commit b9a8f90 into launchbadge:main Jul 14, 2022
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.

None yet

2 participants