Skip to content

Commit

Permalink
Move TargetTree to the shared package.
Browse files Browse the repository at this point in the history
There is nothing query sync specific in here, and putting it in the common package allows to to share implementation details with other classes in there in future.

PiperOrigin-RevId: 612840186
  • Loading branch information
Googler authored and copybara-github committed Mar 5, 2024
1 parent 28823de commit b306992
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import com.google.idea.blaze.common.Label;
import com.google.idea.blaze.common.PrintOutput;
import com.google.idea.blaze.common.RuleKinds;
import com.google.idea.blaze.common.TargetTree;
import com.google.idea.blaze.qsync.project.ProjectTarget.SourceType;
import com.google.idea.blaze.qsync.query.PackageSet;
import java.nio.file.Path;
Expand Down
12 changes: 0 additions & 12 deletions querysync/javatests/com/google/idea/blaze/qsync/project/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ java_test(
],
)

java_test(
name = "TargetTreeTest",
size = "small",
srcs = ["TargetTreeTest.java"],
deps = [
"//querysync/java/com/google/idea/blaze/qsync/project",
"//shared",
"@junit//jar",
"@truth//jar",
],
)

java_test(
name = "ProjectDefinitionTest",
size = "small",
Expand Down
1 change: 1 addition & 0 deletions shared/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ test_suite(
name = "tests",
tests = [
"//shared/javatests/com/google/idea/blaze/common:LabelTest",
"//shared/javatests/com/google/idea/blaze/common:TargetTreeTest",
"//shared/javatests/com/google/idea/blaze/common/artifact:BuildArtifactCacheTest",
"//shared/javatests/com/google/idea/blaze/common/vcs:VcsStateTest",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.idea.blaze.qsync.project;
package com.google.idea.blaze.common;

import static com.google.common.collect.ImmutableSet.toImmutableSet;

Expand All @@ -24,7 +24,6 @@
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.idea.blaze.common.Label;
import java.nio.file.Path;
import java.util.ArrayDeque;
import java.util.HashMap;
Expand Down
11 changes: 11 additions & 0 deletions shared/javatests/com/google/idea/blaze/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,14 @@ java_library(
"@flogger//jar",
],
)

java_test(
name = "TargetTreeTest",
size = "small",
srcs = ["TargetTreeTest.java"],
deps = [
"//shared",
"@junit//jar",
"@truth//jar",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.idea.blaze.qsync.project;
package com.google.idea.blaze.common;

import static com.google.common.truth.Truth.assertThat;

import com.google.idea.blaze.common.Label;
import java.nio.file.Path;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down

0 comments on commit b306992

Please sign in to comment.