@@ -103,14 +103,15 @@ impl<'cfg> PathSource<'cfg> {
103
103
/// stages are:
104
104
///
105
105
/// 1) Only warn users about the future change iff their matching rules are
106
- /// affected. (CURRENT STAGE)
106
+ /// affected.
107
107
///
108
108
/// 2) Switch to the new strategy and update documents. Still keep warning
109
- /// affected users.
109
+ /// affected users. (CURRENT STAGE)
110
110
///
111
111
/// 3) Drop the old strategy and no more warnings.
112
112
///
113
113
/// See <https://github.com/rust-lang/cargo/issues/4268> for more info.
114
+ // TODO: Drop glob-related code for Stage 3..
114
115
pub fn list_files ( & self , pkg : & Package ) -> CargoResult < Vec < PathBuf > > {
115
116
let root = pkg. root ( ) ;
116
117
let no_include_option = pkg. manifest ( ) . include ( ) . is_empty ( ) ;
@@ -208,38 +209,41 @@ impl<'cfg> PathSource<'cfg> {
208
209
if glob_should_package {
209
210
if no_include_option {
210
211
self . config . shell ( ) . warn ( format ! (
211
- "Pattern matching for Cargo's include/exclude fields is changing and \
212
- file `{}` WILL be excluded in a future Cargo version.\n \
212
+ "Pattern matching for Cargo's include/exclude fields has changed and \
213
+ file `{}` is NOW excluded, but USED TO be NOT excluded in a \
214
+ previous Cargo version.\n \
213
215
See https://github.com/rust-lang/cargo/issues/4268 for more info",
214
216
relative_path. display( )
215
217
) ) ?;
216
218
} else {
217
219
self . config . shell ( ) . warn ( format ! (
218
- "Pattern matching for Cargo's include/exclude fields is changing and \
219
- file `{}` WILL NOT be included in a future Cargo version.\n \
220
+ "Pattern matching for Cargo's include/exclude fields has changed and \
221
+ file `{}` is NOT included anymore, but USED TO be included in a \
222
+ previous Cargo version.\n \
220
223
See https://github.com/rust-lang/cargo/issues/4268 for more info",
221
224
relative_path. display( )
222
225
) ) ?;
223
226
}
224
227
} else if no_include_option {
225
228
self . config . shell ( ) . warn ( format ! (
226
- "Pattern matching for Cargo's include/exclude fields is changing and \
227
- file `{}` WILL NOT be excluded in a future Cargo version.\n \
229
+ "Pattern matching for Cargo's include/exclude fields has changed and \
230
+ file `{}` is NOW NOT excluded, but USED TO be excluded in a \
231
+ previous Cargo version.\n \
228
232
See https://github.com/rust-lang/cargo/issues/4268 for more info",
229
233
relative_path. display( )
230
234
) ) ?;
231
235
} else {
232
236
self . config . shell ( ) . warn ( format ! (
233
- "Pattern matching for Cargo's include/exclude fields is changing and \
234
- file `{}` WILL be included in a future Cargo version.\n \
237
+ "Pattern matching for Cargo's include/exclude fields has changed and \
238
+ file `{}` is NOW included, but USED TO be NOT included in a \
239
+ previous Cargo version.\n \
235
240
See https://github.com/rust-lang/cargo/issues/4268 for more info",
236
241
relative_path. display( )
237
242
) ) ?;
238
243
}
239
244
}
240
245
241
- // Update to ignore_should_package for Stage 2
242
- Ok ( glob_should_package)
246
+ Ok ( ignore_should_package)
243
247
} ;
244
248
245
249
// attempt git-prepopulate only if no `include` (rust-lang/cargo#4135)
0 commit comments