File tree 1 file changed +27
-2
lines changed
1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,35 @@ impl Compiler {
79
79
let has_glob = import_base_str. find ( '*' ) . is_some ( ) ;
80
80
81
81
if has_glob {
82
+ let walker = globwalk:: glob_builder ( import_base_str)
83
+ . build ( )
84
+ . map_err ( |_err| Error :: ImportGlob {
85
+ error : "FIX ERR" . to_string ( ) ,
86
+ path : * path,
87
+ } ) ?;
88
+ for maybe_entry in walker {
89
+ let Ok ( entry) = maybe_entry else { continue } ;
90
+ let import = entry. path ( ) . to_owned ( ) ;
91
+ println ! ( "IMPORT: {}" , import. display( ) ) ;
92
+
93
+ if import. is_file ( ) {
94
+ if current. file_path . contains ( & import) {
95
+ return Err ( Error :: CircularImport {
96
+ current : current. path ,
97
+ import,
98
+ } ) ;
99
+ }
100
+ absolute_paths. push ( import. clone ( ) ) ;
101
+ stack. push ( current. import ( import, path. offset ) ) ;
102
+ }
103
+ }
104
+
105
+ /*
82
106
let glob = globset::Glob::new(&import_base_str).map_err(|_err|
83
107
Error::ImportGlob { error: "FIX ERR".to_string(), path: *path }
84
108
)?.compile_matcher();
85
- /*
109
+ */
110
+ /*
86
111
87
112
let glob_options = glob::MatchOptions {
88
113
case_sensitive: true,
364
389
#[ test]
365
390
fn invalid_glob_imports ( ) {
366
391
let justfile = r#"
367
- import "./subdir/***.just"
392
+ import "./subdir/**** .just"
368
393
"# ;
369
394
let tmp = temptree ! {
370
395
justfile: justfile,
You can’t perform that action at this time.
0 commit comments