-
Notifications
You must be signed in to change notification settings - Fork 322
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
cli: Make fix tools run from the repo root. #4867
base: main
Are you sure you want to change the base?
Conversation
078ff05
to
13b6dfd
Compare
Doesn't it break formatter configuration? Ideally config files should be loaded from the project root. |
f742ee5
to
cf9d62e
Compare
Would I be correct in saying that the following failure, which occurs only on windows, is a bug in jj itself?
It would seem that on windows, the output of the deprecation command is |
The message comes from here: Lines 465 to 473 in c5b93a0
The Line 472 in c5b93a0
Lines 52 to 76 in c5b93a0
That doesn't seem to have any platform-specific code and just returns a Oh, somehow I had not looked at the jj/cli/tests/test_fix_command.rs Lines 47 to 54 in 068fa0f
That took me quite a while to find. So maybe the |
89893f3
to
85e9a8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we work for the same company, so I'll leave actual approval to someone else.
85e9a8c
to
a3f37f1
Compare
@@ -49,6 +49,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | |||
### Fixed bugs | |||
|
|||
* `jj config unset <TABLE-NAME>` no longer removes a table (such as `[ui]`.) | |||
* Formatters called by `jj fix` now always run from the repo root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: insert blank line before
// See #4866. | ||
// Fix commands must run from the repo root, as it may read files such as | ||
// .clang-format that depend on the working directory being correct. | ||
let working_dir = workspace_command.repo_path().to_path_buf(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be workspace_root()
? Maybe we can add a fake-formatter option that stat/read a file to test the behavior.
fwiw, this can be inlined as tx.base_workspace_helper()...
.
Fixes #4866
Checklist
If applicable:
CHANGELOG.md