Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically handle absolute URLs for FileImporters #1527

Merged
merged 1 commit into from Oct 13, 2021

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Oct 6, 2021

@nex3 nex3 marked this pull request as ready for review October 9, 2021 01:21
@nex3 nex3 requested a review from Awjin October 9, 2021 01:21
@@ -27,7 +27,7 @@ class NodeToDartFileImporter extends Importer {
NodeToDartFileImporter(this._findFileUrl);

Uri? canonicalize(Uri url) {
if (url.scheme != 'file' && url.scheme != '') return null;
if (url.scheme == 'file') return _filesystemImporter.canonicalize(url);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't you keep a if (url.scheme != '') return null; after that ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we want custom importers to have the ability to use custom schemes .

@nex3 nex3 merged commit aa81b12 into main Oct 13, 2021
@nex3 nex3 deleted the file-importer-absolute branch October 13, 2021 02:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants