Skip to content

Commit

Permalink
removed ident namespacing and feature based prelude selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ModProg committed Oct 14, 2023
1 parent a0b5055 commit f3cccb9
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 345 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- ## [Unreleased] -->
## [Unreleased]
### Added
- having `#use no_prelude;` at the start of a quote_use invocation disables the prelude
- added `quote_use_no_prelude` variants for all `quote_use` macros

### Removed
- removed `namespace_idents` feature, just use `__variable_name` instead
- removed `prelude_*` features, by default all preludes are included now.

## [0.7.2] - 2023-09-03
### Fixed
- `syn` and `quote` crate to be present for working
Expand Down
20 changes: 5 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
categories = [
"rust-patterns",
"development-tools::procedural-macro-helpers",
"parsing",
"rust-patterns",
"development-tools::procedural-macro-helpers",
"parsing",
]
description = "Support `use` in procmacros hygienically"
documentation = "https://docs.rs/quote-use"
Expand All @@ -15,27 +15,17 @@ version = "0.7.2"
edition = "2021"
name = "quote-use"

[lib]

[dependencies]
syn = { version = "2", default-features = false, features = ["parsing", "printing"], optional = true }
quote = "1"
syn = "2"
quote-use-macros = { version = "0.7.2", path = "quote-use-macros" }

[features]
default = ["prelude_2021", "prelude_std"]
prelude_core = ["quote-use-macros/prelude_core"]
prelude_std = ["prelude_core", "quote-use-macros/prelude_std"]
prelude_2021 = ["prelude_core", "quote-use-macros/prelude_2021"]
namespace_idents = ["quote-use-macros/namespace_idents"]

[dev-dependencies]
pretty_assertions = "1"
proc-macro2 = "1"
syn = "2"

[workspace]
members = ["quote-use-macros"]
syn = { version = "2", features = ["derive"] }

[package.metadata.release]
shared-version = true
Expand Down
17 changes: 7 additions & 10 deletions quote-use-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
categories = [
"rust-patterns",
"development-tools::procedural-macro-helpers",
"parsing",
"rust-patterns",
"development-tools::procedural-macro-helpers",
"parsing",
]
description = "Support `use` in procmacros hygienically"
documentation = "https://docs.rs/quote-use"
Expand All @@ -20,16 +20,13 @@ proc-macro = true

[dependencies]
derive-where = "1"
proc-macro-utils = "0.8"
proc-macro2 = "1"
quote = "1"
syn = "2"
syn = { version = "2", features = ["parsing"], default-features = false}

[features]
default = []
prelude_core = []
prelude_std = ["prelude_core"]
prelude_2021 = ["prelude_core"]
namespace_idents = []
[dev-dependencies]
pretty_assertions = "1.4"

[package.metadata.release]
shared-version = true
Loading

0 comments on commit f3cccb9

Please sign in to comment.