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

Add file-stateful and stateless / global stateful check markers #4883

Closed
soon opened this Issue Aug 2, 2017 · 6 comments

Comments

@soon
Contributor

soon commented Aug 2, 2017

This is a subtask of #4869, because CheckCloneService uses these markers to create appropriate clone for each check type.

This is also a subtask of #4870

In this task two markers should be added:

  1. stateless / global stateful marker (e.g. OneCheckInstancePerApplication)
  2. file-stateful (e.g. OneCheckInstancePerThread or OneCheckInstancePerFile)
@soon

This comment has been minimized.

Show comment
Hide comment
@soon

soon Aug 2, 2017

Contributor

Previously, when I told about file-stateful checks I always use OneCheckInstancePerThread interface name.

Now I'm not sure if this is correct name. The OneCheckInstancePerThread says about implementation details, while OneCheckInstancePerFile says about the expected behavior.

@romani @rnveach @sabaka @Vladlis What do you think? I'm suggesting the OneCheckInstancePerApplication and OneCheckInstancePerFile names, however, there might be other options, like SingleCheckInstance, ThreadLocalCheck and so on.

Contributor

soon commented Aug 2, 2017

Previously, when I told about file-stateful checks I always use OneCheckInstancePerThread interface name.

Now I'm not sure if this is correct name. The OneCheckInstancePerThread says about implementation details, while OneCheckInstancePerFile says about the expected behavior.

@romani @rnveach @sabaka @Vladlis What do you think? I'm suggesting the OneCheckInstancePerApplication and OneCheckInstancePerFile names, however, there might be other options, like SingleCheckInstance, ThreadLocalCheck and so on.

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Aug 2, 2017

Member

@soon Naming is small problem, as logic is more important right now since we aren't in PR stage.

OneCheckInstancePerThread

It depends on what is in a thread as we haven't seen any PRs for your threading implementation for Checker, which I asked if we could start a while ago.

OneCheck

Check shouldn't be in name if it can be applied to other modules like AbstractFileSet. It should be Module.

SingleCheckInstance
ThreadLocalCheck

These names sound too technically and not easy to understand, so I don't like them compared to the others.

Application
Thread

These are synonymous, right? We will have multiple threads in the same application, unless I am mismatching your alternative name for PerThread. I am fine with PerThread until I see more of the implementation that will examine these annotations.

Member

rnveach commented Aug 2, 2017

@soon Naming is small problem, as logic is more important right now since we aren't in PR stage.

OneCheckInstancePerThread

It depends on what is in a thread as we haven't seen any PRs for your threading implementation for Checker, which I asked if we could start a while ago.

OneCheck

Check shouldn't be in name if it can be applied to other modules like AbstractFileSet. It should be Module.

SingleCheckInstance
ThreadLocalCheck

These names sound too technically and not easy to understand, so I don't like them compared to the others.

Application
Thread

These are synonymous, right? We will have multiple threads in the same application, unless I am mismatching your alternative name for PerThread. I am fine with PerThread until I see more of the implementation that will examine these annotations.

@soon

This comment has been minimized.

Show comment
Hide comment
@soon

soon Aug 3, 2017

Contributor

It depends on what is in a thread as we haven't seen any PRs for your threading implementation for Checker, which I asked if we could start a while ago.

Sorry for the long reply, here is the PR: #4890

Application
Thread

These are synonymous, right?

I don't think so. One instance per application means that the module will not be copied, there will be one instance across the application lifetime. One instance per thread means that the module will be copied when it is used in a background thread.

Probably, you mixed up PerApplication and PerFile and your quote should include File and Thread? I thought again on the differences between PerThread and PerFile and has concluded, that they are similar. I doubt about the PerThread in context of MT TreeWalker, but seems like the PerThread name is still valid. So that, I'm going to use OneModuleInstancePerThread.

Contributor

soon commented Aug 3, 2017

It depends on what is in a thread as we haven't seen any PRs for your threading implementation for Checker, which I asked if we could start a while ago.

Sorry for the long reply, here is the PR: #4890

Application
Thread

These are synonymous, right?

I don't think so. One instance per application means that the module will not be copied, there will be one instance across the application lifetime. One instance per thread means that the module will be copied when it is used in a background thread.

Probably, you mixed up PerApplication and PerFile and your quote should include File and Thread? I thought again on the differences between PerThread and PerFile and has concluded, that they are similar. I doubt about the PerThread in context of MT TreeWalker, but seems like the PerThread name is still valid. So that, I'm going to use OneModuleInstancePerThread.

@sabaka sabaka added the GSoC2017 label Aug 3, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 4, 2017

@sabaka sabaka moved this from ToDo to In Progress in Multi-thread mode for Java files processing Aug 7, 2017

@sabaka sabaka moved this from In Progress to In Review in Multi-thread mode for Java files processing Aug 7, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 9, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 9, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 9, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 10, 2017

@soon

This comment has been minimized.

Show comment
Hide comment
@soon

soon Aug 16, 2017

Contributor

@rnveach @sabaka @romani So, should we split OneModuleInstancePerApplication into StatelessModule and GlobalStatefulModule? The underlying implementation will be the same, this splitting only adds new information about the check

Then, if we're splitting, we should probably rename OneModuleInstancePerThread into FileStatefulModule

Contributor

soon commented Aug 16, 2017

@rnveach @sabaka @romani So, should we split OneModuleInstancePerApplication into StatelessModule and GlobalStatefulModule? The underlying implementation will be the same, this splitting only adds new information about the check

Then, if we're splitting, we should probably rename OneModuleInstancePerThread into FileStatefulModule

@sabaka

This comment has been minimized.

Show comment
Hide comment
@sabaka

sabaka Aug 17, 2017

Contributor

@soon , I would prefer to split it. Even if two types are handling the same way, they are still different.

Contributor

sabaka commented Aug 17, 2017

@soon , I would prefer to split it. Even if two types are handling the same way, they are still different.

soon added a commit to soon/checkstyle that referenced this issue Aug 17, 2017

@sabaka sabaka added the approved label Aug 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 21, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 21, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 21, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 22, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 23, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 28, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 29, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 29, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 30, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 30, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 30, 2017

soon added a commit to soon/checkstyle that referenced this issue Aug 31, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 1, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 1, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 1, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 1, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 1, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 2, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 2, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 4, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 11, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 11, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 11, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 11, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 11, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 17, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 17, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 18, 2017

soon added a commit to soon/checkstyle that referenced this issue Sep 22, 2017

romani added a commit that referenced this issue Sep 23, 2017

@romani romani added this to the 8.3 milestone Sep 23, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Sep 23, 2017

Member

fix is merged

Member

romani commented Sep 23, 2017

fix is merged

soon added a commit to soon/checkstyle that referenced this issue Sep 25, 2017

@romani romani closed this Oct 7, 2017

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