Skip to content

Commit c716725

Browse files
committed
correct for changed features in xtasks
1 parent d39135c commit c716725

File tree

2 files changed

+13
-19
lines changed

2 files changed

+13
-19
lines changed

.github/workflows/bevy_mod_scripting.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
{label: Windows, os: windows-latest },
3333
{label: MacOS, os: macOS-latest },
3434
{label: Ubuntu, os: ubuntu-latest },
35-
{label: Ubuntu Aarch64, os: ubuntu-latest }
3635
]
3736
steps:
3837
- name: Checkout

crates/xtask/src/main.rs

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use clap::Parser;
33
use itertools::Itertools;
44
use log::*;
55
use std::{collections::HashMap, ffi::OsStr, path::Path, process::Command, str::FromStr};
6-
use strum::VariantNames;
6+
use strum::{IntoEnumIterator, VariantNames};
77

88
#[derive(
99
Clone,
@@ -33,19 +33,18 @@ enum Feature {
3333
MluaSerialize,
3434
MluaMacros,
3535
MluaAsync,
36-
3736
// Rhai
38-
Rhai,
37+
// Rhai,
3938

4039
// Rune
41-
Rune,
40+
// Rune,
4241
}
4342

44-
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
43+
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, strum::EnumIter)]
4544
enum FeatureGroup {
4645
LuaExclusive,
47-
RhaiExclusive,
48-
RuneExclusive,
46+
// RhaiExclusive,
47+
// RuneExclusive,
4948
ForExternalCrate,
5049
BMSFeature,
5150
}
@@ -54,16 +53,16 @@ impl FeatureGroup {
5453
fn default_feature(self) -> Feature {
5554
match self {
5655
FeatureGroup::LuaExclusive => Feature::Lua54,
57-
FeatureGroup::RhaiExclusive => Feature::Rhai,
58-
FeatureGroup::RuneExclusive => Feature::Rune,
56+
// FeatureGroup::RhaiExclusive => Feature::Rhai,
57+
// FeatureGroup::RuneExclusive => Feature::Rune,
5958
_ => panic!("No default feature for non-exclusive group"),
6059
}
6160
}
6261

6362
fn is_exclusive(self) -> bool {
6463
matches!(
6564
self,
66-
FeatureGroup::LuaExclusive | FeatureGroup::RhaiExclusive | FeatureGroup::RuneExclusive
65+
FeatureGroup::LuaExclusive // | FeatureGroup::RhaiExclusive | FeatureGroup::RuneExclusive
6766
)
6867
}
6968
}
@@ -82,8 +81,8 @@ impl IntoFeatureGroup for Feature {
8281
| Feature::Luajit
8382
| Feature::Luajit52
8483
| Feature::Luau => FeatureGroup::LuaExclusive,
85-
Feature::Rhai => FeatureGroup::RhaiExclusive,
86-
Feature::Rune => FeatureGroup::RuneExclusive,
84+
// Feature::Rhai => FeatureGroup::RhaiExclusive,
85+
// Feature::Rune => FeatureGroup::RuneExclusive,
8786
Feature::MluaAsync
8887
| Feature::MluaMacros
8988
| Feature::MluaSerialize
@@ -695,12 +694,8 @@ impl Xtasks {
695694
);
696695

697696
// choose language features
698-
for category in [
699-
FeatureGroup::LuaExclusive,
700-
FeatureGroup::RhaiExclusive,
701-
FeatureGroup::RuneExclusive,
702-
] {
703-
feature_set.0.push(category.default_feature());
697+
for exclusive_category in FeatureGroup::iter().filter(|g| g.is_exclusive()) {
698+
feature_set.0.push(exclusive_category.default_feature());
704699
}
705700

706701
// include all non-bms features

0 commit comments

Comments
 (0)