From c6230e628f8144a827ef7bee0f568de2a503d17e Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Wed, 22 Jan 2020 11:57:11 +0100 Subject: [PATCH] Fix uri -> path resolution on Windows --- docs/content/en/docs/CLI.md | 2 +- moor_generator/CHANGELOG.md | 4 ++++ moor_generator/lib/src/backends/common/driver.dart | 3 ++- moor_generator/pubspec.yaml | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/content/en/docs/CLI.md b/docs/content/en/docs/CLI.md index d1293b2b..1e129850 100644 --- a/docs/content/en/docs/CLI.md +++ b/docs/content/en/docs/CLI.md @@ -36,7 +36,7 @@ Exits with error code `1` if any error was found. ## Identify databases -This is more of a test command to test that moor's analyzer is working correctly. +This is more of a test command to verify that moor's analyzer is working correctly. It will identify all databases or daos defined in your project. ``` diff --git a/moor_generator/CHANGELOG.md b/moor_generator/CHANGELOG.md index 5f6009a0..16c50c81 100644 --- a/moor_generator/CHANGELOG.md +++ b/moor_generator/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.1 + +- CLI/IDE: Fix path resolution on Windows + ## 2.3.0 - Support explicit type arguments for queries in moor files. In diff --git a/moor_generator/lib/src/backends/common/driver.dart b/moor_generator/lib/src/backends/common/driver.dart index 5b28247b..8653f49b 100644 --- a/moor_generator/lib/src/backends/common/driver.dart +++ b/moor_generator/lib/src/backends/common/driver.dart @@ -75,8 +75,9 @@ class MoorDriver implements AnalysisDriverGeneric { } void _potentiallyNewFile(FoundFile file) { + final path = _resourceProvider.pathContext.fromUri(file.uri); if (!file.isParsed) { - handleFileChanged(file.uri.path); + handleFileChanged(path); } } diff --git a/moor_generator/pubspec.yaml b/moor_generator/pubspec.yaml index a7cc0790..0059cce7 100644 --- a/moor_generator/pubspec.yaml +++ b/moor_generator/pubspec.yaml @@ -1,6 +1,6 @@ name: moor_generator description: Dev-dependency to generate table and dataclasses together with the moor package. -version: 2.3.0 +version: 2.3.1 repository: https://github.com/simolus3/moor homepage: https://moor.simonbinder.eu/ issue_tracker: https://github.com/simolus3/moor/issues @@ -10,7 +10,7 @@ environment: dependencies: collection: ^1.14.0 - recase: ^2.0.1 + recase: '>=2.0.1 <4.0.0' meta: ^1.1.0 path: ^1.6.0 json_annotation: ^3.0.0