Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ef8df44
Documentation improvements
weiznich Nov 29, 2021
80fef9a
Use a raw cfg flag for the unstable doc_cfg feature
weiznich Jan 5, 2022
256b8a0
Apply suggestions from code review
weiznich Jan 5, 2022
a207878
Update diesel/src/connection/mod.rs
weiznich Jan 5, 2022
cd31d62
Update diesel/src/connection/mod.rs
weiznich Jan 5, 2022
5054e03
Remove now unneeded feature
weiznich Jan 5, 2022
87af53d
Fix compilation failures
weiznich Jan 5, 2022
d297652
Update compile test output
weiznich Jan 5, 2022
8c07303
Another round of improvements
weiznich Jan 30, 2022
7c3df9c
Adjust public API for newly added items + Minor fixes
weiznich Jan 30, 2022
e3f7367
Fix new transaction_manager tests
weiznich Feb 3, 2022
bfdb141
Post rebase fixes
weiznich Feb 3, 2022
5c9cc51
Fix dead links if features are disabled
weiznich Feb 3, 2022
c1666e3
Improvements for the backend documentation
weiznich Feb 3, 2022
a7a2295
More minor documentation fixes
weiznich Feb 4, 2022
3094060
Add documentation for the feature
weiznich Feb 10, 2022
801ef03
post rebase fixes
weiznich Feb 10, 2022
ede99a3
Sage changed it name and wanted it be changed everywhere
weiznich Mar 1, 2022
e9d2c1d
Make most of the aliasing+join module private
weiznich Mar 1, 2022
b7541e4
Fix a compile test
weiznich Mar 1, 2022
5d83a72
Remove `Connection::execute` as it is redundant
weiznich Mar 2, 2022
ad1ce71
Make `query_builder::nodes` private
weiznich Mar 2, 2022
7d07f64
Replace more instances of `Connection::execute`
weiznich Mar 3, 2022
54f6936
Remove the current branch from doc publishing again, as we don't need…
weiznich Mar 3, 2022
5c429c4
Merge branch 'master' into diesel_2.0_documentation_update
weiznich Mar 9, 2022
9f60834
Post merge fix
weiznich Mar 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ jobs:
shell: bash
if: matrix.rust == 'nightly'
run: |
echo "RUSTFLAGS=--cap-lints=warn" >> $GITHUB_ENV
echo "RUSTFLAGS=--cap-lints=warn --cfg doc_cfg" >> $GITHUB_ENV
echo "RUSTDOCFLAGS=--cfg doc_cfg" >> $GITHUB_ENV

- name: Install postgres (Linux)
if: runner.os == 'Linux' && matrix.backend == 'postgres'
Expand Down Expand Up @@ -204,7 +205,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path diesel/Cargo.toml --no-default-features --features "${{ matrix.backend }} unstable extras"
args: --manifest-path diesel/Cargo.toml --no-default-features --features "${{ matrix.backend }} unstable extras i-implement-a-third-party-backend-and-opt-into-breaking-changes"

- name: Test diesel
if: matrix.rust != 'nightly'
Expand Down Expand Up @@ -299,7 +300,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path diesel/Cargo.toml --no-deps --no-default-features --features "${{ matrix.backend }} unstable"
args: --manifest-path diesel/Cargo.toml --no-deps --no-default-features --features "${{ matrix.backend }} unstable i-implement-a-third-party-backend-and-opt-into-breaking-changes"

- name: Run rustdoc
if: matrix.run != 'nightly'
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ jobs:
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: nightly
profile: minimal
override: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libmysqlclient-dev libsqlite3-dev libpq-dev
- name: Build documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --manifest-path diesel/Cargo.toml --features "postgres sqlite mysql extras" --workspace
env:
RUSTFLAGS: "--cfg doc_cfg"
RUSTDOCFLAGS: "--cfg doc_cfg"
run:
cargo +nightly doc --manifest-path diesel/Cargo.toml --features "postgres sqlite mysql extras i-implement-a-third-party-backend-and-opt-into-breaking-changes" --workspace

- name: Publish documentation
if: success()
Expand Down
11 changes: 7 additions & 4 deletions diesel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "diesel"
version = "2.0.0"
authors = ["Sean Griffin <[email protected]>"]
authors = ["Sage Griffin <[email protected]>"]
license = "MIT OR Apache-2.0"
description = "A safe, extensible ORM and Query Builder for PostgreSQL, SQLite, and MySQL"
readme = "README.md"
documentation = "https://docs.rs/diesel/"
homepage = "https://diesel.rs"
repository = "https://github.com/diesel-rs/diesel"
keywords = ["orm", "database", "blockchain", "sql"]
keywords = ["orm", "database", "sql"]
categories = ["database"]
edition = "2018"

Expand Down Expand Up @@ -55,14 +55,17 @@ huge-tables = ["64-column-tables"]
postgres = ["pq-sys", "postgres_backend"]
sqlite = ["libsqlite3-sys", "diesel_derives/sqlite"]
mysql = ["mysqlclient-sys", "url", "percent-encoding", "bitflags", "mysql_backend"]
without-deprecated = []
with-deprecated = []
without-deprecated = ["diesel_derives/without-deprecated"]
with-deprecated = ["diesel_derives/with-deprecated"]
network-address = ["ipnetwork", "libc"]
numeric = ["num-bigint", "bigdecimal", "num-traits", "num-integer"]
postgres_backend = ["diesel_derives/postgres", "bitflags", "byteorder"]
mysql_backend = ["diesel_derives/mysql", "byteorder"]
returning_clauses_for_sqlite_3_35 = []
i-implement-a-third-party-backend-and-opt-into-breaking-changes = []
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems somewhat dangerous. If I depend on such a backend, then I can also access those unstable features, and might use one without realizing.

Copy link
Member Author

Choose a reason for hiding this comment

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

The probably best other solution here is to use a raw cfg flag, right?
The other option that I see is to split up diesel itself into multiple crates and reexport only the stable api via a diesel crate. Everything else is then only exposed via a 0.x internal crate. I assume that this solution will cause problems as well...

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, a raw cfg flag is how Tokio handles unstable features, but it does have the disadvantage that a crate cannot specify it, and that it must be specified by the person running cargo build. (But that's also its advantage and why Tokio uses it over a feature.)


[package.metadata.docs.rs]
features = ["postgres", "mysql", "sqlite", "extras"]
no-default-features = true
rustc-args = ["--cfg", "doc_cfg"]
rustdoc-args = ["--cfg", "doc_cfg"]
Loading