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

Release native builds #868

Closed
dlicois opened this issue Dec 9, 2022 · 6 comments
Closed

Release native builds #868

dlicois opened this issue Dec 9, 2022 · 6 comments

Comments

@dlicois
Copy link

dlicois commented Dec 9, 2022

Hello

GraalVM native-image support appears to have been added a little while ago #728 (see also #358). However there are no official native build release on the release page https://github.com/google/google-java-format/releases. is it working ?

Providing these could greatly benefit to java tooling as it would allow fast formatting without having to rely on IDEs customization and while being fully compliant with google style guide. This could be easily imported in Visual Studio Code for example.

Platform targets of most interest would be win32-x64, linux-x64, darwin-x64, darwin-arm64.

@vorburger
Copy link
Member

Yeah, this would be nice.

Especially as there are now people who distribute native builds themselves elsewhere.

Before thinking "release", there should probably be a way to (easily) build it here in this project?

So #894 would probably be a pre-requisite here.

@vorburger
Copy link
Member

My #1045 will (should, to be tested and confirmed) make a native builds available at the next release cycle!

cushon added a commit to cushon/google-java-format that referenced this issue Feb 13, 2024
And include them in release artifacts.

I tested this on my fork of the repo, and have a demo here:
https://github.com/cushon/google-java-format/releases

When downloading the artifacts from the releases page they don't have
the executable bit set, and my Mac blocks them because they aren't
signed. That can be worked around with the following, but isn't ideal:

```
chmod a+rx google-java-format-darwin
sudo xattr -r -d com.apple.quarantine google-java-format-darwin
```

Progress towards google#868
cushon added a commit to cushon/google-java-format that referenced this issue Feb 13, 2024
And include them in release artifacts.

I tested this on my fork of the repo, and have a demo here:
https://github.com/cushon/google-java-format/releases

When downloading the artifacts from the releases page they don't have
the executable bit set, and my Mac blocks them because they aren't
signed. That can be worked around with the following, but isn't ideal:

```
chmod a+rx google-java-format-darwin
sudo xattr -r -d com.apple.quarantine google-java-format-darwin
```

Progress towards google#868
cushon added a commit that referenced this issue Feb 16, 2024
And include them in release artifacts.

I tested this on my fork of the repo, and have a demo here:
https://github.com/cushon/google-java-format/releases

When downloading the artifacts from the releases page they don't have
the executable bit set, and my Mac blocks them because they aren't
signed. That can be worked around with the following, but isn't ideal:

```
chmod a+rx google-java-format-darwin
sudo xattr -r -d com.apple.quarantine google-java-format-darwin
```

Progress towards #868
@vorburger
Copy link
Member

vorburger commented Feb 18, 2024

FYI JoseVSeb/google-java-format-for-vs-code#17 with links to my posts about this:

"Formatting completed in 45ms." instead of 473ms previously...

That x10 is actually noticeable on Ctrl-S Save a *.java, even on a fast computer - very cool!

@cushon close this issue?

@natros
Copy link

natros commented Feb 18, 2024

You can get better results if you compile with profile-guided optimizations (PGO)

@vorburger
Copy link
Member

You can get better results if you compile with profile-guided optimizations (PGO)

@natros we welcome your PR to the configuration that's here if you have expertise in this and would like to contribute that!

@cushon
Copy link
Collaborator

cushon commented Feb 21, 2024

I'm going to close this out for now, PGO sounds worth considering as a follow-up.

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 a pull request may close this issue.

4 participants