Skip to content

Commit 07ebdab

Browse files
committed
bump codegen & codegen new files
1 parent 528257e commit 07ebdab

File tree

14 files changed

+41
-36
lines changed

14 files changed

+41
-36
lines changed

.github/workflows/bevy_api_gen.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions-rs/toolchain@v1
2828
with:
2929
profile: minimal
30-
toolchain: nightly-2024-05-20
30+
toolchain: nightly-2024-11-05
3131
override: true
3232
- name: Rust Cache
3333
uses: Swatinem/rust-cache@v2.7.3
@@ -54,7 +54,7 @@ jobs:
5454
with:
5555
profile: minimal
5656
components: rustfmt
57-
toolchain: nightly-2024-05-20
57+
toolchain: nightly-2024-11-05
5858
override: true
5959
- name: Rust Cache
6060
uses: Swatinem/rust-cache@v2.7.3
@@ -77,7 +77,7 @@ jobs:
7777
rm -rf crates
7878
- uses: actions-rs/toolchain@v1
7979
with:
80-
toolchain: nightly-2024-05-20
80+
toolchain: nightly-2024-11-05
8181
components: clippy
8282
override: true
8383
- name: Rust Cache
@@ -100,7 +100,7 @@ jobs:
100100
rm -rf crates
101101
- uses: actions-rs/toolchain@v1
102102
with:
103-
toolchain: nightly-2024-05-20
103+
toolchain: nightly-2024-11-05
104104
override: true
105105
- name: Rust Cache
106106
uses: Swatinem/rust-cache@v2.7.3
@@ -122,7 +122,7 @@ jobs:
122122
rm -rf crates
123123
- uses: actions-rs/toolchain@v1
124124
with:
125-
toolchain: nightly-2024-05-20
125+
toolchain: nightly-2024-11-05
126126
override: true
127127
- name: Rust Cache
128128
uses: Swatinem/rust-cache@v2.7.3

.github/workflows/release-plz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: actions-rs/toolchain@v1
5151
with:
5252
profile: minimal
53-
toolchain: nightly-2024-05-20
53+
toolchain: nightly-2024-11-05
5454
override: true
5555
working-directory: crates/bevy_api_gen
5656
- name: Install Rust toolchain

check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CURRENT_DIR=$(basename "$PWD")
44

55

66
if [[ "$CURRENT_DIR" == "bevy_api_gen" ]]; then
7-
cargo +nightly-2024-05-20 clippy --all-targets --message-format=json
7+
cargo +nightly-2024-11-05 clippy --all-targets --message-format=json
88
else
99
cargo clippy --workspace --all-targets --message-format=json --features="lua54 lua_script_api rhai rhai_script_api teal rune bevy/file_watcher bevy/multi_threaded"
1010
fi

crates/bevy_api_gen/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,16 @@ source = "discover"
3737
rustc_private = true
3838

3939
[rust-analyzer.check]
40-
overrideCommand = ["cargo", "+nightly-2024-05-20", "a", "--message-format=json"]
40+
overrideCommand = ["cargo", "+nightly-2024-11-05", "a", "--message-format=json"]
4141

4242

4343
[dependencies]
4444
log = "0.4"
4545
env_logger = "0.11"
46-
rustc_plugin = "=0.10.0-nightly-2024-05-20"
46+
rustc_plugin = { path = "../../../rustc_plugin/crates/rustc_plugin" }
4747
indexmap = "2"
4848
tempdir = "0.3"
4949
cargo_metadata = "0.18"
50-
rustc_data_structures = "0.0.1"
5150
serde_json = "1"
5251
serde = "1"
5352
clap = { version = "4", features = ["derive", "string"] }

crates/bevy_api_gen/readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ bevy_api_gen is a Cargo plugin that generates reflection-powered wrappers for Be
88
To install bevy_api_gen, use the following command:
99

1010
```bash
11-
cargo +nightly-2024-05-20 install bevy_api_gen
11+
cargo +nightly-2024-11-05 install bevy_api_gen
1212
```
1313

1414
# Usage
@@ -18,39 +18,39 @@ cargo +nightly-2024-05-20 install bevy_api_gen
1818
To run the main codegen process, use the following command:
1919

2020
```bash
21-
cargo +nightly-2024-05-20 bevy-api-gen generate
21+
cargo +nightly-2024-11-05 bevy-api-gen generate
2222
```
2323

24-
This will perform all parts of the process and generate meta as well as .rs files for each crate in your workspace in your `/target/plugin-nightly-2024-05-20/bevy_api_gen` directory
24+
This will perform all parts of the process and generate meta as well as .rs files for each crate in your workspace in your `/target/plugin-nightly-2024-11-05/bevy_api_gen` directory
2525

2626
## Collect
2727

2828
After generating all the files, you can 'collect' them in a mod.rs file like so:
2929

3030
```bash
31-
cargo +nightly-2024-05-20 bevy-api-gen collect
31+
cargo +nightly-2024-11-05 bevy-api-gen collect
3232
```
3333

3434
## List Types
3535

3636
To see a list of all `Reflect` implementing types in your workspace run:
3737

3838
```bash
39-
cargo +nightly-2024-05-20 bevy-api-gen list-types > all_types.txt
39+
cargo +nightly-2024-11-05 bevy-api-gen list-types > all_types.txt
4040
```
4141

4242
## List Templates
4343

4444
To see the list of all templates which you can override use:
4545

4646
```bash
47-
cargo +nightly-2024-05-20 bevy-api-gen list-templates
47+
cargo +nightly-2024-11-05 bevy-api-gen list-templates
4848
```
4949

5050
## Print Template
5151

5252
You can also print any of the templates to stdout:
5353

5454
```bash
55-
cargo +nightly-2024-05-20 bevy-api-gen print item.tera
55+
cargo +nightly-2024-11-05 bevy-api-gen print item.tera
5656
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
22
components = ["clippy", "rust-src", "rustc-dev", "llvm-tools"]
3-
channel = "nightly-2024-05-20"
3+
channel = "nightly-2024-11-05"

crates/bevy_api_gen/src/bin/driver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![feature(rustc_private)]
12
use bevy_api_gen::*;
23

34
fn main() {

crates/bevy_api_gen/src/bin/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![feature(rustc_private)]
12
use std::{
23
collections::HashMap,
34
env,

crates/bevy_api_gen/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#![feature(rustc_private, let_chains)]
22
#![deny(rustc::internal)]
3+
34
extern crate rustc_ast;
45
extern crate rustc_driver;
56
extern crate rustc_errors;
67
extern crate rustc_hir;
7-
extern crate rustc_hir_analysis;
88
extern crate rustc_infer;
99
extern crate rustc_interface;
10-
extern crate rustc_lint;
1110
extern crate rustc_middle;
12-
extern crate rustc_session;
1311
extern crate rustc_span;
1412
extern crate rustc_trait_selection;
1513

crates/bevy_api_gen/src/modifying_file_loader.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
use std::io;
1+
use std::{
2+
io,
3+
sync::atomic::{AtomicBool, Ordering},
4+
};
25

36
use log::trace;
4-
use rustc_data_structures::sync::{AtomicBool, Lrc, Ordering};
7+
use rustc_middle::ty::data_structures::Lrc;
8+
// use rustc_data_structures::sync::{AtomicBool, Lrc};
59
use rustc_span::source_map::{FileLoader, RealFileLoader};
610

711
/// Injects extern statements into the first loaded file (crate root)

0 commit comments

Comments
 (0)