Closed Andersmholmgren closed 10 years ago
Which package and version did this happen on?
It's happening on most of my packages for several versions Shelf_route eg 0.7.0 Shelf_bind
Etc
On 6 Aug 2014, at 1:50 pm, Seth Ladd notifications@github.com wrote:
Which package and version did this happen on?
— Reply to this email directly or view it on GitHub https://github.com/financeCoding/dart-carte-du-jour/issues/83#issuecomment-51290881 .
Curious, can you build the docs yourself? Wondering if this is dartdocs.org specific.
I've never tried. I'll try to get time to try tonight
The fact I saw it on 3 packages with the same problem may mean it is affecting all packages that use @override
On 6 Aug 2014, at 2:16 pm, Seth Ladd notifications@github.com wrote:
Curious, can you build the docs yourself? Wondering if this is dartdocs.org specific.
— Reply to this email directly or view it on GitHub https://github.com/financeCoding/dart-carte-du-jour/issues/83#issuecomment-51291973 .
Just checked a few things out. dartdocs uses the latest dev release sdk ttp://storage.googleapis.com/dart-archive/channels/dev/release/latest/sdk/dartsdk-linux-x64-release.zip which was Dart VM version: 1.6.0-dev.6.0 (Mon Jul 28 08:19:10 2014) on "linux_x64"
in this case. Looking at the annotations.dart commit https://github.com/dart-lang/bleeding_edge/commit/b1e69fc85e7f21de568e2d2f09518f10a14e0f46#diff-678be050807a7ffae3966f8c93eae2e0 I think @deprecated
should be @Deprecated
. When I changed the files in the shelf packages to @Deprecated
the docs built.
The shelf packages have the following constraint
environment:
sdk: '>=1.2.0 <2.0.0'
so dev release sdk is technically correct but a fail in transition.
I have not followed the @Deprecated
thing very close so might want to check-in with lrn@ or paulberry@
@override
vs @Override
would be in that same commit.
Thanks Adam. I wasn't aware of this change. Interestingly I run locally with latest dev channel and have never seen an error but maybe I've missed it. I'll update my projects
On 6 Aug 2014, at 2:39 pm, Adam Singer notifications@github.com wrote:
Just checked a few things out. dartdocs uses the latest dev release sdk ttp:// storage.googleapis.com/dart-archive/channels/dev/release/latest/sdk/dartsdk-linux-x64-release.zip which was Dart VM version: 1.6.0-dev.6.0 (Mon Jul 28 08:19:10 2014) on "linux_x64" in this case. Looking at the annotations.dart https://github.com/dart-lang/bleeding_edge/commits/master/dart/sdk/lib/core/annotations.dart commit dart-lang/bleeding_edge@b1e69fc#diff-678be050807a7ffae3966f8c93eae2e0 https://github.com/dart-lang/bleeding_edge/commit/b1e69fc85e7f21de568e2d2f09518f10a14e0f46#diff-678be050807a7ffae3966f8c93eae2e0 I think @deprecated should be @Deprecated. When I changed the files in the shelf packages to @Deprecated the docs built.
The shelf packages have the following constraint
environment: sdk: '>=1.2.0 <2.0.0'
so dev release sdk is technically correct but a fail in transition.
I have not followed the @Deprecated thing very close so might want to check-in with lrn@ or paulberry@.
— Reply to this email directly or view it on GitHub https://github.com/financeCoding/dart-carte-du-jour/issues/83#issuecomment-51293049 .
@Andersmholmgren I might of misunderstood something. Dont actually follow my last two comments. https://github.com/dart-lang/bleeding_edge/blob/b1e69fc85e7f21de568e2d2f09518f10a14e0f46/dart/sdk/lib/core/annotations.dart#L82 is still defined. So not sure what is going on, could be docgen not able to parse the code for the annotation?
@Andersmholmgren Now I understand the issue. If you want to use deprecated with a parameter you must use the Deprecated
class not the deprecated
constant.
Error: 'deprecated' is not a type.
@deprecated('use bind')
^^^^^^^^^^
Should be @Deprecated('use bind')
cause of the string parameter passed in. If you wanted to mark something as deprecated for the next release then the @deprecated
constant can be used.
const Deprecated deprecated = const Deprecated("next release");
About the issues you're seeing with @override
, are you passing any parameters to it? If not then @overrride
should work.
Sorry for any confusion in the previous comments.
Ah right. I hadn't noticed I was using it wrong. I never noticed any editor warnings so assumed I typed it correctly. My bad
Thanks a lot for chasing it up. Will be nice to see docs for my packages once I fix
Cheers Anders
On 6 Aug 2014, at 2:55 pm, Adam Singer notifications@github.com wrote:
@Andersmholmgren https://github.com/Andersmholmgren Now I understand the issue. If you want to use deprecated with a parameter you must use the Deprecated class not the deprecated constant.
Error: 'deprecated' is not a type. @deprecated('use bind') ^^^^^^^^^^
Should be @Deprecated('use bind') cause of the string parameter passed in. If you wanted to mark something as deprecated for the next release then the @deprecated constant can be used.
const Deprecated deprecated = const Deprecated("next release");
About the issues you're seeing with @override, are you passing any parameters to it? If not then @overrride should work.
Sorry for any confusion in the previous comments.
— Reply to this email directly or view it on GitHub https://github.com/financeCoding/dart-carte-du-jour/issues/83#issuecomment-51293830 .
Wow, good analysis and tech support!
@Andersmholmgren can you open a bug for the analyzer, in dartbug.com ? It should at least display a Hint or warning.
.e.g Jul 22 20:57:00 b-78ef0163a40a9a3f5618ab6214739 startupscript: Error: 'deprecated' is not a type. Jul 22 20:57:00 b-78ef0163a40a9a3f5618ab6214739 startupscript: @deprecated('use getPathParameters')