Closed
Bug 786280
Opened 12 years ago
Closed 10 years ago
test documentation examples
Categories
(Add-on SDK Graveyard :: General, defect, P2)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: evold, Unassigned)
References
Details
cfx test should test the code examples used in the documentation.
Reporter | ||
Comment 1•12 years ago
|
||
a check that the code is valid should be done at the least
Priority: -- → P2
I see a "cfx testex" in the cfx documentation: https://addons.mozilla.org/en-US/developers/docs/sdk/1.9/dev-guide/cfx-tool.html#cfx%20testex
Is that what this bug is about?
Reporter | ||
Comment 3•11 years ago
|
||
Will we keep these documentation examples in our repo? perhaps we can break them out in to some other repo since the docs are going to be on MDN?
Flags: needinfo?(rFobic)
Flags: needinfo?(dtownsend+bugmail)
Reporter | ||
Updated•11 years ago
|
Blocks: native-jetpack
Comment 4•11 years ago
|
||
Which code samples are you talking about here?
Flags: needinfo?(dtownsend+bugmail) → needinfo?(evold)
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Dave Townsend (:Mossop) from comment #4)
> Which code samples are you talking about here?
These https://github.com/mozilla/addon-sdk/tree/master/examples
Flags: needinfo?(evold)
Reporter | ||
Comment 6•11 years ago
|
||
Hmm actually, when I made this bug I went purely the examples in the docs, the code snippets, iirc, but also the examples here https://github.com/mozilla/addon-sdk/tree/master/examples are referred to in the docs, but are already tested.
So what I asked in comment 3 applies to both.
Comment 7•11 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #6)
> Hmm actually, when I made this bug I went purely the examples in the docs,
> the code snippets, iirc, but also the examples here
> https://github.com/mozilla/addon-sdk/tree/master/examples are referred to in
> the docs, but are already tested.
>
> So what I asked in comment 3 applies to both.
I would say that the docs samples remain in MDN and the example add-ons in our repo, since we have tests for them, but I'm open to alternatives. What do you think Will?
Flags: needinfo?(wbamberg)
Comment 8•11 years ago
|
||
(In reply to Dave Townsend (:Mossop) from comment #7)
> (In reply to Erik Vold [:erikvold] [:ztatic] from comment #6)
> > Hmm actually, when I made this bug I went purely the examples in the docs,
> > the code snippets, iirc, but also the examples here
> > https://github.com/mozilla/addon-sdk/tree/master/examples are referred to in
> > the docs, but are already tested.
> >
> > So what I asked in comment 3 applies to both.
>
> I would say that the docs samples remain in MDN and the example add-ons in
> our repo, since we have tests for them, but I'm open to alternatives. What
> do you think Will?
Yes, I'd agree with that. At least, that the code samples embedded in the docs will move to MDN, and will not have tests written for them (although I would love this to be possible).
As far as the example add-ons in /examples, we could move them to a new repo along with their tests or keep them where they are, I'm agnostic about that.
I would question how much value they actually add, since they haven't been actively maintained in years. Do we think people really use them or even know that they exist? I think we should either just remove them or look after them better - add more examples, and make them more accessible.
Flags: needinfo?(wbamberg)
Comment 9•11 years ago
|
||
(In reply to Erik Vold [:erikvold] [:ztatic] from comment #3)
> Will we keep these documentation examples in our repo? perhaps we can break
> them out in to some other repo since the docs are going to be on MDN?
I'd be down with moving into separate repo, my only worry is we may break them and not even notice
breaking them. If they were still tested on tbpl I guess that wouldn't be a big issue then.
I also do think we should be writing a lot more examples, in fact we should have at least on example per
API, I would even say it should be as important as writing tests.
Flags: needinfo?(rFobic)
Updated•10 years ago
|
No longer blocks: native-jetpack
Reporter | ||
Comment 10•10 years ago
|
||
Sorry we won't be releasing any new versions of cfx, jpm is the replacement https://www.npmjs.com/package/jpm
We can do this with jpm however.
You need to log in
before you can comment on or make changes to this bug.
Description
•