8000 feat: add zip version when compressing all binaries (#321) by Okeanos · Pull Request #362 · editorconfig-checker/editorconfig-checker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add zip version when compressing all binaries (#321) #362

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

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

Okeanos
Copy link
Contributor
@Okeanos Okeanos commented Aug 21, 2024

This adds a zip archive to the output of the compress-all-binaries sub-task in order to provide better compatiblitiy with Windows.

Windows does not come with the ability to handle tar.gz (until now the only output format) and, hence, users cannot easily use the prebuilt binaries distributed via GitHub. Further integration into, for example, the winget community packages is also prevented by this.

Zip was chosen as an additional output format in order to not create an unexpected/breaking change for consumers of the existing tar.gz format.

Windows is not handled specifically here in order to keep the process of providing build artifacts as simple as possible.

…cker#321)

This adds a zip archive to the output of the compress-all-binaries sub-task in
order to provide better compatiblitiy with Windows.

Windows does not come with the ability to handle tar.gz (until now the only
output format) and, hence, users cannot easily use the prebuilt binaries
distributed via GitHub. Further integration into, for example, the winget
community packages is also prevented by this.

Zip was chosen as an _additional_ output format in order to not create an
unexpected/breaking change for consumers of the existing tar.gz format.

Windows is not handled specifically here in order to keep the process of
providing build artifacts as simple as possible.
Copy link
codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.31%. Comparing base (d6c17be) to head (f7dacf8).
Report is 35 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
+ Coverage   84.89%   85.31%   +0.42%     
==========================================
  Files           8        8              
  Lines         695      538     -157     
==========================================
- Hits          590      459     -131     
+ Misses         81       55      -26     
  Partials       24       24              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member
@theoludwig theoludwig left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! 😄

I agree with this comment: #321 (comment)

Except you would want to compress all binaries as zips.
The wrapper (php, javascript, pyhton) will need to adjust anyway so I would think one format which can be used anywhere would be better than making exceptions - if that's possible. But I guess zip is common on every OS.


Zip was chosen as an additional output format in order to not create an unexpected/breaking change

I think in that case the breaking change might be worth it, to not increase too much the size of our release assets. And the breaking change should be pretty much invisible for end users, when the wrappers will be updated.

What do you think? @mstruebing

@Okeanos
Copy link
Contributor Author
Okeanos commented Aug 21, 2024

And the breaking change should be pretty much invisible for end users, […].

Don't count on it: I am currently consuming the tar.gz release file directly from within some GitHub Actions because for a brief period the v3 release broke the go run syntax (fixed in #339) and I never bothered to switch back.

I can obviously adjust this but having my workflows break unexpectedly with no prior notice (again) would be somewhat of a bummer. I would kindly ask that at least for 1-2 releases both archives will be published with a proper notification in the release notes.

@mstruebing mstruebing requested a review from theoludwig August 21, 2024 21:38
@mstruebing
Copy link
Member

In all honesty, I think the wrappers should be deprecated.
I'm not entirely sure how widely they are used so it's hard to decide.
They add unneeded complexity to the process and the tool which is just not worth it and can be error prone.
The tool should be easily installable and usable and we should support for major ways, i.e. github actions and nix are coming to my mind. We should not create a wrapper for every programming language just to be able to use the programming languages package manager. This was a mistake by me a long time ago. What I kind of would like/support is a clear seperation between the main tool and the wrappers (a separate GH org) that is related but not officially supported/maintained but rather community organised.

Additionally, the whole release should be reworked altogether, see #204 which is quite old already.

Sorry for the long rant :)

Now to the answer:
I guess we can just publish tar.gz and zip files, we could remove the tar.gz in a future release and, if needed/wanted, adjust the wrappers to download the zip file, which should also be supported and preinstalled on most operating systems.

Copy link
Member
@mstruebing mstruebing left a comment

Choose a reason for hiding this comment

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

Thank you 🚀 , I will leave it open for 1-2 days to see if there are more responses

@mstruebing mstruebing merged commit f1bb625 into editorconfig-checker:main Aug 23, 2024
5 checks passed
@theoludwig theoludwig added this to the v3.1.0 milestone Aug 30, 2024
@polarathene
Copy link
Contributor
polarathene commented Sep 13, 2024

remove the tar.gz in a future release

Generally this is more accessible for linux, similar to zip for Windows. I'm not sure what's common on macOS.

tar to archive a directory of files followed by a compression format like gzip. There is no zip equivalent supported by tar, you'd sometimes need to install the unzip package IIRC which in some environments (at least with containers) it is more common to have tar and gzip/xz already than it is to have unzip.

Installing a new package often requires updating/syncing the repo index of the package manager which slows the task down. Although in the case of this project I'm not sure how much of a concern that really is 🤷‍♂️


Other feedback:

  • I've not looked into the archive contents, but if it were just a static binary you could probably just offer that without the compression step? 🤔
  • I assume the binary is static linked since there's no distinction of glibc/gnu vs musl on the linux ones that I'm used to seeing.
  • It's good that the version name is not in the file name as tends to only have a disadvantage (you couldn't rely on the latest release if you weren't version pinning for some reason).
  • There is quite a lot of niche platforms being published that's probably not needed if you're concerned about total size of all assets published for a release. If you're going to change expectations that require workflows to adjust beyond a version bump, then you might as well drop all those uncommon ones and only publish them if an actual request is made to keep publishing the artifacts for those niche platforms?

@Okeanos Okeanos deleted the add-zip-archives branch November 8, 2024 17:36
This was referenced Jan 5, 2025
DennisRasey pushed a commit to DennisRasey/forgejo that referenced this pull request Jan 10, 2025
…/cmd/editorconfig-checker to v3.1.1 (forgejo) (#6520)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) | minor | `v3.0.3` -> `v3.1.1` |

---

### Release Notes

<details>
<summary>editorconfig-checker/editorconfig-checker (github.com/editorconfig-checker/editorconfig-checker/v3/cmd/editorconfig-checker)</summary>

### [`v3.1.1`](https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/v3.1.1)

[Compare Source](editorconfig-checker/editorconfig-checker@v3.1.0...v3.1.1)

##### Bug Fixes

-   dockerfile expected binary at /, not /usr/bin/ [#&#8203;410](editorconfig-checker/editorconfig-checker#410) ([#&#8203;411](editorconfig-checker/editorconfig-checker#411)) ([2c82197](editorconfig-checker/editorconfig-checker@2c82197))

### [`v3.1.0`](https://github.com/editorconfig-checker/editorconfig-checker/releases/tag/v3.1.0)

[Compare Source](editorconfig-checker/editorconfig-checker@v3.0.3...v3.1.0)

##### Features

-   add zip version when compressing all binaries ([#&#8203;321](editorconfig-checker/editorconfig-checker#321)) ([#&#8203;362](editorconfig-checker/editorconfig-checker#362)) ([f1bb625](editorconfig-checker/editorconfig-checker@f1bb625))
-   consolidate adjacent error messages ([#&#8203;360](editorconfig-checker/editorconfig-checker#360)) ([cf4ae1c](editorconfig-checker/editorconfig-checker@cf4ae1c))
-   editorconfig-checker-disable-next-line ([#&#8203;363](editorconfig-checker/editorconfig-checker#363)) ([6116ec6](editorconfig-checker/editorconfig-checker@6116ec6))
-   provide Codeclimate compatible report fromat ([#&#8203;367](editorconfig-checker/editorconfig-checker#367)) ([282c315](editorconfig-checker/editorconfig-checker@282c315))
-   support `.editorconfig-checker.json` config ([#&#8203;375](editorconfig-checker/editorconfig-checker#375)) ([cb0039c](editorconfig-checker/editorconfig-checker@cb0039c))

##### Bug Fixes

-   actually use the correct end marker ([#&#8203;405](editorconfig-checker/editorconfig-checker#405)) ([3c03499](editorconfig-checker/editorconfig-checker@3c03499))
-   add `.ecrc` deprecation warning ([#&#8203;389](editorconfig-checker/editorconfig-checker#389)) ([d33b81c](editorconfig-checker/editorconfig-checker@d33b81c))
-   this release-please ma
8980
rker ([#&#8203;403](editorconfig-checker/editorconfig-checker#403)) ([617c6d4](editorconfig-checker/editorconfig-checker@617c6d4))
-   typo in config, `SpacesAftertabs` => `SpacesAfterTabs` ([#&#8203;386](editorconfig-checker/editorconfig-checker#386)) ([25e3542](editorconfig-checker/editorconfig-checker@25e3542))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45My4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTMuMCIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19-->

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6520
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
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.

4 participants
0