@@ -112,6 +112,7 @@ struct Dependency {
112
112
}
113
113
114
114
// / If set, overrides any version based dependency selection.
115
+ deprecated (" Construct a new `Dependency` object instead" )
115
116
@property void path(NativePath value) @trusted
116
117
{
117
118
this .m_value = value;
@@ -126,6 +127,7 @@ struct Dependency {
126
127
}
127
128
128
129
// / If set, overrides any version based dependency selection.
130
+ deprecated (" Construct a new `Dependency` object instead" )
129
131
@property void repository(Repository value) @trusted
130
132
{
131
133
this .m_value = value;
@@ -323,8 +325,7 @@ struct Dependency {
323
325
if (auto pv = " version" in verspec)
324
326
logDiagnostic(" Ignoring version specification (%s) for path based dependency %s" , pv.get ! string , pp.get ! string );
325
327
326
- dep = Dependency.any;
327
- dep.path = NativePath(verspec[" path" ].get ! string );
328
+ dep = Dependency(NativePath(verspec[" path" ].get ! string ));
328
329
} else if (auto repository = " repository" in verspec) {
329
330
enforce(" version" in verspec, " No version field specified!" );
330
331
enforce(repository.length > 0 , " No repository field specified!" );
@@ -357,10 +358,9 @@ struct Dependency {
357
358
"path": "path/to/package"
358
359
}
359
360
` ));
360
- Dependency d = Dependency.any ; // supposed to ignore the version spec
361
+ Dependency d = NativePath( " path/to/package " ) ; // supposed to ignore the version spec
361
362
d.optional = true ;
362
363
d.default_ = true ;
363
- d.path = NativePath(" path/to/package" );
364
364
assert (d == parsed);
365
365
// optional and path not checked by opEquals.
366
366
assert (d.optional == parsed.optional);
0 commit comments