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

Rename fmt2 to fmt and lint2 to lint #9257

Merged
merged 3 commits into from
Mar 10, 2020

Conversation

Eric-Arellano
Copy link
Contributor

Closes #8351.

It's safe to make this change, even with us defaulting to --v2 for users, because we default to no V2 linters being enabled and the V2 goal no-ops in this case.

It's also safe to have both V1 and V2 linters run at the same time (mixed mode). They won't run at the same time, so there's no risk of formatters conflicting with each other.

In a followup, we can now deprecate V1 isort for the V2 implementation.

Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Contributor

@pierrechevalier83 pierrechevalier83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice to see! 😄

@@ -37,7 +18,6 @@ def act_transitively(self):
def determine_if_skipped(self, *, formatter_subsystem: Subsystem) -> bool:
# TODO: generalize this to work with every formatter, not only scalafix.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe now it's not in the same file anymore, I would add a sentence to this comment to say: "when doing this, remember to change the help description for --only in rules/core/fmt.py." I could see us forgetting that otherwise.

@pierrechevalier83
Copy link
Contributor

Note: This CI failure looks like a legit failure caused by this change: https://travis-ci.com/pantsbuild/pants/jobs/295575406

Exception message: Error computing value for --v1 in global scope (may also be from PANTS_* environment variables).
Caused by:
Traceback (most recent call last):
  File "/home/travis/.pex/code/9ee2a1c72fda298230e05408bcae28464e3b1aa3/pants/option/parser.py", line 285, in parse_args
    val = self._compute_value(dest, kwargs, flag_vals)
  File "/home/travis/.pex/code/9ee2a1c72fda298230e05408bcae28464e3b1aa3/pants/option/parser.py", line 733, in _compute_value
    dest, self._scope_str()
pants.option.errors.ParseError: Multiple cmd line flags specified for option v1 in global scope

Copy link
Contributor

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woo!

I had fixed the lint test, not the fmt test. Oops.
@Eric-Arellano Eric-Arellano merged commit 77b120a into pantsbuild:master Mar 10, 2020
@Eric-Arellano Eric-Arellano deleted the lint2-to-lint branch March 10, 2020 04:42
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 this pull request may close these issues.

Replace fmt goal with v2 version
4 participants