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

[Bug]: patch can only be applied from repo root #672

Open
jgao54 opened this issue Apr 22, 2024 · 0 comments
Open

[Bug]: patch can only be applied from repo root #672

jgao54 opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels
bug Something isn't working untriaged Requires traige

Comments

@jgao54
Copy link

jgao54 commented Apr 22, 2024

What happened?

when running bazel lint --fix, a patch file gets successfully generated:

--- a/path/to/file.ts
+++ b/path/to/file.ts
@@ -1,5 +1,5 @@
-import logform from 'logform';
 import _ from 'lodash';
+import logform from 'logform';
 import traverse from 'traverse';

The aspect build is succesful, but subsequently the apply fails with:

Error: open path/to/file.ts: no such file or directory

I suspect it's failing on this line, where it expected CWD to be the workspace root.

This error does not happen, if i run bazel lint --fix from workspace root, but fails if i run from a nested directory.

Version

Development (host) and target OS/architectures:

Output of bazel --version: 7.1.1

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

http_archive(
    name = "aspect_rules_lint",
    sha256 = "a3e07f07216b6b406d2297c273e7af4cc8096b43288952020cdf4dc12f45b5e8",
    strip_prefix = "rules_lint-0.18.0",
    url = "https://github.com/aspect-build/rules_lint/releases/download/v0.18.0/rules_lint-v0.18.0.tar.gz",
)

Language(s) and/or frameworks involved:
typescript

How to reproduce

No response

Any other information?

No response

@jgao54 jgao54 added the bug Something isn't working label Apr 22, 2024
@github-actions github-actions bot added the untriaged Requires traige label Apr 22, 2024
@alexeagle alexeagle self-assigned this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

2 participants