Skip to content

Support Palantir Java Format #224

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Support Palantir Java Format #224

wants to merge 2 commits into from

Conversation

ihostage
Copy link

Details about Palantir Java Format in the README -> https://github.com/palantir/palantir-java-format

@ihostage
Copy link
Author

The main question is: What should we do? 😄
Yes, Palantir is fork of Google, but for latest verion of these formatters the result is different for GOOGLE and AOSP styles.

So, I see a two options:

  1. Migrate to Palantir (disadvantages: backward incompatible with previous our plugin options and the results)
  2. Add Palantir as independent formatter with another settings (disadvantages: a few new plugin options that very simillar to current and one switch option to choose a formatter)

@ihostage
Copy link
Author

@mkurz WDYT?

@ihostage
Copy link
Author

First option in the first commit of this PR, second in second 😄

@eed3si9n
Copy link
Member

I'm -1 on this. To each their own, but I don't want to voluntarily install software developed by Palantir.

@ihostage
Copy link
Author

I'm -1 on this. To each their own, but I don't want to voluntarily install software developed by Palantir.

But formatter is just OSS project that is developed by community and published under APL 2.0 like Sbt itself or Play 🤔

@eed3si9n
Copy link
Member

Since I can't check every commits, I can only use heuristics like "can I trust this company to not hack into my stuff", and this company literally makes software for military and spy agencies like CIA.

@ihostage
Copy link
Author

I think I can extract the core part and split formatters on the plugin side not in settings. I mean

addSbtPlugin("com.github.sbt" % "sbt-java-formatter" % --latest version---) // Depends on Google Formatter

or

addSbtPlugin("com.github.sbt" % "sbt-java-palantir-formatter" % --latest version---) //  Depends on Palantir formatter

@eed3si9n is it ok? WDYT?

@eed3si9n
Copy link
Member

It's marginally better, but if you keep their code in the repo anyone maintaining this plugin would have to run it on their laptop to run tests?

@ihostage
Copy link
Author

It's marginally better, but if you keep their code in the repo anyone maintaining this plugin would have to run it on their laptop to run tests?

Yes, it's true. The users of sbt-java-formatter won't run a Palantir formatter in their machines, but users of sbt-java-palantir-formatter and maintainers this repo will. 🤷‍♂️

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.

2 participants