mirror of
https://github.com/flutter/packages.git
synced 2025-07-01 15:23:25 +08:00
pigeon: fixed windows execution by using posix path imports (#230)
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
## 0.1.13
|
||||
|
||||
* Fixed execution on Windows with certain setups where Dart didn't allow
|
||||
backslashes in `import` statements.
|
||||
|
||||
## 0.1.12
|
||||
|
||||
* Fixed assert failure with creating a PlatformException as a result of an
|
||||
|
@ -18,7 +18,11 @@ Future<void> main(List<String> args) async {
|
||||
final String rawInputPath = opts.input;
|
||||
final String absInputPath = File(rawInputPath).absolute.path;
|
||||
final String relInputPath = path.relative(absInputPath, from: tempDir.path);
|
||||
importLine = 'import \'$relInputPath\';\n';
|
||||
|
||||
final List<String> relInputComponents = path.split(relInputPath);
|
||||
final path.Context context = path.Context(style: path.Style.posix);
|
||||
final String posixRelInputPath = context.joinAll(relInputComponents);
|
||||
importLine = 'import \'$posixRelInputPath\';\n';
|
||||
}
|
||||
final String code = """$importLine
|
||||
import 'dart:io';
|
||||
|
@ -8,7 +8,7 @@ import 'dart:mirrors';
|
||||
import 'ast.dart';
|
||||
|
||||
/// The current version of pigeon.
|
||||
const String pigeonVersion = '0.1.12';
|
||||
const String pigeonVersion = '0.1.13';
|
||||
|
||||
/// Read all the content from [stdin] to a String.
|
||||
String readStdin() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: pigeon
|
||||
version: 0.1.12
|
||||
version: 0.1.13
|
||||
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
|
||||
homepage: https://github.com/flutter/packages/tree/master/packages/pigeon
|
||||
dependencies:
|
||||
|
Reference in New Issue
Block a user