Skip to content

Commit d024b3b

Browse files
committed
Remove deprecated config key and template filters
1 parent 2f68940 commit d024b3b

File tree

8 files changed

+2
-67
lines changed

8 files changed

+2
-67
lines changed

src/config/normalize.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,31 +83,19 @@ fn normalize_plugin(
8383
remote,
8484
local,
8585
inline,
86-
mut proto,
86+
proto,
8787
reference,
8888
dir,
8989
uses,
9090
apply,
9191
profiles,
9292
hooks,
93-
mut rest,
93+
rest,
9494
} = raw_plugin;
9595

9696
let is_reference_some = reference.is_some();
9797
let is_gist_or_github = gist.is_some() || github.is_some();
9898

99-
// Handle some deprecated items :/
100-
if proto.is_none() {
101-
if let Some(protocol) = try_pop_toml_value(&mut rest, "protocol") {
102-
warnings.push(anyhow!(
103-
"use of deprecated config key: `plugins.{name}.protocol`, please use \
104-
`plugins.{name}.proto` instead",
105-
name = name,
106-
));
107-
proto = Some(protocol);
108-
}
109-
}
110-
11199
check_extra_toml(rest, |key| {
112100
warnings.push(anyhow!("unused config key: `plugins.{name}.{key}`"));
113101
});

src/lock/script.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,6 @@ impl LockedConfig {
105105
}
106106
}
107107

108-
if *USED_GET.lock().unwrap() {
109-
warnings.push(Error::msg(
110-
"use of deprecated filter `get` in [templates], please use the `?.` operator \
111-
instead.\nFor example: `{{ hooks | get: \"pre\" | nl }}` can be written `{{ \
112-
hooks?.pre | nl }}`",
113-
));
114-
}
115-
116108
Ok(script)
117109
}
118110
}

tests/lib.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,6 @@ fn lock_and_source_hooks() -> io::Result<()> {
422422
Ok(())
423423
}
424424

425-
#[test]
426-
fn lock_and_source_deprecated_get_filter() -> io::Result<()> {
427-
let case = TestCase::load("deprecated_get_filter")?;
428-
case.run()?;
429-
check_sheldon_test(&case.dirs.data).unwrap();
430-
Ok(())
431-
}
432-
433425
#[test]
434426
fn directories_default() -> io::Result<()> {
435427
let dirs = TestDirs::default()?;

tests/testdata/deprecated_get_filter/lock.stderr

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

tests/testdata/deprecated_get_filter/plugins.lock

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

tests/testdata/deprecated_get_filter/plugins.toml

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

tests/testdata/deprecated_get_filter/source.stderr

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

tests/testdata/deprecated_get_filter/source.stdout

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)