astashov / dartdocs.org

Generates the Dart documentation for all the packages in pub
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

Recently published Flutter plugins do not build #47

Open devoncarew opened 7 years ago

devoncarew commented 7 years ago

From @matanlurey on May 9, 2017 22:50

For example:

I'm assuming this is because of some language features or flags that are not on the dartdoc server?

/cc @filiph @sethladd

Copied from original issue: dart-lang/dartdoc#1408

devoncarew commented 7 years ago

Looks like they fail at the pub get stage: https://www.dartdocs.org/documentation/shared_preferences/0.1.1/log.txt.

matanlurey commented 7 years ago

Do we plan on fixing this by I/O?

eseidelGoogle commented 7 years ago

see also https://github.com/flutter/flutter/issues/9796

eseidelGoogle commented 7 years ago

From the other linked bugs, what happened here was that dartdocs runs its generation (inside a VM) as root. The flutter tool explicitly refuses to run as root and thus generation fails.

astashov commented 7 years ago

I think it's fixed: https://www.dartdocs.org/documentation/url_launcher/0.4.1/

eseidelGoogle commented 7 years ago

Now the question is, why do "dart:" libraries appear in those docs? :D But that's a separate bug.

astashov commented 7 years ago

Yup. :)

mit-mit commented 7 years ago

@astashov as per https://github.com/flutter/flutter/issues/9547 crossdart now works great for plugins (e.g. https://www.crossdart.info/p/firebase_database/0.0.3/).

However, dartdocs.org seems to only work for some plugins. For example, https://www.dartdocs.org/documentation/url_launcher/0.4.2%2B1/ is there but https://www.dartdocs.org/documentation/firebase_database/0.0.3/ is not.

Do we need to trigger a build or something to get dartdocs for all plugins?

astashov commented 7 years ago

We could manually remove failed package names from Datastore, and then dartdocs.org would try to build them again. Or just launch a full rebuild of all the Dart packages, but that would take a while.

There's no command/script to rebuild only the packages, that failed, unfortunately.

astashov commented 7 years ago

Since you have just like 20 of them, it's prob simpler to do that manually :)

astashov commented 7 years ago

Okay, I've relaunched generation for all the Flutter plugins.

mit-mit commented 7 years ago

Thanks!

mit-mit commented 7 years ago

We seem to still be missing docs for these?

https://www.dartdocs.org/documentation/firebase_messaging/0.0.3/ https://www.dartdocs.org/documentation/firebase_database/0.0.3/ https://www.dartdocs.org/documentation/firebase_auth/0.0.2%2B1/ https://www.dartdocs.org/documentation/firebase_analytics/0.0.2/ https://www.dartdocs.org/documentation/battery/0.0.1%2B1/ https://www.dartdocs.org/documentation/video_launcher/0.2.1/ https://www.dartdocs.org/documentation/flutter_webview_plugin/0.0.2/ https://www.dartdocs.org/documentation/fullscreen_mode/1.0.0/

astashov commented 7 years ago

The generation is not finished yet, you can track progress there: https://www.dartdocs.org/history/index.html

astashov commented 7 years ago

By some reason it takes quite long to generate docs for Flutter plugins, because by some reason it generates docs for half of SDK as well.

mit-mit commented 7 years ago

Yes, I'm working on a bug to have our dartdoc team look at that.

jcollins-g commented 7 years ago

The flutter SDK is in some instances referenced directly with a 'path' to sky_engine, which seems to confuse crossdart (many errors and warnings that dartdocs.org seems to ignore). Probably something similar is happening to dartdoc. I'm investigating dartdoc's part of the problem in dart-lang/dartdoc#1431.

mit-mit commented 7 years ago

Docs are now missing for just three plugins: https://www.dartdocs.org/documentation/firebase_database/0.0.4/ https://www.dartdocs.org/documentation/video_launcher/0.2.1/ https://www.dartdocs.org/documentation/firebase_auth/0.0.2%2B1/

@jcollins-g do those looks like dartdoc problems?

devoncarew commented 7 years ago

I see exceptions in at least one log: https://www.dartdocs.org/documentation/firebase_database/0.0.4/log.txt

jcollins-g commented 7 years ago

This looks like it is related to the update of analyzer. I recommend pinning dartdoc to 0.11.2 on dartdocs.org and rebuilding, I will look into the failures.

Janice

On Wed, May 24, 2017 at 7:29 AM, Devon Carew notifications@github.com wrote:

I see exceptions in at least one log: https://www.dartdocs.org/ documentation/firebase_database/0.0.4/log.txt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/astashov/dartdocs.org/issues/47#issuecomment-303741381, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdn2wDujxml50pmTKOd5Jb6IdikYsjgks5r9D7lgaJpZM4NV-wf .

jcollins-g commented 7 years ago

A large number of the exceptions are from crossdart; I'm not looking at that part.

Janice

On Wed, May 24, 2017 at 7:49 AM, jcollins-g notifications@github.com wrote:

This looks like it is related to the update of analyzer. I recommend pinning dartdoc to 0.11.2 on dartdocs.org and rebuilding, I will look into the failures.

Janice

On Wed, May 24, 2017 at 7:29 AM, Devon Carew notifications@github.com wrote:

I see exceptions in at least one log: https://www.dartdocs.org/ documentation/firebase_database/0.0.4/log.txt

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/astashov/dartdocs.org/issues/47# issuecomment-303741381, or mute the thread https://github.com/notifications/unsubscribe-auth/ ANdn2wDujxml50pmTKOd5Jb6IdikYsjgks5r9D7lgaJpZM4NV-wf .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/astashov/dartdocs.org/issues/47#issuecomment-303747856, or mute the thread https://github.com/notifications/unsubscribe-auth/ANdn24FuTeoD7DVJgTX_NCHMqvOEUloTks5r9EOUgaJpZM4NV-wf .

devoncarew commented 7 years ago

@astashov, perhaps we can make the crossdart generation independent of that for dartdocs.org? Specifically I'm thinking that it would be nice to have docs available on dartdocs.org even if the crossdart generation fails.

astashov commented 7 years ago

Exceptions from crossdart don't affect documentation - worst case scenario - the source code in the generated dartdoc HTML won't have links to crossdart.

jcollins-g commented 7 years ago

Although it is hard for me to tell as this is a flutter plugin (and I am still becoming familiar with these), the firebase_database looks like a bad package. It doesn't analyze properly because of missing imports for @required and @visibleForTesting.

Looking at the others now.

eseidelGoogle commented 7 years ago

Flutter "plugins" are just Dart packages with a bit of java and obj-c thrown in (and such is noted in the pubspec.yaml). From a dart perspective, they're no different from dart packages (and we should probably drop the distinction anyway). The source for firebase_database is: https://github.com/flutter/plugins/tree/master/packages/firebase_database

eseidelGoogle commented 7 years ago

I agree, I see use of @required, but no import of package:meta (or dependency on it in the pubspec). https://github.com/flutter/plugins/blob/master/packages/firebase_database/lib/ui/firebase_list.dart How would this package have passed analysis or pub publish validation?

jcollins-g commented 7 years ago

Don't know; it fails analysis with the old analyzer too.

jcollins-g commented 7 years ago

firebase_auth on the other hand will work with 0.12.0 dartdoc but fails analysis with 0.11.2.

jcollins-g commented 7 years ago

@mit-mit made a change to github that isn't published yet to correct the SDK dependency for flutter_video_launcher, but once that is fixed the plugin will document successfully with 0.12.0

jcollins-g commented 7 years ago

From dartdoc's perspective these are/were 'bad' packages in two cases (firebase_database and flutter_video_launcher), while 0.12.0 seems to do a better job with firebase_auth and you should just rerun with the new version there.

goderbauer commented 7 years ago

I see those firebase_database analyzer errors locally. Looking into fixing them right now...

goderbauer commented 7 years ago

I wish we could run the analyzer on the plugins on Travis to catch these problems, but https://github.com/flutter/flutter/issues/10015 is currently blocking that, unfortunately.

devoncarew commented 7 years ago

@goderbauer, you could explore using tuneup on travis to catch analysis errors. It's based on the analysis server, so would be able to handle nested .packages files.

pub global activate tuneup
pub global run tuneup check
mit-mit commented 7 years ago

@jcollins-g are you still looking at this? We are still missing docs for these two: https://pub.dartlang.org/packages/firebase_database https://pub.dartlang.org/packages/firebase_auth

mit-mit commented 7 years ago

Ah, wait, this is likely this right? https://github.com/flutter/flutter/issues/10528

jcollins-g commented 7 years ago

@mit-mit That may be part of it, as I mentioned above those two packages are/were broken from analyzer's perspective. Until that gets corrected docs won't properly generate for them.

mit-mit commented 7 years ago

They pass flutter analyze for me now, after https://github.com/flutter/plugins/pull/103. Is that enough?

alextekartik commented 6 years ago

It seems that some flutter plugins documentation generation fail again:

due to some dependency conflict

21:51:45.346 [INFO] dartdoc:Running 'pub --version'
21:51:45.514 [INFO] dartdoc:Stdout: Pub 1.24.2
21:51:45.514 [INFO] dartdoc:Running 'pub cache add sqflite -v 0.6.2'
21:51:46.043 [INFO] dartdoc:Stdout: Downloading sqflite 0.6.2...
21:51:46.043 [INFO] dartdoc:Running 'pub get'
21:51:47.419 [INFO] dartdoc:Stdout: Resolving dependencies...
21:51:47.419 [INFO] dartdoc:
             Stderr: Incompatible version constraints on async:
             - flutter_test 0.0.0 depends on version 2.0.3
             - pub itself depends on version >=1.8.0 <2.0.0

it worked some time (weeks?) ago