Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

chore: add build.rs files for docs.rs #539

Merged
merged 1 commit into from
Jan 28, 2023
Merged

Conversation

deekerno
Copy link
Contributor

Changelog

  • Add build.rs files to database crates that set the SQLX_OFFLINE to true if built for docs.rs

Notes

In the logs for the failing docs.rs builds, you can see that it fails due to SQLX's compile-time query checking. Since users are unable to set environment variables through package.metadata.docs.rs, a build.rs file is used to check for the docs.rs environment and set the necessary environment variables, which should enable the crate documentation to build successfully.

@deekerno deekerno added documentation Improvements or additions to documentation chore labels Jan 27, 2023
@deekerno deekerno self-assigned this Jan 27, 2023
@deekerno deekerno force-pushed the deekerno/fix-docs-rs-build branch from c7be0a5 to 903f2f7 Compare January 27, 2023 23:58
@deekerno deekerno force-pushed the deekerno/fix-docs-rs-build branch from 903f2f7 to a501d87 Compare January 28, 2023 00:04
@deekerno deekerno changed the title chore: Add build.rs files for docs.rs chore: add build.rs files for docs.rs Jan 28, 2023
@deekerno deekerno marked this pull request as ready for review January 28, 2023 01:08
@deekerno deekerno requested a review from ra0x3 January 28, 2023 01:08
@deekerno deekerno enabled auto-merge (squash) January 28, 2023 01:08
Copy link
Contributor

@ra0x3 ra0x3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK :shipit:

@deekerno deekerno merged commit 97b9a26 into master Jan 28, 2023
@deekerno deekerno deleted the deekerno/fix-docs-rs-build branch January 28, 2023 02:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants