#LICENSE Portions Copyright 2019-2021 ZomboDB, LLC.
#LICENSE
#LICENSE Portions Copyright 2021-2023 Technology Concepts & Design, Inc.
#LICENSE
#LICENSE Portions Copyright 2023-2023 PgCentral Foundation, Inc. <contact@pgcentral.org>
#LICENSE
#LICENSE All rights reserved.
#LICENSE
#LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file.

[workspace]
resolver = "3"
members = [
    "cargo-pgrx",
    "pgrx",
    "pgrx-macros",
    "pgrx-pg-config",
    "pgrx-pg-sys",
    "pgrx-sql-entity-graph",
    "pgrx-tests",
    "pgrx-bindgen",
    "tools/version-updater",
]
exclude = [
    # "pgrx-examples/*",
    "pgrx-examples/aggregate",
    "pgrx-examples/arrays",
    "pgrx-examples/bad_ideas",
    "pgrx-examples/bgworker",
    "pgrx-examples/bytea",
    "pgrx-examples/composite_type",
    "pgrx-examples/custom_libname",
    "pgrx-examples/custom_types",
    "pgrx-examples/custom_sql",
    "pgrx-examples/datetime",
    "pgrx-examples/wal_decoder",
    "pgrx-examples/errors",
    "pgrx-examples/nostd",
    "pgrx-examples/numeric",
    "pgrx-examples/pgtrybuilder",
    "pgrx-examples/operators",
    "pgrx-examples/range",
    "pgrx-examples/schemas",
    "pgrx-examples/shmem",
    "pgrx-examples/spi",
    "pgrx-examples/spi_srf",
    "pgrx-examples/srf",
    "pgrx-examples/strings",
    "pgrx-examples/triggers",
    "pgrx-examples/versioned_custom_libname_so",
    "pgrx-examples/versioned_so",
]

[workspace.package]
authors = ["PgCentral Foundation, Inc. <contact@pgcentral.org>"]
edition = "2021"
license = "MIT"
repository = "https://github.com/pgcentralfoundation/pgrx/"
homepage = "https://github.com/pgcentralfoundation/pgrx/"
# TODO: all crates should use this version rather than copy it
#   See https://github.com/pgcentralfoundation/pgrx/pull/2100 comments
version = "0.16.0"

[workspace.metadata.local-install]
cargo-pgrx = { path = "cargo-pgrx" }

[workspace.dependencies]
pgrx-macros = { path = "./pgrx-macros", version = "=0.16.0" }
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.16.0" }
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.16.0" }
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.16.0" }
pgrx-bindgen = { path = "./pgrx-bindgen", version = "=0.16.0" }

cargo_metadata = "0.18.0"
cargo-edit = "=0.13.2" # format-preserving edits to cargo.toml
cargo_toml = "0.22" # used for building projects
clap-cargo = { version = "0.14.0", features = ["cargo_metadata"] }
eyre = "~0.6.12" # simplifies error-handling
libc = "0.2" # FFI compat
owo-colors = { version = "4.2", features = ["supports-colors"] } # for output highlighting
proc-macro2 = { version = "1.0.94", features = ["span-locations"] }
quote = "1.0.40"
regex = "1.11" # used for build/test
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
shlex = "1.3" # shell lexing, also used by many of our deps
syn = { version = "2", features = ["extra-traits", "full", "parsing", "visit-mut"] }
toml = "0.8" # our config files
toml_edit = "0.22.24" # format-preserving edits to toml files, used with cargo-edit
thiserror = "2"
unescape = "0.1.0" # for escaped-character-handling
url = "2.5.4" # the non-existent std::web
walkdir = "2" # directory recursion

[profile.dev]
# Only include line tables in debuginfo. This reduces the size of target/ (after
# running tests) by almost half, while keeping the part of debuginfo which
# people care about the most (the part used to produce backtraces). This seems
# like something we would generally want (when actually running in a debugger
# you can just comment out the line).
#
# That said, if it turns out to hurt development more than expected, we could
# move this to only toggle this in CI
debug = 'line-tables-only'

[profile.dev.build-override]
opt-level = 3
