Skip to content

Commit ceae2b3

Browse files
authored
Revert "Bevy 0.15 Support (#141)"
This reverts commit efa4115.
1 parent efa4115 commit ceae2b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5889
-7569
lines changed

.github/workflows/bevy_api_gen.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions-rs/toolchain@v1
2626
with:
2727
profile: minimal
28-
toolchain: nightly-2024-11-05
28+
toolchain: nightly-2024-05-20
2929
override: true
3030
- name: Rust Cache
3131
uses: Swatinem/[email protected]
@@ -52,7 +52,7 @@ jobs:
5252
with:
5353
profile: minimal
5454
components: rustfmt
55-
toolchain: nightly-2024-11-05
55+
toolchain: nightly-2024-05-20
5656
override: true
5757
- name: Rust Cache
5858
uses: Swatinem/[email protected]
@@ -75,7 +75,7 @@ jobs:
7575
rm -rf crates
7676
- uses: actions-rs/toolchain@v1
7777
with:
78-
toolchain: nightly-2024-11-05
78+
toolchain: nightly-2024-05-20
7979
components: clippy
8080
override: true
8181
- name: Rust Cache
@@ -98,7 +98,7 @@ jobs:
9898
rm -rf crates
9999
- uses: actions-rs/toolchain@v1
100100
with:
101-
toolchain: nightly-2024-11-05
101+
toolchain: nightly-2024-05-20
102102
override: true
103103
- name: Rust Cache
104104
uses: Swatinem/[email protected]
@@ -120,7 +120,7 @@ jobs:
120120
rm -rf crates
121121
- uses: actions-rs/toolchain@v1
122122
with:
123-
toolchain: nightly-2024-11-05
123+
toolchain: nightly-2024-05-20
124124
override: true
125125
- name: Rust Cache
126126
uses: Swatinem/[email protected]

.github/workflows/bevy_mod_scripting.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,26 @@ on:
88
- '.github/workflows/release-plz.yml'
99
- '.github/workflows/bevy_api_gen.yml'
1010
- '.github/workflows/macro_tests.yml'
11-
- 'docs/**'
1211

1312

1413
name: Check and Lint - bevy_mod_scripting
1514

16-
concurrency:
17-
# Use github.run_id on main branch
18-
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
19-
# Use github.ref on other branches, so it's unique per branch
20-
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
21-
cancel-in-progress: true
22-
2315
jobs:
2416
check:
25-
name: Check - ${{ matrix.run_args.label }}
17+
name: Check
2618
runs-on: ${{ matrix.run_args.os }}
2719
strategy:
2820
matrix:
2921
run_args: [
30-
{label: Windows - All Features, os: windows-latest, features: "lua54,rhai,teal,lua_script_api,rhai_script_api,rune", cross: x86_64-pc-windows-msvc },
31-
{label: MacOS - All Features, os: macOS-latest, features: "lua54,rhai,teal,lua_script_api,rhai_script_api,rune", cross: x86_64-apple-darwin },
32-
{label: Ubuntu - All Features, os: ubuntu-latest, features: "lua54,lua_script_api,rhai,teal,rhai_script_api,rune", cross: x86_64-unknown-linux-gnu },
33-
{label: Ubuntu Aarch64 - All Features, os: ubuntu-latest, features: "lua54,rhai,teal,lua_script_api,rhai_script_api,rune", cross: aarch64-unknown-linux-gnu },
34-
{label: Ubuntu - Lua51, os: ubuntu-latest, features: "lua51,lua_script_api", cross: x86_64-unknown-linux-gnu },
35-
{label: Ubuntu - Lua52, os: ubuntu-latest, features: "lua52,lua_script_api", cross: x86_64-unknown-linux-gnu },
36-
{label: Ubuntu - Lua53, os: ubuntu-latest, features: "lua53,lua_script_api", cross: x86_64-unknown-linux-gnu },
37-
{label: Ubuntu - Luajit, os: ubuntu-latest, features: "luajit,lua_script_api", cross: x86_64-unknown-linux-gnu },
38-
{label: Ubuntu - Luajit52, os: ubuntu-latest, features: "luajit52,lua_script_api", cross: x86_64-unknown-linux-gnu },
39-
{label: Ubuntu - Luau, os: ubuntu-latest, features: "luau,lua_script_api", cross: x86_64-unknown-linux-gnu }
40-
22+
{os: windows-latest, lua: lua54, cross: x86_64-pc-windows-msvc},
23+
{os: macOS-latest, lua: lua54, cross: x86_64-apple-darwin},
24+
{os: ubuntu-latest, lua: lua54, cross: aarch64-unknown-linux-gnu},
25+
{os: ubuntu-latest, lua: lua51, cross: x86_64-unknown-linux-gnu},
26+
{os: ubuntu-latest, lua: lua52, cross: x86_64-unknown-linux-gnu},
27+
{os: ubuntu-latest, lua: lua53, cross: x86_64-unknown-linux-gnu},
28+
{os: ubuntu-latest, lua: lua54, cross: x86_64-unknown-linux-gnu},
29+
{os: ubuntu-latest, lua: luajit, cross: x86_64-unknown-linux-gnu},
30+
{os: ubuntu-latest, lua: luajit52, cross: x86_64-unknown-linux-gnu}
4131
]
4232
steps:
4333
- if: runner.os == 'linux'
@@ -58,7 +48,7 @@ jobs:
5848
with:
5949
command: check
6050
target: ${{ matrix.run_args.cross }}
61-
args: --workspace --features=${{ matrix.run_args.features }} --profile=ephemeral-build
51+
args: --workspace --features=${{ matrix.run_args.lua }},rhai,teal,lua_script_api,rhai_script_api,rune --profile=ephemeral-build
6252

6353
fmt:
6454
name: Rustfmt

.github/workflows/mdbook.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/pr-titles.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/release-plz.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ permissions:
77
on:
88
push:
99
branches:
10-
- main
11-
- staging
10+
- [main, staging]
1211

1312
jobs:
1413

CHANGELOG.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
# Changelog
22

3-
## [0.8.0-alpha.2](https://github.com/makspll/bevy_mod_scripting/compare/v0.8.0-alpha.1...v0.8.0-alpha.2) - 2024-12-03
4-
5-
### Fixed
6-
7-
- bug when compiling without `teal` feature ([#148](https://github.com/makspll/bevy_mod_scripting/pull/148))
8-
9-
### Other
10-
11-
- Small fixes ([#155](https://github.com/makspll/bevy_mod_scripting/pull/155))
12-
- Luau support attempt ([#154](https://github.com/makspll/bevy_mod_scripting/pull/154))
13-
- Bump bevy & bevy console ([#153](https://github.com/makspll/bevy_mod_scripting/pull/153))
14-
- Fix failing doctest ([#146](https://github.com/makspll/bevy_mod_scripting/pull/146))
15-
- update Cargo.toml dependencies
16-
17-
## [0.8.0-alpha.1](https://github.com/makspll/bevy_mod_scripting/compare/v0.8.0-alpha.0...v0.8.0-alpha.1) - 2024-11-10
18-
19-
### Other
20-
21-
- Bump Bevy release candidate ([#143](https://github.com/makspll/bevy_mod_scripting/pull/143))
22-
- update Cargo.toml dependencies
23-
243
## [0.7.1](https://github.com/makspll/bevy_mod_scripting/compare/bevy_mod_scripting-v0.7.0...bevy_mod_scripting-v0.7.1) - 2024-11-03
254

265
### Other

Cargo.toml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bevy_mod_scripting"
3-
version = "0.8.0-alpha.2"
3+
version = "0.7.1"
44
authors = ["Maksymilian Mozolewski <[email protected]>"]
55
edition = "2021"
66
license = "MIT OR Apache-2.0"
@@ -44,7 +44,6 @@ lua53 = ["bevy_mod_scripting_lua/lua53", "lua"]
4444
lua54 = ["bevy_mod_scripting_lua/lua54", "lua"]
4545
luajit = ["bevy_mod_scripting_lua/luajit", "lua"]
4646
luajit52 = ["bevy_mod_scripting_lua/luajit52", "lua"]
47-
luau = ["bevy_mod_scripting_lua/luau", "lua"]
4847

4948
# optional
5049
lua_script_api = ["bevy_script_api/lua"]
@@ -64,22 +63,22 @@ rune = ["bevy_mod_scripting_rune"]
6463
[dependencies]
6564
bevy = { workspace = true }
6665
bevy_mod_scripting_core = { workspace = true }
67-
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.8.0-alpha.2", optional = true }
68-
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.8.0-alpha.2", optional = true }
69-
bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.8.0-alpha.2", optional = true }
70-
bevy_script_api = { path = "crates/bevy_script_api", version = "0.8.0-alpha.2", optional = true }
66+
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.7.1", optional = true }
67+
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.7.1", optional = true }
68+
bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.7.1", optional = true }
69+
bevy_script_api = { path = "crates/bevy_script_api", version = "0.7.1", optional = true }
7170

7271

7372
[workspace.dependencies]
74-
bevy = { version = "0.15.0", default-features = false }
75-
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.8.0-alpha.2" }
76-
bevy_mod_scripting_common = { path = "crates/bevy_mod_scripting_common", version = "0.8.0-alpha.2" }
73+
bevy = { version = "0.14.2", default-features = false }
74+
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.7.1" }
75+
bevy_mod_scripting_common = { path = "crates/bevy_mod_scripting_common", version = "0.7.1" }
7776

7877
[dev-dependencies]
7978
bevy = { workspace = true, default-features = true }
8079
clap = { version = "4.1", features = ["derive"] }
8180
rand = "0.8.5"
82-
bevy_console = "0.13"
81+
bevy_console = "0.12"
8382
rhai-rand = "0.1"
8483

8584
[workspace]

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-11-05 clippy --all-targets --message-format=json
7+
cargo +nightly-2024-05-20 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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ source = "discover"
3737
rustc_private = true
3838

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

4242

4343
[dependencies]
4444
log = "0.4"
4545
env_logger = "0.11"
46-
rustc_plugin = { git = "https://github.com/makspll/rustc_plugin", branch = "feature/rust-1.82.0" }
46+
rustc_plugin = "=0.10.0-nightly-2024-05-20"
4747
indexmap = "2"
4848
tempdir = "0.3"
4949
cargo_metadata = "0.18"
50+
rustc_data_structures = "0.0.1"
5051
serde_json = "1"
5152
serde = "1"
5253
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-11-05 install bevy_api_gen
11+
cargo +nightly-2024-05-20 install bevy_api_gen
1212
```
1313

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

2020
```bash
21-
cargo +nightly-2024-11-05 bevy-api-gen generate
21+
cargo +nightly-2024-05-20 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-11-05/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-05-20/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-11-05 bevy-api-gen collect
31+
cargo +nightly-2024-05-20 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-11-05 bevy-api-gen list-types > all_types.txt
39+
cargo +nightly-2024-05-20 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-11-05 bevy-api-gen list-templates
47+
cargo +nightly-2024-05-20 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-11-05 bevy-api-gen print item.tera
55+
cargo +nightly-2024-05-20 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-11-05"
3+
channel = "nightly-2024-05-20"

crates/bevy_api_gen/src/bin/driver.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(rustc_private)]
21
use bevy_api_gen::*;
32

43
fn main() {

crates/bevy_api_gen/src/bin/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(rustc_private)]
21
use std::{
32
collections::HashMap,
43
env,

crates/bevy_api_gen/src/context.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ impl CachedTraits {
138138
.all(|t| self.std_source_traits.contains_key(*t))
139139
}
140140

141-
// pub(crate) fn missing_std_source_traits(&self) -> Vec<String> {
142-
// STD_SOURCE_TRAITS
143-
// .iter()
144-
// .filter(|t| !self.std_source_traits.contains_key(**t))
145-
// .map(|s| (*s).to_owned())
146-
// .collect()
147-
// }
141+
pub(crate) fn missing_std_source_traits(&self) -> Vec<String> {
142+
STD_SOURCE_TRAITS
143+
.iter()
144+
.filter(|t| !self.std_source_traits.contains_key(**t))
145+
.map(|s| (*s).to_owned())
146+
.collect()
147+
}
148148
}
149149

150150
#[derive(Clone, Debug)]

crates/bevy_api_gen/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
#![feature(rustc_private, let_chains)]
22
#![deny(rustc::internal)]
3-
43
extern crate rustc_ast;
54
extern crate rustc_driver;
65
extern crate rustc_errors;
76
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;
1011
extern crate rustc_middle;
12+
extern crate rustc_session;
1113
extern crate rustc_span;
1214
extern crate rustc_trait_selection;
1315

crates/bevy_api_gen/src/meta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl MetaLoader {
9494
let cache = self.cache.borrow();
9595
if cache.contains_key(crate_name) {
9696
trace!("Loading meta from cache for: {}", crate_name);
97-
cache.get(crate_name).cloned()
97+
return cache.get(crate_name).cloned();
9898
} else {
9999
trace!("Loading meta from filesystem for: {}", crate_name);
100100
drop(cache);

0 commit comments

Comments
 (0)