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

Bazel causes a few tools to fail #293

Closed
Gold856 opened this issue Nov 8, 2024 · 1 comment · Fixed by #294
Closed

Bazel causes a few tools to fail #293

Gold856 opened this issue Nov 8, 2024 · 1 comment · Fixed by #294

Comments

@Gold856
Copy link
Contributor

Gold856 commented Nov 8, 2024

Running wpiformat gives me this error:

error: D:/allwpilib\bazel-allwpilib\bazel-out\x64_windows-opt-exec-ST-a828a81199fe\bin\external\rules_jvm_external\private\tools\java\com\github\bazelbuild\rules_jvm_external\zip\_javac\zip\libzip_classes\com\github\bazelbuild\rules_jvm_external\zip\StableZipEntry.class: No such file or directory

Running isort with the --gitignore flag and specifying .\bazel-allwpilib\ causes it to spit out: fatal: not a git repository (or any of the parent directories): .git about 844 times and that it skipped 116 files. Running it without the --gitignore flag causes it spit out this:

C:\Users\gold2\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\isort\main.py:104: UserWarning: Unable to parse file .\bazel-allwpilib\bazel-out\x64_windows-opt-exec-ST-a828a81199fe\bin\shared\bazel\rules\gen\gen_resources.temp due to [WinError 5] Access is denied: 'C:\\Users\\gold2\\_bazel_gold2\\himijvnp\\execroot\\__main__\\bazel-out\\x64_windows-opt-exec-ST-a828a81199fe\\bin\\shared\\bazel\\rules\\gen\\gen_resources.temp.isorted'
  warn(f"Unable to parse file {file_name} due to {error}")
C:\Users\gold2\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\isort\main.py:104: UserWarning: Unable to parse file .\bazel-allwpilib\bazel-out\x64_windows-opt-exec-ST-a828a81199fe\bin\shared\bazel\rules\gen\gen_resources.temp.isorted due to [WinError 5] Access is denied: 'C:\\Users\\gold2\\_bazel_gold2\\himijvnp\\execroot\\__main__\\bazel-out\\x64_windows-opt-exec-ST-a828a81199fe\\bin\\shared\\bazel\\rules\\gen\\gen_resources.temp.isorted.isorted'
  warn(f"Unable to parse file {file_name} due to {error}")
C:\Users\gold2\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\isort\main.py:104: UserWarning: Unable to parse file .\bazel-allwpilib\bazel-out\x64_windows-opt-exec-ST-a828a81199fe\bin\shared\bazel\rules\gen\gen_resources.temp.isorted.isorted due to [WinError 5] Access is denied: 'C:\\Users\\gold2\\_bazel_gold2\\himijvnp\\execroot\\__main__\\bazel-out\\x64_windows-opt-exec-ST-a828a81199fe\\bin\\shared\\bazel\\rules\\gen\\gen_resources.temp.isorted.isorted.isorted'
  warn(f"Unable to parse file {file_name} due to {error}")
Skipped 54 files
@calcmogul
Copy link
Member

calcmogul commented Nov 8, 2024

This is because wpiformat throws errors on broken symlinks.

    # Throw an error if any files or directories don't exist
    for f in files:
        if not os.path.exists(f):
            print(f"error: {f}: No such file or directory")
            sys.exit(1)

This check occurs before gitignored files are filtered out.

@calcmogul calcmogul transferred this issue from wpilibsuite/allwpilib Nov 8, 2024
calcmogul added a commit to calcmogul/styleguide that referenced this issue Nov 8, 2024
Bazel creates broken symlinks in the build folder.

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

Successfully merging a pull request may close this issue.

2 participants