Skip to content

Dartdoc does not run under --preview-dart-2 #1668

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
6 tasks done
jcollins-g opened this issue Apr 13, 2018 · 11 comments
Closed
6 tasks done

Dartdoc does not run under --preview-dart-2 #1668

jcollins-g opened this issue Apr 13, 2018 · 11 comments
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@jcollins-g
Copy link
Contributor

jcollins-g commented Apr 13, 2018

A number of (mostly runtime) exceptions occur within dartdoc and mustache4dart, the templating package dartdoc uses.

This is distinct from dartdoc understanding dart 2 code; it does this already.

@jcollins-g jcollins-g added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Apr 13, 2018
@devoncarew
Copy link
Member

Note: mustache4dart has not been updated in 10 months https://github.com/valotas/mustache4dart

@devoncarew
Copy link
Member

valotas/mustache4dart#70

@devoncarew
Copy link
Member

@jcollins-g, 2.1.1 of mustach2dart has been published: https://pub.dartlang.org/packages/mustache4dart

@jcollins-g
Copy link
Contributor Author

@devoncarew I have some changes to mustache4dart on deck. I'll upload a PR once I have a steel thread through dartdoc.

@jcollins-g
Copy link
Contributor Author

With #1669, this is almost ready to go. But we're blocked on pub run support, an analyzer package, and dart-lang/sdk#32901.

@jcollins-g jcollins-g added the status-blocked Blocked from making progress by another (referenced) issue label Apr 17, 2018
@jcollins-g
Copy link
Contributor Author

Attempting this end to end has uncovered more things we need to tweak in library dependencies.

@jcollins-g
Copy link
Contributor Author

Analyzer publish has happened; once test package is updated we can move to the new analyzer with preview-dart-2 support.

@jcollins-g jcollins-g removed the status-blocked Blocked from making progress by another (referenced) issue label May 25, 2018
@jcollins-g
Copy link
Contributor Author

jcollins-g commented May 29, 2018

Running tests now to determine if a new dartdoc roll is a prerequisite to enabling dart 2 in the snapshot generation. Hopefully not -- I think dart-lang/sdk#32901 is really the last bug.

@jcollins-g
Copy link
Contributor Author

Tests pass with the bleeding edge SDK. Will switch snapshots in the SDK immediately, then follow up with a new dartdoc release.

@jcollins-g
Copy link
Contributor Author

Building a snapshot seems to have stronger requirements than running with --preview-dart-2. This error had never shown up in previous testing.

[1/1] Regenerating ninja files
[5/13] ACTION //utils/dartdoc:dartdoc(//build/toolchain/linux:clang_x64)
FAILED: gen/dartdoc.dart.snapshot 
python ../../build/gn_run_binary.py compiled_action dart --deterministic --packages=/usr/local/google/home/jcollins/dart/sdk/sdk/.packages --snapshot=gen/dartdoc.dart.snapshot --snapshot-depfile=/usr/local/google/home/jcollins/dart/sdk/sdk/out/ReleaseX64/gen/dartdoc.dart.snapshot.d --preview-dart-2 --snapshot-kind=app-jit /usr/local/google/home/jcollins/dart/sdk/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart --help
Command failed: ./dart --deterministic --packages=/usr/local/google/home/jcollins/dart/sdk/sdk/.packages --snapshot=gen/dartdoc.dart.snapshot --snapshot-depfile=/usr/local/google/home/jcollins/dart/sdk/sdk/out/ReleaseX64/gen/dartdoc.dart.snapshot.d --preview-dart-2 --snapshot-kind=app-jit /usr/local/google/home/jcollins/dart/sdk/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart --help
output: Generate HTML documentation for Dart libraries.

Usage: dartdoc [OPTIONS]

Unhandled exception:
Failed assertion: boolean expression must not be null
#0      Usage.calculateColumnWidths (package:args/src/usage.dart)
#1      Usage.generate (package:args/src/usage.dart:61:5)
#2      ArgParser.usage (package:args/src/arg_parser.dart:318:56)
#3      _printUsageAndExit (file:///usr/local/google/home/jcollins/dart/sdk/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart:103:16)
#4      _printHelpAndExit (file:///usr/local/google/home/jcollins/dart/sdk/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart:97:3)
#5      main (file:///usr/local/google/home/jcollins/dart/sdk/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart:60:5)
<asynchronous suspension>
#6      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:277:32)
#7      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)

ninja: build stopped: subcommand failed.
BUILD FAILED
~/dart/sdk/sdk
$ 

@jcollins-g
Copy link
Contributor Author

jcollins-g commented May 29, 2018

Actually, it turns out that --help was never actually tested before attempting to use it as a training run for snapshot generation. Dartdoc was passing a null to an optional parameter (hide) in the args library and this wasn't caught until the --help case because there was no other comparison in the args library assuming that hide was always a boolean.

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
Projects
None yet
Development

No branches or pull requests

2 participants