Skip to content

Commit 65fd924

Browse files
author
Casey Hillers
authored
[conductor] Remove CiYaml model (#120458)
* [conductor] Remove CiYaml model * Remove package:yaml * Update pubspec checksum
1 parent 52ab299 commit 65fd924

File tree

3 files changed

+1
-46
lines changed

3 files changed

+1
-46
lines changed

dev/conductor/core/lib/src/repository.dart

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:file/file.dart';
1010
import 'package:meta/meta.dart';
1111
import 'package:platform/platform.dart';
1212
import 'package:process/process.dart';
13-
import 'package:yaml/yaml.dart';
1413

1514
import './git.dart';
1615
import './globals.dart';
@@ -599,12 +598,6 @@ class FrameworkRepository extends Repository {
599598
static const String defaultUpstream = 'git@github.com:flutter/flutter.git';
600599
static const String defaultBranch = 'master';
601600

602-
Future<CiYaml> get ciYaml async {
603-
final CiYaml ciYaml =
604-
CiYaml((await checkoutDirectory).childFile('.ci.yaml'));
605-
return ciYaml;
606-
}
607-
608601
Future<String> get cacheDirectory async {
609602
return fileSystem.path.join(
610603
(await checkoutDirectory).path,
@@ -857,11 +850,6 @@ class EngineRepository extends Repository {
857850

858851
final Checkouts checkouts;
859852

860-
Future<CiYaml> get ciYaml async {
861-
final CiYaml ciYaml = CiYaml((await checkoutDirectory).childFile('.ci.yaml'));
862-
return ciYaml;
863-
}
864-
865853
static const String defaultUpstream = 'git@github.com:flutter/engine.git';
866854
static const String defaultBranch = 'main';
867855

@@ -930,26 +918,3 @@ class Checkouts {
930918
final ProcessManager processManager;
931919
final Stdio stdio;
932920
}
933-
934-
class CiYaml {
935-
CiYaml(this.file) {
936-
if (!file.existsSync()) {
937-
throw ConductorException('Could not find the .ci.yaml file at ${file.path}');
938-
}
939-
}
940-
941-
/// Underlying [File] that this object wraps.
942-
final File file;
943-
944-
/// Returns the raw string contents of this file.
945-
///
946-
/// This is not cached as the contents can be written to while the conductor
947-
/// is running.
948-
String get stringContents => file.readAsStringSync();
949-
950-
/// Returns the parsed contents of the file as a [YamlMap].
951-
///
952-
/// This is not cached as the contents can be written to while the conductor
953-
/// is running.
954-
YamlMap get contents => loadYaml(stringContents) as YamlMap;
955-
}

dev/conductor/core/pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dependencies:
1515
path: 1.8.3
1616
process: 4.2.4
1717
protobuf: 2.1.0
18-
yaml: 3.1.1
1918

2019
async: 2.10.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
2120
clock: 1.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -65,4 +64,4 @@ dev_dependencies:
6564
web_socket_channel: 2.3.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
6665
webkit_inspection_protocol: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
6766

68-
# PUBSPEC CHECKSUM: f01f
67+
# PUBSPEC CHECKSUM: 721e

dev/conductor/core/test/repository_test.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,15 +393,6 @@ vars = {
393393
expect(didUpdate, false);
394394
});
395395

396-
test('CiYaml(file) will throw if file does not exist', () {
397-
final File file = fileSystem.file('/non/existent/file.txt');
398-
399-
expect(
400-
() => CiYaml(file),
401-
throwsExceptionWith('Could not find the .ci.yaml file at /non/existent/file.txt'),
402-
);
403-
});
404-
405396
test('framework repo set as localUpstream ensures requiredLocalBranches exist locally', () async {
406397
const String commit = 'deadbeef';
407398
const String candidateBranch = 'flutter-1.2-candidate.3';

0 commit comments

Comments
 (0)