Skip to content
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

Sync unmarks existing Source Root directories and Mark the root workspace directory as Source Root #6390

Open
yerinu2019 opened this issue Apr 18, 2024 · 1 comment
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) product: IntelliJ IntelliJ plugin type: bug

Comments

@yerinu2019
Copy link

Description of the bug:

This bug was fixed before and came back with the latest IntelliJ IDEA CE version update

Which category does this issue belong to?

Intellij

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

  1. Unmark the root directory (workspace directory) as Source Root if it is marked as Source Root.
  2. Mark any non-root directory as Source Root. The directory icon appears with light blue color
  3. Execute partial sync any target. Sync errors occur "no such package, BUILD not found" even though BUILD file exist.
  4. The Source Root directory set in step two is automatically unmarked. The light blue color disappears from the directory icon
  5. The root directory in step 1 is automatically marked as Source Root.

Which Intellij IDE are you using? Please provide the specific version.

IntelliJ IDEA 2024.1 (Community Edition) 240 built on March 27, 2024

What programming languages and tools are you using? Please provide specific versions.

Java

What Bazel plugin version are you using?

2024.03.26.0.1-api-version-241

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

Updating VCS...
Running Bazel info...
Command: bazel info --tool_tag=ijwb:IDEA:community --curses=no --color=yes --progress_in_terminal_title=no --
Computing VCS working set...
17:39:38 Initial directory update started
17:39:40 Initial directory update finished
17:39:40 Partial Sync started
17:39:43 Build command finished. Retrieving BEP outputs ...
17:39:43 BEP file '/var/folders/1p/tghgs0d937bfk6tnc3byfh8w0000gn/T/intellij-bep-5b3ea84f-b388-4746-9889-f40e7f6f8387' (35151 bytes)
17:39:43 Parsing BEP outputs...
17:39:43 Handling parsed BEP outputs...
17:39:43 BEP outputs have been processed.
17:39:43 Build shard 05288d0b... finished with build errors.
17:39:43 Partial Sync finished

Command: bazel build --tool_tag=ijwb:IDEA:community --keep_going --build_event_binary_file=/var/folders/1p/tghgs0d937bfk6tnc3byfh8w0000gn/T/intellij-bep-5b3ea84f-b388-4746-9889-f40e7f6f8387 --nobuild_event_binary_file_path_conversion --curses=no --color=yes --progress_in_terminal_title=no --noexperimental_run_validations --aspects=@@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect "--override_repository=intellij_aspect=/Users/seansong/Library/Application Support/JetBrains/IdeaIC2024.1/plugins/ijwb/aspect" --output_groups=intellij-resolve-java-direct-deps,intellij-resolve-py-direct-deps,intellij-info-generic,intellij-info-java-direct-deps,intellij-info-py-direct-deps -- //main/grpc/hello/server/armeria:armeria_lib
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
Analyzing: target //main/grpc/hello/server/armeria:armeria_lib (0 packages loaded, 0 targets configured)
Analyzing: target //main/grpc/hello/server/armeria:armeria_lib (0 packages loaded, 0 targets configured)
[0 / 1] checking cached actions
ERROR: no such package 'grpc/hello/proto': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.

  • /Users/seansong/src/yerinu2023-gerrit/yerinu2023/grpc/hello/proto
    ERROR: no such package 'grpc/hello/proto': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
  • /Users/seansong/src/yerinu2023-gerrit/yerinu2023/grpc/hello/proto
    ERROR: no such package '@@[unknown repo 'io_grpc_grpc_java' requested from @@]//api': The repository '@@[unknown repo 'io_grpc_grpc_java' requested from @@]' could not be resolved: No repository visible as '@io_grpc_grpc_java' from main repository
    ERROR: no such package '@@[unknown repo 'io_grpc_grpc_java' requested from @@]//services': The repository '@@[unknown repo 'io_grpc_grpc_java' requested from @@]' could not be resolved: No repository visible as '@io_grpc_grpc_java' from main repository
    ERROR: no such package '@@[unknown repo 'io_grpc_grpc_java' requested from @@]//stub': The repository '@@[unknown repo 'io_grpc_grpc_java' requested from @@]' could not be resolved: No repository visible as '@io_grpc_grpc_java' from main repository
    ERROR: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository
    ERROR: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository
    ERROR: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository
    ERROR: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository
    ERROR: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository
    ERROR: /Users/seansong/src/yerinu2023-gerrit/yerinu2023/main/grpc/hello/server/armeria/BUILD:1:13: no such package 'grpc/hello/proto': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
  • /Users/seansong/src/yerinu2023-gerrit/yerinu2023/grpc/hello/proto and referenced by '//main/grpc/hello/server/armeria:armeria_lib'
    ERROR: /Users/seansong/src/yerinu2023-gerrit/yerinu2023/main/grpc/hello/server/armeria/BUILD:1:13: no such package '@@[unknown repo 'io_grpc_grpc_java' requested from @@]//api': The repository '@@[unknown repo 'io_grpc_grpc_java' requested from @@]' could not be resolved: No repository visible as '@io_grpc_grpc_java' from main repository and referenced by '//main/grpc/hello/server/armeria:armeria_lib'
    ERROR: /Users/seansong/src/yerinu2023-gerrit/yerinu2023/main/grpc/hello/server/armeria/BUILD:1:13: no such package '@@[unknown repo 'io_grpc_grpc_java' requested from @@]//services': The repository '@@[unknown repo 'io_grpc_grpc_java' requested from @@]' could not be resolved: No repository visible as '@io_grpc_grpc_java' from main repository and referenced by '//main/grpc/hello/server/armeria:armeria_lib'
    ERROR: /Users/seansong/src/yerinu2023-gerrit/yerinu2023/main/grpc/hello/server/armeria/BUILD:1:13: no such package '@@[unknown repo 'io_grpc_grpc_java' requested from @@]//stub': The repository '@@[unknown repo 'io_grpc_grpc_java' requested from @@]' could not be resolved: No repository visible as '@io_grpc_grpc_java' from main repository and referenced by '//main/grpc/hello/server/armeria:armeria_lib'
    ERROR: /Users/seansong/src/yerinu2023-gerrit/yerinu2023/main/grpc/hello/server/armeria/BUILD:1:13: no such package '@@[unknown repo 'maven' requested from @@]//': The repository '@@[unknown repo 'maven' requested from @@]' could not be resolved: No repository visible as '@maven' from main repository and referenced by '//main/grpc/hello/server/armeria:armeria_lib'
    WARNING: errors encountered while analyzing target '//main/grpc/hello/server/armeria:armeria_lib', it will not be built.
    Analysis failed
    INFO: Analyzed target //main/grpc/hello/server/armeria:armeria_lib (0 packages loaded, 0 targets configured).
    WARNING: errors encountered while analyzing target '//main/grpc/hello/server/armeria:armeria_lib', it will not be built.
    Analysis failed
    INFO: Found 0 targets...
    ERROR: command succeeded, but not all targets were analyzed
    INFO: Elapsed time: 0.647s, Critical Path: 0.02s
    INFO: 1 process: 1 internal.
    ERROR: Build did NOT complete successfully
    FAILED:
    INFO: Build Event Protocol files produced successfully.
@yerinu2019 yerinu2019 added awaiting-maintainer Awaiting review from Bazel team on issues type: bug labels Apr 18, 2024
@github-actions github-actions bot added the product: IntelliJ IntelliJ plugin label Apr 18, 2024
@mai93 mai93 assigned tpasternak and unassigned mai93 May 6, 2024
@tpasternak tpasternak added the P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) label Jun 3, 2024
@tpasternak
Copy link
Collaborator

Thank you for the report. However, it's unclear if we've ever intentionally supported preserving project structure after sync. I've assigned this issue a priority of P4, but we may reconsider this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues P4 This is either out of scope or we don't have bandwidth to review a PR. (No assignee) product: IntelliJ IntelliJ plugin type: bug
Projects
None yet
Development

No branches or pull requests

6 participants