Skip to content

Use allowMalformed: true with utf8.decode when checking for hasDocumentation #1889

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

Closed
isoos opened this issue Jan 4, 2019 · 4 comments
Closed
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@isoos
Copy link
Contributor

isoos commented Jan 4, 2019

Otherwise with a few bad UTF-8 characters it will throw:

FileSystemException: Failed to decode data using encoding 'utf-8', path = '/tmp/pub-dartlang-dartdocNPAPOD/pkg/README.md'
#0      _File._tryDecode (dart:io/file_impl.dart:576:7)
#1      _File.readAsStringSync (dart:io/file_impl.dart:596:7)
#2      FileContents.contents (package:dartdoc/src/package_meta.dart:215:31)
#3      Package.hasDocumentation (package:dartdoc/src/model.dart:5990:54)
#4      _LocalInstanceMirror._invokeGetter (dart:mirrors/runtime/libmirrors_impl.dart:329:76)
@jcollins-g jcollins-g added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Jan 4, 2019
@jcollins-g
Copy link
Contributor

P1 (Uncaught exceptions, very rare or with simple workarounds)

@jcollins-g jcollins-g added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Jan 4, 2019
@jcollins-g
Copy link
Contributor

@isoos Is there a package with this problem you can refer me to (to make sure that that's the only problem with it?).

Otherwise, #1890 should fix it.

@isoos
Copy link
Contributor Author

isoos commented Jan 7, 2019

sudoku 0.1.2 for one, I need to look if you need a more up-to-date package. #1890 looks good to me.

@jcollins-g
Copy link
Contributor

No worries. sudoku has about what I expected in its README. I think #1890 should work for it, once that package becomes Dart 2 compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants