dart-lang / code_builder

A fluent API for generating valid Dart source code
https://pub.dev/packages/code_builder
BSD 3-Clause "New" or "Revised" License
423 stars 66 forks source link

emitter generates relative import URLs with backslashes on Windows #383

Open srawlins opened 1 year ago

srawlins commented 1 year ago

I don't have a repro for this; this comes from https://github.com/dart-lang/mockito/issues/591 where @adbonnin has a repro.

Backslashes should not be used in relative import URLs.

The line of code in question is probably https://github.com/dart-lang/code_builder/blob/master/lib/src/emitter.dart#L336

myThorsten commented 1 year ago

Here is what this looks like: image