From 552b3f3ebbf121879f924aa9f6ab293a87bde062 Mon Sep 17 00:00:00 2001 From: devmil Date: Wed, 11 Dec 2024 11:13:42 +0100 Subject: [PATCH 1/3] add test for git based ffigen (and therefore dependency overrides) --- .../cli/extract_command_test.dart | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/test/integration_tests/cli/extract_command_test.dart b/test/integration_tests/cli/extract_command_test.dart index 454cb54..8b8f229 100644 --- a/test/integration_tests/cli/extract_command_test.dart +++ b/test/integration_tests/cli/extract_command_test.dart @@ -240,7 +240,8 @@ void main() { }, timeout: integrationTestTimeout, ); - test('Can handle ffigen dependency overrides correctly', () async { + test('Can handle ffigen dependency overrides correctly (pub ref)', + () async { final packageName = 'ffigen'; final packageVersion = '16.0.0'; @@ -251,5 +252,43 @@ void main() { ]); expect(exitCode, 0); }); + test('Can handle ffigen dependency overrides correctly (git ref)', + () async { + final gitUrl = 'https://github.com/dart-lang/native.git'; + final gitRef = 'cb477002e2d2559975d76165210eeca98821688d'; + final relativePath = 'pkgs/ffigen'; + + // create temporary directory + final tempDir = await Directory.systemTemp.createTemp(); + + try { + // clone repo + final resultClone = Process.runSync('git', [ + 'clone', + gitUrl, + tempDir.path, + ]); + assert(resultClone.exitCode == 0); + + // checkout ref + final resultCheckout = Process.runSync( + 'git', + [ + 'checkout', + gitRef, + ], + workingDirectory: tempDir.path); + assert(resultCheckout.exitCode == 0); + + final exitCode = await runner.run([ + 'extract', + '--input', + '${tempDir.path}/$relativePath', + ]); + expect(exitCode, 0); + } finally { + tempDir.deleteSync(recursive: true); + } + }); }); } From 4b9c1b207dd5217feda724c5bcc7d611b3d4f0bc Mon Sep 17 00:00:00 2001 From: devmil Date: Wed, 11 Dec 2024 11:16:50 +0100 Subject: [PATCH 2/3] Version 0.20.1 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d4b7879..3b7dc0c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: dart_apitool description: A tool to analyze the public API of a package, create a model of it and diff it against another version to check semver. repository: https://github.com/bmw-tech/dart_apitool -version: 0.20.1-dev +version: 0.20.1 environment: sdk: ">=3.0.0 <4.0.0" From bc037e61b4ea5b67ee16c97d358539620d08ef19 Mon Sep 17 00:00:00 2001 From: devmil Date: Wed, 11 Dec 2024 11:16:57 +0100 Subject: [PATCH 3/3] Version 0.20.2-dev --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 3b7dc0c..fba97dc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ name: dart_apitool description: A tool to analyze the public API of a package, create a model of it and diff it against another version to check semver. repository: https://github.com/bmw-tech/dart_apitool -version: 0.20.1 +version: 0.20.2-dev environment: sdk: ">=3.0.0 <4.0.0"