Skip to content

Make @API public to allow Extensions and TestEngines to adopt API semantics #317

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

Merged
merged 1 commit into from
Jul 25, 2016

Conversation

smoyer64
Copy link
Contributor

Making @API public allows Extension and TestEngine developers to adopt JUnit 5's API "typing". This also makes the API tools proposed in #144 more useful as they'd be applicable to the other projects.


I hereby agree to the terms of the JUnit Contributor License Agreement.

@sbrannen
Copy link
Member

Interesting proposal!

We'll consider it for M2.

@sbrannen sbrannen added this to the 5.0 M2 milestone Jun 18, 2016
@sbrannen sbrannen changed the title Making API public allows Extensions and TestEngines to adopt API typing. Making @API public allows Extensions and TestEngines to adopt API semantics Jun 21, 2016
@sbrannen sbrannen changed the title Making @API public allows Extensions and TestEngines to adopt API semantics Make @API public to allow Extensions and TestEngines to adopt API semantics Jun 22, 2016
@volkovs
Copy link
Contributor

volkovs commented Jun 25, 2016

@smoyer64 if @API is accepted to be public, should not it be moved from junit-commons to junit-api module? Usage in 3-rd party code will require production code dependency on junit-api, but at least junit-api is lightweight.

P.S. Ideally it should be in separate module/project in future allowing projects still in Java 7 to use it (it might still be true for current annotation location). Separate project might unite very different API tools #144 (including FindBug rules checking for internal API usage and maven plugins as code scanners / release notes builders).

@smoyer64
Copy link
Contributor Author

@volkovs The junit-jupiter-api module already has a dependency on junit-platform-commons. My initial thought was that I'd like to use @API and it's related tools elsewhere - in which case a completely standalone module would be better. When Java 9 is released, project jigsaw is supposed to take care of hiding internal-only API calls (per JEP 260: Encapsulate Most Internal APIs). Will we get enough tools to replace @API? I have no idea.

@sbrannen
Copy link
Member

@volkovs, moving @API to the junit-jupiter-api module is forbidden: various parts of the JUnit Platform use @API, and Platform modules must not have any dependencies on JUnit Jupiter or JUnit Vintage modules.

I agree with @smoyer64: one viable option would be to move @API to its own artifact. The JUnit team has in fact already discussed such a possibility.

@sbrannen
Copy link
Member

Team Decision: make Experimental.

@sbrannen
Copy link
Member

Would you mind rebasing on master and squashing into a single commit?

@marcphilipp
Copy link
Member

We could just squash and merge through GitHub, couldn't we?

@sbrannen
Copy link
Member

I'm not sure if that new GitHub squash feature physically rebases on master.

@smoyer64
Copy link
Contributor Author

I tried to use git commit --squash (but now know I should stick with git rebase). Sorry!

@sbrannen
Copy link
Member

I usually do something like this:

> git rebase master
> git rebase --interactive --autosquash HEAD~4

Then I select "f" (for fix) for the last three commits and reword the remaining commit if necessary.

@smoyer64 smoyer64 force-pushed the feature/stable-api branch from c3bafa3 to f9c4801 Compare July 25, 2016 16:48
@smoyer64
Copy link
Contributor Author

Okay ... I'm sticking with my favorite method (for branches) - it's back to a single commit!

git reset master
git add ...
git commit -m "<altered message>"
git push -f

@sbrannen
Copy link
Member

Aye aye, captain!

Whatever floats your boat... and gets your commits clean. 😉

@sbrannen sbrannen merged commit 8048a0a into junit-team:master Jul 25, 2016
@sbrannen sbrannen self-assigned this Jul 25, 2016
@smoyer64
Copy link
Contributor Author

Someone seems to have noticed my avatar?

@smoyer64 smoyer64 deleted the feature/stable-api branch July 25, 2016 17:35
@sbrannen
Copy link
Member

ummmmmmm

no....

not consciously at least.

But now that you mention it, perhaps that was my subconscious telling me what to type. 😉

@sbrannen
Copy link
Member

FYI: this issue is related to #436.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants