-
Notifications
You must be signed in to change notification settings - Fork 45
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
Look into updating the audit files #259
Comments
Thanks for filing the issue. Had it on my TODO but went offline earlier yesterday. To fill in some details:
The separate project that is used to generate the links between tests and audit file is this one - https://github.com/jboss/jboss-test-audit. To my knowledge, it was only ever used by CDI and bean validation specs but it shouldn't be an issue to export it under jakarta repos if we need/want to. Personally, big +1 for putting this back on track. This makes working with TCKs and looking for certain tests much easier. Although it will be quite some effort due to ongoing re-shuffling of spec due to Lite addition. |
So I have done some basic testing of how one might create the audit-*.xml files from the asciidoc. It seems doable, but one would have to adopt a convention for identifying the test assertions using asciidoc roles/attributes and should probably also include an anchor to be able create a comprehensive cross references of assertions. The big work will be updating the tests to use the updated @SpecVersion and @SpecAssertion or matching the generated files to their usage. I don't quite have my head around the entire process yet. |
I have also thought about how spec<->TCK cross-referencing could work. Apparently, Asciidoctor can be extended using macros, so we could define syntax like The biggest problem is that it's a kinda chicken-and-egg situation. If you have the spec text annotated with macros like Oh and personally, I don't really like how the spec with links to TCK looks right now. IMHO, it should look like the normal spec looks, except each sentence (or block) that has a corresponding TCK test, would be enclosed in some parens and after those parens, there would be a small link to the test (not class, but directly the method, that should be easily possible). |
The original idea was to deliberately ship two variants of the spec doc as most people don't need/want to see links to TCKs while browsing the spec. And I think that was a good idea. It also allows you to perform this extra spec doc build after you have both, CDI and TCK built (if I understand your chickens and eggs correctly :)) Also note that:
|
Yea I didn't think the only spec variant should be "with TCK annotations". There should of course always be a plain spec. I thought about it more and my chicken-and-egg problem can be easily resolved by putting the TCK in charge of rendering the annotated spec version. The workflow would look something like this:
I might be missing something obvious, but this seems like a much more straightforward solution than what we have right now? |
I was able to build a proof of concept. Here's how the outcome looks like: https://ladicek.github.io/cdi-tck/#legal_bean_types The proof of concept code itself is here: https://github.com/Ladicek/specref The required changes to CDI spec are here: https://github.com/Ladicek/cdi-spec/commits/specref And the required changes to CDI TCK are here: https://github.com/Ladicek/cdi-tck/commits/specref |
@Ladicek So you also created a io.smallrye.specref-core repo as well, because I'm not finding that in the io.smallrye org. Is that an asciidoc extension or converter? |
@starksm64 I used the The (In between the 2 Asciidoctor extension invocations, there's a Java annotation processor. It actually works as described in #259 (comment) -- I just proved that the concept described in that comment can actually work.) |
Signed-off-by: Scott M Stark <[email protected]>
The TCK has various tck-audit-*.xml files that conform to the http://jboss.com/products/weld/tck/audit schema that providing a mapping from specification assertions and associated text to the actual unit test. This has gotten out of date, and it should be a goal to bring these files back into alignment with the specifications.
With the move to asciidoc, it may be possible to create a converter that allows for the generation of the audit files.
The text was updated successfully, but these errors were encountered: