-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)type-questionA question about expected behavior or functionalityA question about expected behavior or functionality
Description
Originally posted in flutter/flutter#179086
import 'package:test/test.dart';
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
void main() {
test('upgrade will downgrade if current version is retracted', () async {
final server = await servePackages();
server.serve('foo', '1.0.0');
server.serve('foo', '1.5.0');
await d.appDir(dependencies: {'foo': '^1.0.0'}).create();
await pubGet(output: contains('+ foo 1.5.0'));
server.retractPackageVersion('foo', '1.5.0');
await pubUpgrade(output: '< foo 1.0.0'); // Fails, it doesn't downgrade.
});
}
I guess the mechanism here is that the solver can see the retracted version, because it is the current version, and thus we don't downgrade.
@szakarias do you remember if this is intentional behavior?
Metadata
Metadata
Assignees
Labels
type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)type-questionA question about expected behavior or functionalityA question about expected behavior or functionality