Skip to content

Add ability to download configFile from the internet for Eclipse Java profile #385

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

Closed
krolen opened this issue Mar 26, 2019 · 3 comments
Closed

Comments

@krolen
Copy link

krolen commented Mar 26, 2019

It would be beneficial if we can download configFile from the net. For example in a case of different projects sharing the same code format it would be way easier to have config file somewhere at firm's repo instead of copying the same file to each and every project.
Or maybe there is a way to 'share' same config file between multiple projects which I am missing?

@jbduncan
Copy link
Member

jbduncan commented Mar 26, 2019

@krolen Hi, welcome to Spotless. :)

Intriguing idea. It personally makes me think twice, however, for a couple of reasons:

  1. It introduces a potential point of failure: the server holding the config file being offline, which AFAICT would hurt build reproducibility.
  2. The config file could change outside of source control, so if the config file changes then it's not so easy to understand why it changed, and it would cause unexpected busywork for users.

Furthermore I think these problems would be exacerbated if users pointed to a publicly-available config file on the internet (not to mention that this would also expose users to MitM attacks if they used plain HTTP rather than HTTPS), so the idea of implementing this feature makes me feel uneasy.

However, if an appropriate warning in bold explaining the problems above were to be included in the docs, and if only HTTPS links were allowed, then I'd feel better accepting this feature into Spotless.

Having said all this, I can't speak for @nedtwigg who is the lead maintainer for Spotless, so I suggest waiting for a response from him before we get ahead of ourselves. :)

@krolen
Copy link
Author

krolen commented Mar 26, 2019

Hey, thanks for the reply. Yeah, of course it introduces points of failures. And I guess if you specifying config file location as remote one (specially if those are public files) - you kind of should be reasonably aware of possible issues.

As for connectivity issues: for example if there is one - google formatter plugin will fail as well. Which is not obvious at all :)

@nedtwigg
Copy link
Member

There is a solution for this which uses the gradle dependency cache so that it is resilient to network failures: #217

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

No branches or pull requests

3 participants